signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 16 Apr 2018 18:55:53 +0000 (13:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:49:56 +0000 (14:49 +0100)
commitbce5c4c3038cd26e7d7f00dd702aedefae6542a3
treedd9d2d62d2f153989c6d27d65f41ce00ed9eab97
parent2b58d5c2db6828c18bfb412ed376b9b535cbf9d1
signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn

[ Upstream commit b92adb74adde62d9a9780ff2977d63dcb21aeaa6 ]

The ia64 handling of failure to return from a signal frame has been trying
to set overlapping fields in struct siginfo since 2.3.43.  The si_code
corresponds to the fields that were stomped (not the field that is
actually written), so I can not imagine a piece of userspace code
making sense of the signal frame if it looks closely.

In practice failure to return from a signal frame is a rare event that
almost never happens.  Someone using an alternate signal stack to
recover and looking in detail is even more rare.  So I presume no one
has ever noticed and reported this ia64 nonsense.

Sort this out by causing ia64 to use force_sig(SIGSEGV) like other architectures.

Fixes: 2.3.43
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/ia64/kernel/signal.c