mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
signal: Helpers for faults with specialized siginfo layouts
The helpers added are: send_sig_mceerr force_sig_mceerr force_sig_bnderr force_sig_pkuerr Filling out siginfo properly can ge tricky. Especially for these specialized cases where the temptation is to share code with other cases which use a different subset of siginfo fields. Unfortunately that code sharing frequently results in bugs with the wrong siginfo fields filled in, and makes it harder to verify that the siginfo structure was properly initialized. Provide these helpers instead that get all of the details right, and guarantee that siginfo is properly initialized. send_sig_mceerr and force_sig_mceer are a little special as two si codes BUS_MCEERR_AO and BUS_MCEER_AR both use the same extended signinfo layout. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
f8ec66014f
commit
382467358a
2 changed files with 67 additions and 0 deletions
|
@ -305,6 +305,12 @@ int send_sig_fault(int sig, int code, void __user *addr
|
|||
___ARCH_SI_IA64(int imm, unsigned int flags, unsigned long isr)
|
||||
, struct task_struct *t);
|
||||
|
||||
int force_sig_mceerr(int code, void __user *, short, struct task_struct *);
|
||||
int send_sig_mceerr(int code, void __user *, short, struct task_struct *);
|
||||
|
||||
int force_sig_bnderr(void __user *addr, void __user *lower, void __user *upper);
|
||||
int force_sig_pkuerr(void __user *addr, u32 pkey);
|
||||
|
||||
extern int send_sig_info(int, struct siginfo *, struct task_struct *);
|
||||
extern int force_sigsegv(int, struct task_struct *);
|
||||
extern int force_sig_info(int, struct siginfo *, struct task_struct *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue