diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2017-06-26 13:38:04 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2017-07-19 19:12:40 -0500 |
commit | e2bd64d92a10f34b425cf3884c6032588c661335 (patch) | |
tree | 90f24141f21a30317cacd635fba3a6e0e571ed00 /arch/alpha/include | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) | |
download | op-kernel-dev-e2bd64d92a10f34b425cf3884c6032588c661335.zip op-kernel-dev-e2bd64d92a10f34b425cf3884c6032588c661335.tar.gz |
signal/alpha: Document a conflict with SI_USER for SIGTRAP
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@gmx.de> pointed out
with his alternate patch one of the cases is SIGFPE not SIGTRAP.
Cc: Helge Deller <deller@gmx.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Acked-by: Richard Henderson <rth@twiddle.net>
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@xmission.com>
Diffstat (limited to 'arch/alpha/include')
-rw-r--r-- | arch/alpha/include/uapi/asm/siginfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/alpha/include/uapi/asm/siginfo.h b/arch/alpha/include/uapi/asm/siginfo.h index 9822362..972f547 100644 --- a/arch/alpha/include/uapi/asm/siginfo.h +++ b/arch/alpha/include/uapi/asm/siginfo.h @@ -6,4 +6,18 @@ #include <asm-generic/siginfo.h> +/* + * SIGFPE si_codes + */ +#ifdef __KERNEL__ +#define FPE_FIXME (__SI_FAULT|0) /* Broken dup of SI_USER */ +#endif /* __KERNEL__ */ + +/* + * SIGTRAP si_codes + */ +#ifdef __KERNEL__ +#define TRAP_FIXME (__SI_FAULT|0) /* Broken dup of SI_USER */ +#endif /* __KERNEL__ */ + #endif |