linux-stable/include
Al Viro 97c885d585 x86: signal: don't do sas_ss_reset() until we are certain that sigframe won't be abandoned
Currently we handle SS_AUTODISARM as soon as we have stored the altstack
settings into sigframe - that's the point when we have set the things up
for eventual sigreturn to restore the old settings.  And if we manage to
set the sigframe up (we are not done with that yet), everything's fine.
However, in case of failure we end up with sigframe-to-be abandoned and
SIGSEGV force-delivered.  And in that case we end up with inconsistent
rules - late failures have altstack reset, early ones do not.

It's trivial to get consistent behaviour - just handle SS_AUTODISARM once
we have set the sigframe up and are committed to entering the handler,
i.e.  in signal_delivered().

Link: https://lore.kernel.org/lkml/20200404170604.GN23230@ZenIV.linux.org.uk/
Link: https://github.com/ClangBuiltLinux/linux/issues/876
Link: https://lkml.kernel.org/r/20210422230846.1756380-1-ndesaulniers@google.com
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-07-01 11:06:06 -07:00
..
acpi
asm-generic kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
clocksource
crypto
drm
dt-bindings dt-bindings: connector: Add PD rev 2.0 VDO definition 2021-06-04 11:43:01 +02:00
keys
kunit kunit: make test->lock irq safe 2021-06-29 10:53:46 -07:00
kvm
linux x86: signal: don't do sas_ss_reset() until we are certain that sigframe won't be abandoned 2021-07-01 11:06:06 -07:00
math-emu
media
memory
misc
net net: inline function get_net_ns_by_fd if NET_NS is disabled 2021-06-15 11:00:45 -07:00
pcmcia
ras
rdma
scsi
soc
sound ASoC: Fixes for v5.13 2021-05-25 08:58:01 +02:00
target
trace include/trace/events/vmscan.h: remove mm_vmscan_inactive_list_is_low 2021-06-30 20:47:28 -07:00
uapi mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables 2021-06-30 20:47:30 -07:00
vdso
video
xen xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h 2021-05-14 15:52:05 +02:00