WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel][PATCH][RFC] _chk_fail and _chk canaries for minios and n

To: "George S. Coker, II" <gscoker@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH][RFC] _chk_fail and _chk canaries for minios and newlib
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Mon, 9 Mar 2009 19:13:17 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 09 Mar 2009 11:13:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5DAC535.2AA16%gscoker@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, "George S. Coker, II" <gscoker@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <C5DAC535.2AA16%gscoker@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Hello,

George S. Coker, II, le Mon 09 Mar 2009 13:08:04 -0500, a écrit :
> This patch implements a minios version of the stack_chk_fail from glibc.
> fprintf_chk and sprintf_chk functions have been added to newlib.

Cool!  That'd be useful indeed.  I'm however wondering whether
your patch is enough for the stack protection: in my memory, gcc
assumes that the glibc is used, and on e.g. i386, it uses gs:(0x14)
for the stack canary (see a disassembly of a program compiled with
-fstack-protector-all, there's a mov %gs:0x14,%eax lying in functions),
and as a result we need to define a proper gs in MiniOS that follows
glibc's tcbhead_t.

The fortified printfs should be fine.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel