mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: -fno-stack-protector and musl
Date: Mon, 21 Oct 2013 11:32:04 -0400	[thread overview]
Message-ID: <20131021153203.GR20515@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAHcXnBGZ5vLvOXNRHC9xuMd2KMmv_09G3pjKgDSPpQNtCfVO9g@mail.gmail.com>

On Mon, Oct 21, 2013 at 11:20:06PM +0800, Christopher Meng wrote:
> Hi all,
> 
> I'm going to package this c lib into Fedora for skalibs. However
> Fedora forces us to package every pkg with optflags inserted:

I can assure you glibc is not compiled with stack protector either, so
there are exceptions to this policy. :) You should just cite such an
exception.

It's my long-term goal to support compiling musl itself with stack
protector, but this is dependent on groundwork in two areas:

1. There needs to be a way to force stack protector off in at least a
   few files which are needed for early initialization, before the
   canary is available. This needs build system support and call tree
   analysis of what files need such special handling.

2. Since the canary is stored at a fixed offset from the thread
   pointer, the thread pointer must always be initialized when ssp is
   used. This is handled correctly now (modulo one gcc bug) for apps
   and libs that use ssp, but not for libc-internal use. In the 1.1
   series I plan to make the thread pointer always-initialized.

I expect the resolution of this issue somewhere in the early to mid
1.1 series. For what it's worth, we're no worse than glibc in this
regard right now, and hope to be better in the future.

Rich


  reply	other threads:[~2013-10-21 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 15:20 Christopher Meng
2013-10-21 15:32 ` Rich Felker [this message]
2013-10-21 15:39   ` Christopher Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131021153203.GR20515@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).