From c5cada670bf08d89870dd43ea25419f6ffb27c33 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sat, 16 Oct 2004 19:20:30 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/linkage.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux') 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" -- cgit v1.2.3