summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2004-10-16 19:20:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-16 19:20:30 -0700
commitc5cada670bf08d89870dd43ea25419f6ffb27c33 (patch)
tree18fafc925781ad275ca6b161e4615df2e0b2ff70 /include/linux
parent74a82aa978123ad278514ee5553343ff7008b5f7 (diff)
[PATCH] tailcall prevention in sys_wait4() and sys_waitid()
A hack to prevent the compiler from generatin tailcalls in these two functions. With CONFIG_REGPARM=y, the tailcalled code ends up stomping on the syscall's argument frame which corrupts userspace's registers. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/linkage.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 09955c0ce848..338f7795d8a0 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -14,6 +14,10 @@
#define asmlinkage CPP_ASMLINKAGE
#endif
+#ifndef prevent_tail_call
+# define prevent_tail_call(ret) do { } while (0)
+#endif
+
#ifndef __ALIGN
#define __ALIGN .align 4,0x90
#define __ALIGN_STR ".align 4,0x90"