diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-19 13:27:09 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-19 13:27:09 +0000 |
commit | 61f80c8e515dbc4a6cfcfedf824d762482c06afc (patch) | |
tree | 85365a5f78f14333faa0e3e1818502bf6bd9aad9 /libc/sysdeps/linux/bfin/crtn.S | |
parent | f6666438e8783c36e515f03904533d4ff2ea387e (diff) |
- fix sigaction on older kernels (Michael Deutschmann)
In issue #5554 Michael wrote:
The implementation of sigaction on i386 for older kernels makes the system call using an inline asm element with two flaws:
1. The asm is not marked as depending on the kact structure or modifying the koact structure. Thus, GCC is free to assume these structures need not be kept consistent, allowing it to remove all initialization of kact.
2. The asm allows the signal number to be provided as a memory reference. But this allows GCC to provide a stack-relative operand, which will break because the assembler saves %ebx on the stack before using that operand.
1 didn't use to be a problem in practice because GCC 4.2.* didn't seize the optimization opportunity. GCC 4.3.2, however, optimizes out the "kact.sa_flags = act->sa_flags | SA_RESTORER;" line, so that the kernel sees garbage in sa_flags. This can result in the kernel seeing the SA_RESETHAND flag, causing erratic behaviour in signal dependent programs.
2 becomes an issue if "-fomit-frame-pointer" is provided. In uClibc-0.9.29 it isn't, uClibc-0.9.30-rc2 does use the flag by default.
Diffstat (limited to 'libc/sysdeps/linux/bfin/crtn.S')
0 files changed, 0 insertions, 0 deletions