sw64: fix setup_rt_frame for non SA_SIGINFO
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56YJ1 -------------------------------- Original implementation has deprecated sigframe and always use rt_sigframe for signal handler. But glibc remain unchanged, where handler takes $a2 as sigcontext pointer when SA_SIGINFO is not set and compatibility is break. As on sw64, SA_SIGINFO is not only a flag to specify sa_sigaction but also a flag to specify rt_sigframe and rt_sigreturn. It used to setup old sigframe and specify sigreturn for handler if SA_SIGINFO is not set. To maintain compatibility, this patch set $a1 with exception code and and set $a2 with sigcontext pointer in that case, which seems a mix of modern rt_sigframe and traditional sigframe. Actually, it is unnecessary to setup rt_sigframe for non SA_SIGINFO handler, because a rt_sigframe is larger than sigframe. Maybe the old sigframe will be reverted some day. Signed-off-by: NHe Sheng <hesheng@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录