Integration of ProPolice in FreeBSD
max at love2party.net
Fri Apr 18 17:48:31 UTC 2008
On Friday 18 April 2008 15:27:49 Jeremie Le Hen wrote:
> As you may already know I've integrated GCC's ProPolice into FreeBSD.
> The build infrastructure overlord, namely ru@, (I'm quoting kan@) has
> reviewed the patch and technically it is ready to hit the CVS tree.
> A few things should be discussed beforehand though.
> First, should we build world and/or kernel with SSP by default? I've
> scamped a trivial benchmark back in 2006: timing buildworld with and
> without SSP. You can found the result on my webpage:
> Also, the original ProPolice author achieved a thorough performance
> comparison with and without SSP, and the overhead is really small:
> I would like to reach a consensus on whether SSP should be opt-in or
> opt-out on FreeBSD.
> Another concern that Robert Watson showed back in 2006  when I brought
> forward my patch was the compatibility between pre-SSP and post-SSP
> I'll try to make it simple and short. SSP requires two additional
> symbols that are kindly provided by libc. Any binary or library
> compiled with SSP will require them. As long as your libc contains the
> symbols, you can smoothly run pre-SSP applications with post-SSP libs as
> well as the other way around.
> Also Kris explained  that once applied, it is painful to try to
> revert the change (removing SSP symbols from libc). This is true but
> once the patch gets committed, it should hopefully never happen.
So I'd suggest something along the lines of:
1) Add the needed support symbols to libc (they don't hurt anyone, right?)
2) Add support to build kernel/world with SSP enabled - default OFF.
3) Solicit testing!
4) After some time has passed (and people have had to reinstall libc anyways)
and enough feedback has been received flip the switch to default ON.
In light of the the recent "let's save stack space in the kernel", I'd like to
point out that SSP adds one word to every call. Not much, but still.
Finally, what happens if SSP triggers in the kernel? Do we get a useable
panic message? Can we get a kdb_traceback() (if compiled in)? Where is the
/"\ Best regards, | mlaier at freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier at EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
More information about the freebsd-arch