Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2008 11:49:17 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        Antoine Brodin <antoine@freebsd.org>, freebsd-arch@freebsd.org
Subject:   Re: Integration of ProPolice in FreeBSD
Message-ID:  <200804231149.17560.jhb@freebsd.org>
In-Reply-To: <20080423143356.GQ92168@obiwan.tataz.chchile.org>
References:  <20080418132749.GB4840@obiwan.tataz.chchile.org> <200804230934.42497.jhb@freebsd.org> <20080423143356.GQ92168@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 23 April 2008 10:33:56 am Jeremie Le Hen wrote:
> > Does GCC provide an attribute that can be applied to a function to disable 
> > stack protection?  We could explicitly disable it for the few functions 
> > (mi_startup(), initi386(), etc.) on the call path to mi_startup().
> 
> Sorry, I should have mentionned that I've already skimmed over gcc info
> page and then asked on #gcc on FreeNode for such an atttribute, but
> there isn't:
> 
> % 22:16 < Guilt> there are a lot of problems in enabling/disabling
> % fstack-protector in the mid of the program
> % 22:16 < Guilt> one is that specs for libssp are taken from the driver
> % program
> % 22:17 < Guilt> not the compiler (cc1) and it's not possible to
> % arbitrarily enable/disable those
> 
> Ultimately those functions should be moved into separate compilation
> units.  Maybe the current layout is sufficient, I don't know.  Would you
> please give me some hint about the functions that must not be protected?
> Maybe all the MD stuff?

Well, we never return from mi_startup() (the last SYSINIT() calls scheduler() 
where thread0 runs for the rest of its life).  I'm not sure how the ssp stuff 
works, but if it happens on return from the function, then given that you are 
probably just fine as it is?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804231149.17560.jhb>