summaryrefslogtreecommitdiff
path: root/sys/compat/linux32/common
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/linux32/common
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/linux32/common')
-rw-r--r--sys/compat/linux32/common/linux32_exec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/linux32/common/linux32_exec.c b/sys/compat/linux32/common/linux32_exec.c
index 84848156cf8..091809b6ec1 100644
--- a/sys/compat/linux32/common/linux32_exec.c
+++ b/sys/compat/linux32/common/linux32_exec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_exec.c,v 1.23 2018/05/06 13:40:51 kamil Exp $ */
+/* $NetBSD: linux32_exec.c,v 1.24 2018/08/10 21:44:58 pgoyette Exp $ */
/*-
* Copyright (c) 1994-2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.23 2018/05/06 13:40:51 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.24 2018/08/10 21:44:58 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.23 2018/05/06 13:40:51 kamil Exp
#include <compat/linux32/linux32_syscall.h>
extern struct sysent linux32_sysent[];
+extern const uint32_t linux32_sysent_nomodbits[];
extern const char * const linux32_syscallnames[];
extern char linux32_sigcode[], linux32_esigcode[];
@@ -74,6 +75,7 @@ struct emul emul_linux32 = {
.e_nsysent = LINUX32_SYS_NSYSENT,
#endif
.e_sysent = linux32_sysent,
+ .e_nomodbits = linux32_sysent_nomodbits,
.e_syscallnames = linux32_syscallnames,
.e_sendsig = linux32_sendsig,
.e_trapsignal = linux_trapsignal,