From owner-freebsd-current Tue Oct 5 8:32:43 1999 Delivered-To: freebsd-current@freebsd.org Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20]) by hub.freebsd.org (Postfix) with ESMTP id 51D2D14E6E for ; Tue, 5 Oct 1999 08:32:28 -0700 (PDT) (envelope-from marcel@scc.nl) Received: from [212.238.132.94] (helo=scones.sup.scc.nl) by post.mail.nl.demon.net with esmtp (Exim 2.02 #1) id 11YWZZ-00031W-00; Tue, 5 Oct 1999 15:32:13 +0000 Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.3/8.9.3) with ESMTP id RAA02029; Tue, 5 Oct 1999 17:32:12 +0200 (CEST) (envelope-from marcel@scc.nl) Message-ID: <37FA19FC.7BFE60A3@scc.nl> Date: Tue, 05 Oct 1999 17:32:12 +0200 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.5 i386) X-Accept-Language: en MIME-Version: 1.0 To: Luoqi Chen Cc: freebsd-current@FreeBSD.ORG, jdp@polstra.com Subject: Re: CVSup segfaults identified/solved [PATCH] References: <199910051448.KAA19616@lor.watermarkgroup.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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