linux/arch/um/os-Linux
Benjamin Berg bcf3d957c6 um: refactor TLB update handling
Conceptually, we want the memory mappings to always be up to date and
represent whatever is in the TLB. To ensure that, we need to sync them
over in the userspace case and for the kernel we need to process the
mappings.

The kernel will call flush_tlb_* if page table entries that were valid
before become invalid. Unfortunately, this is not the case if entries
are added.

As such, change both flush_tlb_* and set_ptes to track the memory range
that has to be synchronized. For the kernel, we need to execute a
flush_tlb_kern_* immediately but we can wait for the first page fault in
case of set_ptes. For userspace in contrast we only store that a range
of memory needs to be synced and do so whenever we switch to that
process.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240703134536.1161108-13-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-07-03 17:09:50 +02:00
..
drivers um: Make local functions and variables static 2024-04-22 21:43:03 +02:00
skas um: refactor TLB update handling 2024-07-03 17:09:50 +02:00
elf_aux.c um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
execvp.c um: Allow builds with Clang 2022-03-21 08:13:03 -07:00
file.c um: add mmap/mremap OS calls 2024-07-03 12:24:48 +02:00
helper.c um: Fix naming clash between UML and scheduler 2024-01-04 21:22:27 +01:00
internal.h um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
irq.c um: Remove the unneeded result variable 2023-02-01 22:11:24 +01:00
main.c um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
Makefile kbuild: remove --include-dir MAKEFLAG from top Makefile 2023-02-05 18:51:22 +09:00
mem.c um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
process.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
registers.c um: Remove unused register save/restore functions 2024-01-05 16:28:57 +01:00
sigio.c Revert "um: Use swap() to make code cleaner" 2023-07-27 13:07:03 -07:00
signal.c um: time-travel: fix signal blocking race/hang 2024-07-03 17:09:20 +02:00
start_up.c um: remove LDT support 2024-07-03 17:09:49 +02:00
time.c um: Remove unused timeval_to_ns() function 2022-03-11 10:49:50 +01:00
tty.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
umid.c um: Convert strscpy() usage to 2-argument style 2024-02-20 20:47:32 -08:00
user_syms.c Revert "[PATCH] uml: export symbols added by GCC hardened" 2023-06-15 04:47:04 +09:00
util.c um: Don't use vfprintf() for os_info() 2024-01-04 23:45:17 +01:00