* [PATCH] sched/numa: fix compat declarations for sys_numa_{t,m}bind()
@ 2012-06-12 17:18 Chris Metcalf
2012-06-12 17:36 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Chris Metcalf @ 2012-06-12 17:18 UTC (permalink / raw)
To: Arnd Bergmann, Peter Zijlstra, Ingo Molnar, Andrew Morton,
linux-arch, linux-kernel
The asm-generic code needs actual declarations of the routines,
and the syscall entries need to reference the correct names.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
---
The tilegx architecture is currently broken in linux-next because
of this issue.
However, although this fixes the problem, I'd like to question the use of
"compat" syscall entries here at all. The syscalls in question take only
"int" and "unsigned long" arguments, so it would seem that you could
use them directly from compat userspace. The compat code present in
the original commit just calls onward to the normal versions without
any other changes, so I think it should be sufficient to use a model
more like sys_mprotect, for example, where there is no compat function.
include/asm-generic/unistd.h | 4 ++--
include/linux/compat.h | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 4dfef49..43c6b8d 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -692,9 +692,9 @@ __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
compat_sys_process_vm_writev)
#define __NR_numa_mbind 272
-__SC_COMP(__NR_numa_mbind, sys_numa_mbind, compat_sys_ms_mbind)
+__SC_COMP(__NR_numa_mbind, sys_numa_mbind, compat_sys_numa_mbind)
#define __NR_numa_tbind 273
-__SC_COMP(__NR_numa_tbind, sys_numa_tbind, compat_sys_ms_tbind)
+__SC_COMP(__NR_numa_tbind, sys_numa_tbind, compat_sys_numa_tbind)
#undef __NR_syscalls
#define __NR_syscalls 274
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 4e89039..bb081e1 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -590,6 +590,12 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
unsigned long liovcnt, const struct compat_iovec __user *rvec,
unsigned long riovcnt, unsigned long flags);
+asmlinkage long compat_sys_numa_mbind(compat_ulong_t addr, compat_ulong_t len,
+ compat_int_t ng_id,
+ compat_ulong_t flags);
+asmlinkage long compat_sys_numa_tbind(compat_int_t tid, compat_int_t ng_id,
+ compat_ulong_t flags);
+
#else
#define is_compat_task() (0)
--
1.7.10.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/numa: fix compat declarations for sys_numa_{t,m}bind()
2012-06-12 17:18 [PATCH] sched/numa: fix compat declarations for sys_numa_{t,m}bind() Chris Metcalf
@ 2012-06-12 17:36 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2012-06-12 17:36 UTC (permalink / raw)
To: Chris Metcalf
Cc: Peter Zijlstra, Ingo Molnar, Andrew Morton, linux-arch,
linux-kernel
On Tuesday 12 June 2012, Chris Metcalf wrote:
> The asm-generic code needs actual declarations of the routines,
> and the syscall entries need to reference the correct names.
>
> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
> ---
> The tilegx architecture is currently broken in linux-next because
> of this issue.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Please apply to the branch that contains the syscall implementation.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-12 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 17:18 [PATCH] sched/numa: fix compat declarations for sys_numa_{t,m}bind() Chris Metcalf
2012-06-12 17:36 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox