From: "Carlos O'Donell" <carlos@redhat.com>
To: Will Newton <will.newton@linaro.org>
Cc: libc-ports@sourceware.org, patches@linaro.org
Subject: Re: [PATCH] ARM: Add pointer guard support.
Date: Thu, 26 Sep 2013 15:02:00 -0000 [thread overview]
Message-ID: <52444C90.5070307@redhat.com> (raw)
In-Reply-To: <5242A79D.1030709@linaro.org>
On 09/25/2013 05:06 AM, Will Newton wrote:
>
> Add support for pointer mangling in glibc internal structures in C
> and assembler code.
>
> Tested on armv7 with hard and soft thread pointers.
>
> ports/ChangeLog.arm:
>
> 2013-09-24 Will Newton <will.newton@linaro.org>
>
> * sysdeps/arm/__longjmp.S (__longjmp): Demangle fp, sp
> and lr when restoring register values.
> * sysdeps/arm/include/bits/setjmp.h (JMP_BUF_REGLIST): Remove
> sp and lr from list and replace fp with a4.
> * sysdeps/arm/jmpbuf-unwind.h (_jmpbuf_sp): New function.
> (_JMPBUF_UNWINDS_ADJ): Call _jmpbuf_sp.
> * sysdeps/arm/nptl/tcb-offsets.sym: Add POINTER_GUARD.
> * sysdeps/arm/nptl/tls.h (tcbhead_t): Remove private and add
> pointer_guard. (THREAD_GET_POINTER_GUARD): New macro.
> (THREAD_SET_POINTER_GUARD): New macro.
> (THREAD_COPY_POINTER_GUARD): New macro.
> * sysdeps/arm/setjmp.S (__sigsetjmp): Mangle fp, sp and lr
> before storing register values.
> * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE): New macro.
> (PTR_DEMANGLE): Likewise. (PTR_MANGLE2): Likewise.
> (PTR_DEMANGLE2): Likewise.
As of the fix for CVE-2013-4788 (bug 15754) there is now a
regression test that ensures the pointer guard varies with
each process and is indeed somewhat variable.
You will need to provide your own stackguard-macros.h file
with the appropriate macros including POINTER_CHK_GUARD
to allow tst-ptrguard1 and tst-ptrguard1-static to pass.
If these tests don't pass then you've got something wrong.
Cheers,
Carlos.
prev parent reply other threads:[~2013-09-26 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 9:06 Will Newton
2013-09-25 16:09 ` Carlos O'Donell
2013-09-25 16:20 ` pinskia
2013-09-25 16:23 ` Will Newton
2013-09-25 16:25 ` Carlos O'Donell
2013-09-25 16:59 ` Andrew Haley
2013-09-25 19:32 ` Will Newton
2013-09-26 15:02 ` Carlos O'Donell [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=52444C90.5070307@redhat.com \
--to=carlos@redhat.com \
--cc=libc-ports@sourceware.org \
--cc=patches@linaro.org \
--cc=will.newton@linaro.org \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).