linux/arch/um/kernel
Benjamin Berg cf6d532de4 um: use proper care when taking mmap lock during segfault
[ Upstream commit 6767e8784c ]

Segfaults can occur at times where the mmap lock cannot be taken. If
that happens the segfault handler may not be able to take the mmap lock.

Fix the code to use the same approach as most other architectures.
Unfortunately, this requires copying code from mm/memory.c and modifying
it slightly as UML does not have exception tables.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250408074524.300153-2-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-07-06 11:01:34 +02:00
..
skas Revert "um: work around sched_yield not yielding in time-travel mode" 2025-05-18 08:24:57 +02:00
asm-offsets.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dtb.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-05 14:01:32 +01:00
dyn.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Remove the call to SUBARCH_EXECVE1 macro 2024-09-12 20:42:22 +02:00
exitcode.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Extract load file helper from initrd.c 2021-12-22 20:32:36 +01:00
ioport.c um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
irq.c um: Enable preemption in UML 2024-07-03 17:10:43 +02:00
kmsg_dump.c printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
ksyms.c um: generalize os_rcv_fd 2024-07-03 12:24:25 +02:00
load_file.c um: Extract load file helper from initrd.c 2021-12-22 20:32:36 +01:00
Makefile um: remove copy_from_kernel_nofault_allowed 2025-04-10 14:39:25 +02:00
mem.c um: Update min_low_pfn to match changes in uml_reserved 2025-05-29 11:02:14 +02:00
physmem.c um: Fix potential integer overflow during physmem setup 2024-12-05 14:03:02 +01:00
process.c um: Fix the return value of elf_core_copy_task_fpregs 2024-12-05 14:03:02 +01:00
ptrace.c um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
reboot.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
sigio.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
signal.c um: Drop support for hosts without SYSEMU_SINGLESTEP support 2024-01-04 23:29:11 +01:00
stacktrace.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sysrq.c um: Always dump trace for specified task in show_stack 2024-12-05 14:03:03 +01:00
time.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
tlb.c um: Remove the redundant newpage check in update_pte_range 2024-09-12 20:34:39 +02:00
trap.c um: use proper care when taking mmap lock during segfault 2025-07-06 11:01:34 +02:00
um_arch.c um: Remove unused ncpus variable 2024-07-03 12:21:57 +02:00
um_arch.h um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
umid.c uml: Remove the initialization of statics to 0 2022-09-19 23:10:07 +02:00
uml.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux.lds.S UML: define RUNTIME_DISCARD_EXIT 2023-02-13 10:14:31 +01:00