Page MenuHomeFreeBSD

D41901.1775802183.diff
No OneTemporary

Size
4 KB
Referenced Files
None
Subscribers
None

D41901.1775802183.diff

diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -65,7 +65,6 @@
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
#include <compat/linux/linux_signal.h>
-#include <compat/linux/linux_sysproto.h>
#include <compat/linux/linux_util.h>
#include <compat/linux/linux_vdso.h>
@@ -168,6 +167,8 @@
/* Restore %rcx for machine context. */
frame->tf_rcx = frame->tf_rip;
+ if ((sa->callp->sy_thrcnt & SY_THR_ABSENT) != 0)
+ return (ENOSYS);
td->td_retval[0] = 0;
return (0);
}
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -535,6 +535,8 @@
else
sa->callp = &p->p_sysent->sv_table[sa->code];
+ if ((sa->callp->sy_thrcnt & SY_THR_ABSENT) != 0)
+ return (ENOSYS);
td->td_retval[0] = 0;
td->td_retval[1] = frame->tf_rdx;
diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c
--- a/sys/arm64/linux/linux_sysvec.c
+++ b/sys/arm64/linux/linux_sysvec.c
@@ -130,6 +130,8 @@
if (sa->callp->sy_narg > nitems(sa->args))
panic("ARM64TODO: Could we have more than %zu args?",
nitems(sa->args));
+ if ((sa->callp->sy_thrcnt & SY_THR_ABSENT) != 0)
+ return (ENOSYS);
memcpy(sa->args, ap, nitems(sa->args) * sizeof(register_t));
td->td_retval[0] = 0;
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -79,7 +79,6 @@
#include <compat/linux/linux_signal.h>
#include <compat/linux/linux_time.h>
#include <compat/linux/linux_util.h>
-#include <compat/linux/linux_sysproto.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_misc.h>
@@ -1506,13 +1505,6 @@
return (kern_getsid(td, args->pid));
}
-int
-linux_nosys(struct thread *td, struct nosys_args *ignore)
-{
-
- return (ENOSYS);
-}
-
int
linux_getpriority(struct thread *td, struct linux_getpriority_args *args)
{
diff --git a/sys/compat/linux/linux_sysproto.h b/sys/compat/linux/linux_sysproto.h
deleted file mode 100644
--- a/sys/compat/linux/linux_sysproto.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
- * Copyright (c) 2005 Travis Poppe
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LINUX_SYSPROTO
-#define LINUX_SYSPROTO
-
-int linux_nosys(struct thread *, struct nosys_args *);
-
-#endif
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -526,6 +526,8 @@
else
sa->callp = &p->p_sysent->sv_table[sa->code];
+ if ((sa->callp->sy_thrcnt & SY_THR_ABSENT) != 0)
+ return (ENOSYS);
td->td_retval[0] = 0;
td->td_retval[1] = frame->tf_edx;

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 10, 6:23 AM (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28313538
Default Alt Text
D41901.1775802183.diff (4 KB)

Event Timeline