diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2004-07-12 21:02:33 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-12 21:02:33 -0700 |
| commit | 407323e68052289a4bdf7788c3062d114d8a2ebd (patch) | |
| tree | 2771bc20e7ed0de73e2afd73560cf39b0c536d59 /include | |
| parent | de9c4ad800ffed7236cd4118b1cf116203854ef4 (diff) | |
[PATCH] sparse: signal annotation
ss_sp in struct sigaltstack made __user
->si_addr and ->sival_ptr made __user
your ->sa_restorer and ->sa_handler changes propagated
users of these guys annotated on i386/amd64/alpha/sparc/sparc64
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/signal.h | 12 | ||||
| -rw-r--r-- | include/asm-generic/siginfo.h | 4 | ||||
| -rw-r--r-- | include/asm-sparc64/signal.h | 11 | ||||
| -rw-r--r-- | include/asm-x86_64/signal.h | 10 | ||||
| -rw-r--r-- | include/asm-x86_64/vsyscall32.h | 4 |
5 files changed, 27 insertions, 14 deletions
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 37f1742ff584..25f98bc5576f 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h @@ -128,7 +128,11 @@ typedef unsigned long sigset_t; #define SIG_SETMASK 3 /* for setting the signal mask */ /* Type of a signal handler. */ -typedef void (*__sighandler_t)(int); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; + +typedef void __restorefn_t(void); +typedef __restorefn_t __user *__sigrestore_t; #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ @@ -149,7 +153,7 @@ struct sigaction { struct k_sigaction { struct sigaction sa; - void (*ka_restorer)(void); + __sigrestore_t ka_restorer; }; #else /* Here we must cater to libcs that poke about in kernel headers. */ @@ -169,7 +173,7 @@ struct sigaction { #endif /* __KERNEL__ */ typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; @@ -179,7 +183,7 @@ typedef struct sigaltstack { implemented here for OSF/1 compatibility. */ struct sigstack { - void *ss_sp; + void __user *ss_sp; int ss_onstack; }; diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index fe02b1a4d286..f757d2d51e7f 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h @@ -6,7 +6,7 @@ typedef union sigval { int sival_int; - void *sival_ptr; + void __user *sival_ptr; } sigval_t; /* @@ -78,7 +78,7 @@ typedef struct siginfo { /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ struct { - void *_addr; /* faulting insn/memory ref. */ + void __user *_addr; /* faulting insn/memory ref. */ #ifdef __ARCH_SI_TRAPNO int _trapno; /* TRAP # which caused the signal */ #endif diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index 1673945ea5a1..de2bb39b8b59 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h @@ -186,9 +186,14 @@ struct sigstack { /* Type of a signal handler. */ #ifdef __KERNEL__ -typedef void (*__sighandler_t)(int, struct sigcontext *); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; + +typedef void __restorefn_t(void); +typedef __restorefn_t __user *__sigrestore_t; #else typedef void (*__sighandler_t)(int); +typedef void (*__sigrestore_t)(void); #endif #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ @@ -198,7 +203,7 @@ typedef void (*__sighandler_t)(int); struct __new_sigaction { __sighandler_t sa_handler; unsigned long sa_flags; - void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ + __sigrestore_t sa_restorer; /* not used by Linux/SPARC yet */ __new_sigset_t sa_mask; }; @@ -233,7 +238,7 @@ struct __old_sigaction32 { #endif typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index 21c4bf716666..643a20d73765 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h @@ -136,7 +136,11 @@ typedef unsigned long sigset_t; #ifndef __ASSEMBLY__ /* Type of a signal handler. */ -typedef void (*__sighandler_t)(int); +typedef void __signalfn_t(int); +typedef __signalfn_t __user *__sighandler_t; + +typedef void __restorefn_t(void); +typedef __restorefn_t __user *__sigrestore_t; #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ @@ -145,7 +149,7 @@ typedef void (*__sighandler_t)(int); struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; - void (*sa_restorer)(void); + __sigrestore_t sa_restorer; sigset_t sa_mask; /* mask last for extensibility */ }; @@ -154,7 +158,7 @@ struct k_sigaction { }; typedef struct sigaltstack { - void *ss_sp; + void __user *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/include/asm-x86_64/vsyscall32.h b/include/asm-x86_64/vsyscall32.h index c44a49d4334a..c631c082f8f7 100644 --- a/include/asm-x86_64/vsyscall32.h +++ b/include/asm-x86_64/vsyscall32.h @@ -13,8 +13,8 @@ #define VSYSCALL32_VSYSCALL ((void *)VSYSCALL32_BASE + 0x400) #define VSYSCALL32_SYSEXIT ((void *)VSYSCALL32_BASE + 0x410) -#define VSYSCALL32_SIGRETURN ((void *)VSYSCALL32_BASE + 0x500) -#define VSYSCALL32_RTSIGRETURN ((void *)VSYSCALL32_BASE + 0x600) +#define VSYSCALL32_SIGRETURN ((void __user *)VSYSCALL32_BASE + 0x500) +#define VSYSCALL32_RTSIGRETURN ((void __user *)VSYSCALL32_BASE + 0x600) #endif #endif |
