Setting si_code to __SI_FAULT results in a userspace seeing
an si_code of 0. This is the same si_code as SI_USER. Posix
and common sense requires that SI_USER not be a signal specific
si_code. As such this use of 0 for the si_code is a pretty
horribly broken ABI.
Given that alpha is on it's last legs I don't know that it is worth
fixing this, but it is worth documenting what is going on so that
no one decides to copy this bad decision.
This was introduced during the 2.5 development cycle so this
mess has had a long time for people to be able to depend upon it.
v2: Added FPE_FIXME for alpha as Helge Deller<deller@xxxxxx> pointed out
with his alternate patch one of the cases is SIGFPE not SIGTRAP.
Cc: Helge Deller<deller@xxxxxx>
Cc: Richard Henderson<rth@xxxxxxxxxxx>
Cc: Ivan Kokshaysky<ink@xxxxxxxxxxxxxxxxxxxx>
Cc: Matt Turner<mattst88@xxxxxxxxx>
Cc:linux-alpha@xxxxxxxxxxxxxxx
History Tree:https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Ref: 0a635c7a84cf ("Fill in siginfo_t.")
Signed-off-by: "Eric W. Biederman"<ebiederm@xxxxxxxxxxxx>
---
arch/alpha/include/uapi/asm/siginfo.h | 14 ++++++++++++++
arch/alpha/kernel/traps.c | 6 +++---
2 files changed, 17 insertions(+), 3 deletions(-)