summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-01-20 01:09:53 +0000
committerjhb <jhb@FreeBSD.org>2016-01-20 01:09:53 +0000
commit77733541d454c3b987e985b85df345fc8c7f205d (patch)
tree06645c8b5fb21159a6ab7cfe6514945bca030b0f /sys/compat
parent2651e6b1c65c3a49c9390393bd44d1fc1d428f42 (diff)
downloadFreeBSD-src-77733541d454c3b987e985b85df345fc8c7f205d.zip
FreeBSD-src-77733541d454c3b987e985b85df345fc8c7f205d.tar.gz
MFC 289769,289822,290143,290144:
Rename remaining linux32 symbols from linux_* to linux32_*. 289769: Rename remaining linux32 symbols such as linux_sysent[] and linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. 289822: Fix build for the KTR-enabled kernels. 290143: Fix build with DEBUG defined. 290144: Update for LINUX32 rename. The assembler didn't complain about undefined symbols but just used 0 after the rename.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_misc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 8f2a687..538b9dc 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -2362,7 +2362,13 @@ linux_ppoll(struct thread *td, struct linux_ppoll_args *args)
#if defined(DEBUG) || defined(KTR)
/* XXX: can be removed when every ldebug(...) and KTR stuff are removed. */
-u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))];
+#ifdef COMPAT_LINUX32
+#define L_MAXSYSCALL LINUX32_SYS_MAXSYSCALL
+#else
+#define L_MAXSYSCALL LINUX_SYS_MAXSYSCALL
+#endif
+
+u_char linux_debug_map[howmany(L_MAXSYSCALL, sizeof(u_char))];
static int
linux_debug(int syscall, int toggle, int global)
@@ -2374,7 +2380,7 @@ linux_debug(int syscall, int toggle, int global)
memset(linux_debug_map, c, sizeof(linux_debug_map));
return (0);
}
- if (syscall < 0 || syscall >= LINUX_SYS_MAXSYSCALL)
+ if (syscall < 0 || syscall >= L_MAXSYSCALL)
return (EINVAL);
if (toggle)
clrbit(linux_debug_map, syscall);
@@ -2382,6 +2388,7 @@ linux_debug(int syscall, int toggle, int global)
setbit(linux_debug_map, syscall);
return (0);
}
+#undef L_MAXSYSCALL
/*
* Usage: sysctl linux.debug=<syscall_nr>.<0/1>
OpenPOWER on IntegriCloud