Module Name: src
Committed By: riastradh
Date: Sat Mar 22 13:28:35 UTC 2025
Modified Files:
src/sys/arch/vax/vax: trap.c
Log Message:
vax: Set tf_psl to PSL_U|PSL_PREVU on exec.
This was previously inherited from the caller, which was not clear
from context, and the trapframe is now zeroed which broke exec on
vax.
PR kern/59084: exec/spawn leaks register content
To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/vax/vax/trap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/vax/vax/trap.c
diff -u src/sys/arch/vax/vax/trap.c:1.140 src/sys/arch/vax/vax/trap.c:1.141
--- src/sys/arch/vax/vax/trap.c:1.140 Sat Mar 22 10:37:19 2025
+++ src/sys/arch/vax/vax/trap.c Sat Mar 22 13:28:35 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.140 2025/03/22 10:37:19 hans Exp $ */
+/* $NetBSD: trap.c,v 1.141 2025/03/22 13:28:35 riastradh Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -28,7 +28,7 @@
/* All bugs are subject to removal without further notice */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.140 2025/03/22 10:37:19 hans Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.141 2025/03/22 13:28:35 riastradh Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -379,6 +379,7 @@ setregs(struct lwp *l, struct exec_packa
tf->tf_r7 = 0; /* for ELF */
tf->tf_r8 = 0; /* for ELF */
tf->tf_r9 = l->l_proc->p_psstrp; /* for ELF */
+ tf->tf_psl = PSL_U|PSL_PREVU;
}