Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Oct 1999 17:32:12 +0200
From:      Marcel Moolenaar <marcel@scc.nl>
To:        Luoqi Chen <luoqi@watermarkgroup.com>
Cc:        freebsd-current@FreeBSD.ORG, jdp@polstra.com
Subject:   Re: CVSup segfaults identified/solved [PATCH]
Message-ID:  <37FA19FC.7BFE60A3@scc.nl>
References:  <199910051448.KAA19616@lor.watermarkgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:marcel@scc.nl
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:marcel@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37FA19FC.7BFE60A3>