Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 2008 16:37:06 +0200
From:      "Antoine Brodin" <antoine@FreeBSD.org>
To:        "Jeremie Le Hen" <jeremie@le-hen.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Integration of ProPolice in FreeBSD
Message-ID:  <f19c444a0804180737h6dda663fxae9d6d4e709cae20@mail.gmail.com>
In-Reply-To: <20080418132749.GB4840@obiwan.tataz.chchile.org>
References:  <20080418132749.GB4840@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 18, 2008 at 3:27 PM, Jeremie Le Hen <jeremie@le-hen.org> wrote:
> Hi,
>
>  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:
>     http://tataz.chchile.org/~tataz/FreeSBD/SSP/#section1
>  Also, the original ProPolice author achieved a thorough performance
>  comparison with and without SSP, and the overhead is really small:
>     http://www.trl.ibm.com/projects/security/ssp/node5.html
>  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 [1] when I brought
>  forward my patch was the compatibility between pre-SSP and post-SSP
>  binaries/libraries.
>
>  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 [2] 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.
>
>  [1] http://lists.freebsd.org/pipermail/freebsd-security/2006-May/003751.html
>  [2] http://lists.freebsd.org/pipermail/freebsd-security/2006-May/003752.html

Last time I looked at your patch, there was a problem when using
-fstack-protector-all instead of -fstack-protector:
when you compile lib/csu/*, gnu/lib/csu/*, or
src/lib/libc/sys/stack_protector.c with this flag, there is a kind of
chicken/egg problem and you end up with an unusable world.
That said, it would be great to be able to compile world with SSP when
an option is set in src.conf.

Cheers,

Antoine



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