x32: fix sigreturn decoding

* linux/x32/arch_sigreturn.c: Implement x32_rt_sigreturn decoding.
* linux/x86_64/arch_sigreturn.c: Handle (current_personality == 0)
case only.
Include "x32/arch_sigreturn.c" instead of "i386/arch_sigreturn.c".
This commit is contained in:
Дмитрий Левин 2015-11-27 03:34:23 +00:00
parent bdb07e38dd
commit 26207512e2
2 changed files with 17 additions and 3 deletions

View File

@ -1 +1,15 @@
#include "x86_64/arch_sigreturn.c"
if (current_personality != 1) {
typedef struct {
uint32_t flags, link, stack[3], pad;
struct sigcontext mcontext;
} ucontext_x32_header;
const unsigned long addr =
(unsigned long) *x86_64_rsp_ptr +
sizeof(ucontext_x32_header);
tprints("{mask=");
print_sigset_addr_len(tcp, addr, NSIG / 8);
tprints("}");
return;
}
#include "i386/arch_sigreturn.c"

View File

@ -1,4 +1,4 @@
if (current_personality != 1) {
if (current_personality == 0) {
const unsigned long addr =
(unsigned long) *x86_64_rsp_ptr +
offsetof(struct ucontext, uc_sigmask);
@ -7,4 +7,4 @@ if (current_personality != 1) {
tprints("}");
return;
}
#include "i386/arch_sigreturn.c"
#include "x32/arch_sigreturn.c"