diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-09 07:29:01 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-09 07:29:01 +0000 |
commit | 7c39e7eb9d02a4350f387096c98e25e4096ebfc3 (patch) | |
tree | 4fc81f7a16a2971f44e7b7d9dd0160fbf061465d /sys/arch/i386 | |
parent | 163e621a2980bfdad3947546dae7b9d31fafb686 (diff) |
Fix boot -d. refreshcreds() should be called when trapping from userspace,
but I flipped the test on i386/amd64, thus breaking kernel traps before
enough proc0 bits were set up. In theory, this could have resulted in
a NFS read for a page fault being done with a process's old credentials.
pointed out by Patrick Wildt of bitrig
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/trap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 4454ae00b00..c291d221983 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.116 2014/05/11 00:12:44 guenther Exp $ */ +/* $OpenBSD: trap.c,v 1.117 2014/07/09 07:29:00 guenther Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ /*- @@ -155,8 +155,8 @@ trap(struct trapframe *frame) if (!KERNELMODE(frame->tf_cs, frame->tf_eflags)) { type |= T_USER; p->p_md.md_regs = frame; - } else if (type != T_NMI) refreshcreds(p); + } switch (type) { |