Date: Thu, 22 Feb 2001 15:16:41 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Mark Murray <mark@grondar.za> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 trap.c Message-ID: <XFMail.010222151641.jhb@FreeBSD.org> In-Reply-To: <200102222128.f1MLSS119499@gratis.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22-Feb-01 Mark Murray wrote: >> The p_md.md_regs member of proc is used in signal handling to reference >> the the original trapframe of the syscall, trap, or interrupt that entered >> the kernel. Before SMPng, ast's were handled via a psuedo trap at the >> end of doerti. With the SMPng commit, ast's were broken out into a >> separate ast() function that was called from doreti to match the behavior >> of other architectures. Unfortunately, when this was done, the >> p_md.md_regs member of curproc was not updateda in ast(), thus when >> signals are handled by userret() after an interrupt that returns to >> userland, we end up using a stale trapframe that will result in the >> registers from the old trapframe overwriting the real trapframe and >> smashing all the registers right before we return to usermode. The saved >> %cs:%eip from where we were in usermode are saved in the trapframe for >> example. > > Does this fix any intersting panics? I have a (patched) kernel that > panics (GPF) in doreti. Is this inspired by anything of that ilk? I'm not sure.. :-/ It might. > M > -- > Mark Murray > Warning: this .sig is umop ap!sdn -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010222151641.jhb>