linux-stable/arch/arm64
Catalin Marinas 4f4c549feb arm64: mte: Avoid the racy walk of the vma list during core dump
The MTE coredump code in arch/arm64/kernel/elfcore.c iterates over the
vma list without the mmap_lock held. This can race with another process
or userfaultfd concurrently modifying the vma list. Change the
for_each_mte_vma macro and its callers to instead use the vma snapshot
taken by dump_vma_snapshot() and stored in the cprm object.

Fixes: 6dd8b1a0b6 ("arm64: mte: Dump the MTE tags in the core file")
Cc: <stable@vger.kernel.org> # 5.18.x
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Seth Jenkins <sethjenkins@google.com>
Suggested-by: Seth Jenkins <sethjenkins@google.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20221222181251.1345752-4-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2023-01-05 15:12:12 +00:00
..
boot remoteproc updates for v6.2 2022-12-21 09:37:14 -08:00
configs arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl 2022-11-30 17:49:05 +01:00
crypto crypto: arm64/ghash-ce - use frame_push/pop macros consistently 2022-12-09 18:45:00 +08:00
hyperv hyperv: simplify and rename generate_guest_id 2022-09-28 13:36:56 +00:00
include arm64/mm: add pud_user_exec() check in pud_user_accessible_page() 2023-01-05 15:05:22 +00:00
kernel arm64: mte: Avoid the racy walk of the vma list during core dump 2023-01-05 15:12:12 +00:00
kvm ARM64: 2022-12-15 11:12:21 -08:00
lib Merge branch 'for-next/sysregs' into for-next/core 2022-12-06 11:32:25 +00:00
mm arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
net bpf: Remove prog->active check for bpf_lsm and bpf_iter 2022-10-25 23:11:46 -07:00
tools Revert "arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption" 2022-12-15 17:59:12 +00:00
xen
Kbuild
Kconfig arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
Kconfig.debug
Kconfig.platforms arm64: renesas: Drop selecting GPIOLIB and PINCTRL 2022-10-28 14:31:24 +02:00
Makefile Merge branch 'for-next/ftrace' into for-next/core 2022-12-06 11:07:39 +00:00