Date: Sat, 7 Aug 2004 04:32:20 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 59061 for review Message-ID: <200408070432.i774WKfs044663@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=59061 Change 59061 by davidxu@davidxu_alona on 2004/08/07 04:31:33 Buggy debugger tries to change prilivege bits, just ignore it. Affected files ... .. //depot/projects/davidxu_ksedbg/src/sys/amd64/amd64/machdep.c#8 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/sys/amd64/amd64/machdep.c#8 (text+ko) ==== @@ -1348,11 +1348,14 @@ { struct pcb *pcb; struct trapframe *tp; + register_t rflags; tp = td->td_frame; - if (!EFL_SECURE(regs->r_rflags, tp->tf_rflags) || - !CS_SECURE(regs->r_cs)) + if (!CS_SECURE(regs->r_cs)) return (EINVAL); + + rflags = (regs->r_rflags & PSL_USERCHANGE) | + (tp->tf_rflags & ~PSL_USERCHANGE); tp->tf_r15 = regs->r_r15; tp->tf_r14 = regs->r_r14; tp->tf_r13 = regs->r_r13; @@ -1370,7 +1373,7 @@ tp->tf_rax = regs->r_rax; tp->tf_rip = regs->r_rip; tp->tf_cs = regs->r_cs; - tp->tf_rflags = regs->r_rflags; + tp->tf_rflags = rflags; tp->tf_rsp = regs->r_rsp; tp->tf_ss = regs->r_ss; pcb = td->td_pcb;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408070432.i774WKfs044663>