Commit 454d7ef8 authored by Michael Ellerman's avatar Michael Ellerman

powerpc/syscalls: Add COMPAT_SPU_NEW() macro

Currently the select system call is wired up with the SYSX_SPU()
macro. The SYSX_SPU() is not handled by systbl_chk.c, which means the
syscall number for select is not checked.

That hides the fact that the syscall number for select is actually
__NR__newselect not __NR_select.

In a following patch we'd like to drop ppc32_select() which means
select will become a regular COMPAT_SYS_SPU() syscall. But
COMPAT_SYS_SPU() can't deal with the fact that the syscall number is
actually __NR__newselect. We also can't just redefine __NR_select
because that's still used for the old select call.

So add a new COMPAT_NEW_SPU() that does the same thing as
COMPAT_SYS_SPU() except it encodes that we're using the new number.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 4c392e65
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#endif #endif
#define SYSCALL_SPU(func) SYSCALL(func) #define SYSCALL_SPU(func) SYSCALL(func)
#define COMPAT_SYS_SPU(func) COMPAT_SYS(func) #define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
#define COMPAT_SPU_NEW(func) COMPAT_SYS(func)
#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32) #define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
.section .rodata,"a" .section .rodata,"a"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define SYSCALL_SPU(func) SYSCALL(func) #define SYSCALL_SPU(func) SYSCALL(func)
#define COMPAT_SYS_SPU(func) COMPAT_SYS(func) #define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
#define COMPAT_SPU_NEW(func) COMPAT_SYS(_new##func)
#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32) #define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
/* Just insert a marker for ni_syscalls */ /* Just insert a marker for ni_syscalls */
......
...@@ -44,6 +44,7 @@ static void *spu_syscall_table[] = { ...@@ -44,6 +44,7 @@ static void *spu_syscall_table[] = {
#define SYSCALL_SPU(func) sys_##func, #define SYSCALL_SPU(func) sys_##func,
#define COMPAT_SYS_SPU(func) sys_##func, #define COMPAT_SYS_SPU(func) sys_##func,
#define COMPAT_SPU_NEW(func) sys_##func,
#define SYSX_SPU(f, f3264, f32) f, #define SYSX_SPU(f, f3264, f32) f,
#include <asm/systbl.h> #include <asm/systbl.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment