summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorpgoyette <pgoyette@NetBSD.org>2018-08-10 21:44:58 +0000
committerpgoyette <pgoyette@NetBSD.org>2018-08-10 21:44:58 +0000
commitffe0b4102e0be2a64a091976ded9653109f05e1e (patch)
treed12f417771946925bcf72c5c71aabc30cf276a5d /sys/compat/linux
parent1b2ec9167d846228269bea51a8fbf4d807a2aad5 (diff)
Allow syscall_establish() to install new syscalls when the existing
entry-point is either sys_nomodule or sys_nosys. Update the makesyscalls.sh script to create a const array of bits to allow syscall_disestablish() to properly restore the original entry-point. Update all the initializers of struct emul to initialize the pointer to the bit array struct emul. XXX Regen of all files created by makesyscalls.sh will come soon, XXX followed by a kernel version bump (since struct emul is being XXX modified). This commit should address PR kern/45781 and also removes the need for the work-around for that PR in file sys/arch/usermode/modules/syscallemu/syscallemu.c
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/common/linux_exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c
index 3e0eb52bfa8..5c841cfc9e5 100644
--- a/sys/compat/linux/common/linux_exec.c
+++ b/sys/compat/linux/common/linux_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.c,v 1.119 2018/05/06 13:40:51 kamil Exp $ */
+/* $NetBSD: linux_exec.c,v 1.120 2018/08/10 21:44:58 pgoyette Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.119 2018/05/06 13:40:51 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.120 2018/08/10 21:44:58 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,6 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.119 2018/05/06 13:40:51 kamil Exp $
#include <compat/linux/common/linux_emuldata.h>
extern struct sysent linux_sysent[];
+extern const uint32_t linux_sysent_nomodbits[];
extern const char * const linux_syscallnames[];
extern char linux_sigcode[], linux_esigcode[];
@@ -89,6 +90,7 @@ struct emul emul_linux = {
.e_nsysent = LINUX_SYS_NSYSENT,
#endif
.e_sysent = linux_sysent,
+ .e_nomodbits = linux_sysent_nomodbits,
.e_syscallnames = linux_syscallnames,
.e_sendsig = linux_sendsig,
.e_trapsignal = linux_trapsignal,