Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9783
b: refs/heads/master
c: d347f37
h: refs/heads/master
i:
  9781: b36532e
  9779: 3a64599
  9775: 034cb96
v: v3
  • Loading branch information
Markus F.X.J. Oberhumer authored and Linus Torvalds committed Oct 10, 2005
1 parent c74aded commit f404861
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 867f8b4e47a17c5d68c98dc6eee12739c4490056
refs/heads/master: d347f372273c2b3d86a66e2e1c94c790c208e166
6 changes: 5 additions & 1 deletion trunk/arch/i386/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
esp = (unsigned long) ka->sa.sa_restorer;
}

return (void __user *)((esp - frame_size) & -8ul);
esp -= frame_size;
/* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0. */
esp = ((esp + 4) & -16ul) - 4;
return (void __user *) esp;
}

/* These symbols are defined with the addresses in the vsyscall page.
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/x86_64/ia32/ia32_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,11 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
rsp = (unsigned long) ka->sa.sa_restorer;
}

return (void __user *)((rsp - frame_size) & -8UL);
rsp -= frame_size;
/* Align the stack pointer according to the i386 ABI,
* i.e. so that on function entry ((sp + 4) & 15) == 0. */
rsp = ((rsp + 4) & -16ul) - 4;
return (void __user *) rsp;
}

int ia32_setup_frame(int sig, struct k_sigaction *ka,
Expand Down

0 comments on commit f404861

Please sign in to comment.