Commit 5a1b98d3 authored by Al Viro's avatar Al Viro

new helper: sigsp()

Normal logics for altstack handling in sigframe allocation
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2ce5da17
...@@ -2305,6 +2305,17 @@ static inline int sas_ss_flags(unsigned long sp) ...@@ -2305,6 +2305,17 @@ static inline int sas_ss_flags(unsigned long sp)
: on_sig_stack(sp) ? SS_ONSTACK : 0); : on_sig_stack(sp) ? SS_ONSTACK : 0);
} }
static inline unsigned long sigsp(unsigned long sp, struct ksignal *ksig)
{
if (unlikely((ksig->ka.sa.sa_flags & SA_ONSTACK)) && ! sas_ss_flags(sp))
#ifdef CONFIG_STACK_GROWSUP
return current->sas_ss_sp;
#else
return current->sas_ss_sp + current->sas_ss_size;
#endif
return sp;
}
/* /*
* Routines for handling mm_structs * Routines for handling mm_structs
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment