Luoqi Chen wrote:

> > o  restoring %gs is now handled in the proper sigreturn.
> 
> Restoration of %gs should not be in the kernel because it comes from
> user application and maybe invalid, if you restore it inside the kernel
> it could be fatal to the whole system, and on the other hand just a core
> dump if done in the trampoline code which is still in user mode.

Hmmm... What if the application passes a (possibly handcrafted)
sigcontext to an explicit call to sigreturn. %gs should be restored in
that case too, right?

Isn't it therefore better to have %gs in the trapframe?

-- 
Marcel Moolenaar                        mailto:[EMAIL PROTECTED]
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to