All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.1] ms/um: Set parent death signal for userspace process
@ 2026-10-27 20:51 Eva Kurchatova
  2026-10-29 16:58 ` Konstantin Khorenko
  0 siblings, 1 reply; 2+ messages in thread
From: Eva Kurchatova @ 2026-10-27 20:51 UTC (permalink / raw)
  To: khorenko; +Cc: devel

Enable PR_SET_PDEATHSIG so that the UML userspace process will be killed
when the kernel exits unexpectedly.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20240919124511.282088-4-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 801e00d3a1b78b7f71675fae79946ff4aa3ee070)

Rebase note: this tree lacks upstream 32e8eaf263d9 ("um: use execveat to
create userspace MMs"), so the userspace process is still cloned and set
up in userspace_tramp() rather than in the stub executable; the parent
death signal is set there, through os_set_pdeathsig() as mainline does
for the winch thread.

Without it, the userspace processes of the mms still alive when the
kernel halts lose their tracer, fault in the stub and dump core: every
KUnit run of the User Mode Linux kernel leaves "linux killed by SIGSEGV"
core dumps, which fail the exit check of the hci-kunit CI test.

https://virtuozzo.atlassian.net/browse/VSTOR-143633
Feature: fix ms/um

Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 arch/um/os-Linux/skas/process.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index b6f656bcffb1..cca016b0b29b 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -214,6 +214,9 @@ static int userspace_tramp(void *stack)
 				     (unsigned long) stub_segv_handler -
 				     (unsigned long) __syscall_stub_start;
 
+	/* Make sure this process dies if the kernel dies */
+	os_set_pdeathsig();
+
 	ptrace(PTRACE_TRACEME, 0, 0, 0);
 
 	signal(SIGTERM, SIG_DFL);
-- 
2.56.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-29 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 20:51 [Devel] [PATCH hci-8.1] ms/um: Set parent death signal for userspace process Eva Kurchatova
2026-10-29 16:58 ` Konstantin Khorenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.