[PATCH 9/9] um: Add initial SMP support

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie Add initial symmetric multi-processing (SMP) support to UML. With this support, it is now possible for users to tell UML to start multiple virtual CPUs, each represented as a separate host thread. In UML, kthreads and normal threads (when running in kernel mode) can be scheduled

[PATCH 8/9] um: Support directing IO signals to calling thread

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie Extend os_set_fd_async() to allow the calling thread to direct I/O availability signals to itself. After this change, existing users will explicitly direct these signals to the CPU0 thread, which was achieved by ignoring SIGIO in helper threads. This is a preparation for adding SM

[PATCH 7/9] um: Define timers on a per-CPU basis

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie Define timers on a per-CPU basis to enable each CPU to have its own timer. This is a preparation for adding SMP support. Signed-off-by: Tiwei Bie --- arch/um/include/linux/time-internal.h | 3 ++ arch/um/include/shared/os.h | 6 +-- arch/um/kernel/irq.c

[PATCH 6/9] um: Determine sleep based on need_resched()

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie With SMP and NO_HZ enabled, the CPU may still need to sleep even if the timer is disarmed. Switch to deciding whether to sleep based on pending resched. This is a preparation for adding SMP support. Signed-off-by: Tiwei Bie --- arch/um/include/shared/kern_util.h | 1 + arch/um

[PATCH 2/9] um: Remove unused cpu_data and current_cpu_data macros

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie These two macros have no users. Remove them. Signed-off-by: Tiwei Bie --- arch/um/include/asm/processor-generic.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index 8a789c17acd8..236fdfd7

[PATCH 0/9] um: Add SMP support

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie This series adds initial symmetric multi-processing (SMP) support to UML. With this support, users can tell UML to start multiple virtual CPUs, each represented as a separate host thread. In UML, kthreads and normal threads (when running in kernel mode) can be scheduled and execu

[PATCH 3/9] um: vdso: Implement __vdso_getcpu() via syscall

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie We are going to support SMP in UML, so we can not hard code the CPU and NUMA node in __vdso_getcpu() anymore. Signed-off-by: Tiwei Bie --- arch/x86/um/vdso/um_vdso.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/x86/um/vdso/um_vdso

[PATCH 5/9] um: Turn signals_* into thread-local variables

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie Turn signals_enabled, signals_pending and signals_active into thread-local variables. This enables us to control and track signals independently on each CPU thread. This is a preparation for adding SMP support. Signed-off-by: Tiwei Bie --- arch/um/include/asm/irqflags.h | 4

[PATCH 1/9] um: Stop tracking virtual CPUs via mm_cpumask()

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie In UML, each user address space is represented as a separate stub process on the host. Therefore, user address spaces do not require TLB management on UML virtual CPUs, and it's unnecessary to track which virtual CPUs they have executed on. Signed-off-by: Tiwei Bie --- arch/um/

[PATCH 4/9] um: Preserve errno within signal handler

2025-07-26 Thread Tiwei Bie
From: Tiwei Bie We rely on errno to determine if a syscall has failed. However, the current signal handler may modify errno. Preserve errno within the signal handler to ensure it remains async-signal safe. Signed-off-by: Tiwei Bie --- arch/um/os-Linux/signal.c | 3 +++ 1 file changed, 3 insert

[GIT PULL] execve updates for v6.17

2025-07-26 Thread Kees Cook
Hi Linus, Please pull these execve updates for v6.17. Note that while the REGSET macro changes touch all the architectures, they are fairly mechanical and have been in linux-next for almost the entire development window. Thanks! -Kees The following changes since commit e04c78d86a9699d136910cfc0

[PATCH] um: Don't mark stack executable

2025-07-26 Thread Richard Weinberger
On one of my machines UML failed to start after enabling SELinux. UML failed to start because SELinux's execmod rule denies executable pages on a modified file mapping. Historically UML marks it's stack rwx. AFAICT, these days this is no longer needed, so let's remove PROT_EXEC. Signed-off-by: Ri