Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Set PSTATE.PRIV for user process
I need to look at the privileged window state registers from a user
process. Does anyone know a trick to make user process run in
privileged mode? I tried adding this to setregs() but the kernel panics
on boot.
--- src/sys/arch/sparc64/sparc64/machdep.c.orig 2026-10-22 13:37:38.654106788 +0100
+++ src/sys/arch/sparc64/sparc64/machdep.c 2026-10-22 13:38:02.620671360 +0100
@@ -267,6 +267,7 @@
break;
}
#endif
+ pstate |= PSTATE_PRIV;
tstate = ((int64_t)ASI_PRIMARY_NO_FAULT << TSTATE_ASI_SHIFT) |
(pstate << TSTATE_PSTATE_SHIFT) | (tf->tf_tstate & TSTATE_CWP);
if ((fs = l->l_md.md_fpstate) != NULL) {
Home |
Main Index |
Thread Index |
Old Index