]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[CVE-2009-0029] powerpc: Enable syscall wrappers for 64-bit
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Jan 2009 13:14:00 +0000 (14:14 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 14 Jan 2009 13:15:17 +0000 (14:15 +0100)
This enables the use of syscall wrappers to do proper sign extension
for 64-bit programs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/powerpc/Kconfig
include/linux/syscalls.h

index 84b861316ce78b65f90febaf44227d3ffed37c83..e39b73bc0ff8e2075a710878c3d81c055c68b4cb 100644 (file)
@@ -123,6 +123,7 @@ config PPC
        select HAVE_DMA_ATTRS if PPC64
        select USE_GENERIC_SMP_HELPERS if SMP
        select HAVE_OPROFILE
+       select HAVE_SYSCALL_WRAPPERS if PPC64
 
 config EARLY_PRINTK
        bool
index 0bb537d7ba2e3db514efeae1745e98e3aad50eb1..90aa5eba87a2d45b865df08c84567ee9a0bd80e1 100644 (file)
@@ -103,8 +103,14 @@ struct old_linux_dirent;
 #define SYSCALL_DEFINE5(...)    SYSCALL_DEFINEx(5, __VA_ARGS__)
 #define SYSCALL_DEFINE6(...)    SYSCALL_DEFINEx(6, __VA_ARGS__)
 
+#ifdef CONFIG_PPC64
+#define SYSCALL_ALIAS(alias, name)                                     \
+       asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n"      \
+            "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
+#else
 #define SYSCALL_ALIAS(alias, name)                                     \
        asm ("\t.globl " #alias "\n\t.set " #alias ", " #name)
+#endif
 
 #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS