From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH v2] track pthread stack guard sizes
Date: Mon, 5 Feb 2018 11:50:45 -0500 [thread overview]
Message-ID: <20180205165045.GX1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <20180205162403.GV1627@brightrain.aerifal.cx>
On Mon, Feb 05, 2018 at 11:24:03AM -0500, Rich Felker wrote:
> On Mon, Feb 05, 2018 at 07:18:44PM +0300, Alexander Monakov wrote:
> > On Fri, 2 Feb 2018, William Pitcock wrote:
> > > --- a/src/internal/pthread_impl.h
> > > +++ b/src/internal/pthread_impl.h
> > > @@ -46,6 +46,7 @@ struct pthread {
> > > char *dlerror_buf;
> > > int dlerror_flag;
> > > void *stdio_locks;
> > > + size_t guard_size;
> > > uintptr_t canary_at_end;
> > > void **dtv_copy;
> > > };
> >
> > Doesn't this break SSP on powerpc and powerpc64 by changing offset of
> > 'canary_at_end'? If not, can you please mention why in the commit message?
>
> The "_at_end" means it's at a fixed negative offset from the end of
> the structure. I already have this patch pending push in my tree, but
> I can add a separate commit commenting the ABI-mandated layout of the
> structure.
Done, pending push. BTW I wonder if we should also add static asserts
for this sort of thing, e.g.
_Static_assert(offsetof(struct pthread, canary_at_end) == sizeof(struct pthread) - 2*sizeof(size_t))
It would probably have to be implemented without actually using the
_Static_assert keyword since we don't depend on a C11 compiler, but of
course the usual tricks apply just fine.
Rich
prev parent reply other threads:[~2018-02-05 16:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 20:08 William Pitcock
2018-02-05 16:18 ` Alexander Monakov
2018-02-05 16:24 ` Rich Felker
2018-02-05 16:50 ` Rich Felker [this message]
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=20180205165045.GX1627@brightrain.aerifal.cx \
--to=dalias@libc.org \
--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).