linux-stable/arch/arm64
Mark Brown 7559b7d7d6 arm64/sve: Better handle failure to allocate SVE register storage
Currently we "handle" failure to allocate the SVE register storage by
doing a BUG_ON() and hoping for the best. This is obviously not great and
the memory allocation failure will already be loud enough without the
BUG_ON(). As the comment says it is a corner case but let's try to do a bit
better, remove the BUG_ON() and add code to handle the failure in the
callers.

For the ptrace and signal code we can return -ENOMEM gracefully however
we have no real error reporting path available to us for the SVE access
trap so instead generate a SIGKILL if the allocation fails there. This
at least means that we won't try to soldier on and end up trying to
access the nonexistant state and while it's obviously not ideal for
userspace SIGKILL doesn't allow any handling so minimises the ABI
impact, making it easier to improve the interface later if we come up
with a better idea.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210824153417.18371-1-broonie@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2021-08-24 16:44:30 +01:00
..
boot arm64: move the (z)install rules to arch/arm64/Makefile 2021-08-03 16:19:03 +01:00
configs Additional Qualcomm ARM64 defconfig udpate for v5.14 2021-06-23 19:01:58 -07:00
crypto crypto: arm64 - use a pattern rule for generating *.S files 2021-05-14 19:07:54 +08:00
include arm64: head: avoid over-mapping in map_memory 2021-08-24 16:44:23 +01:00
kernel arm64/sve: Better handle failure to allocate SVE register storage 2021-08-24 16:44:30 +01:00
kvm Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
lib arm64: use __func__ to get function name in pr_err 2021-07-30 16:26:16 +01:00
mm Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" 2021-07-21 11:28:09 +01:00
net Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
tools arm64: Allow mismatched 32-bit EL0 support 2021-06-11 13:25:40 +01:00
xen
Kbuild bpf: Fix BPF_JIT kconfig symbol dependency 2021-05-20 23:48:37 +02:00
Kconfig arm64: Restrict ARM64_BTI_KERNEL to clang 12.0.0 and newer 2021-07-13 16:31:31 +01:00
Kconfig.debug
Kconfig.platforms Merge branch 'arm/fixes' into arm/soc 2021-07-09 10:46:02 -07:00
Makefile arm64: move the (z)install rules to arch/arm64/Makefile 2021-08-03 16:19:03 +01:00