From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jan Stancek <jstancek@redhat.com>
Cc: mpe@ellerman.id.au, christophe.leroy@c-s.fr,
linuxppc-dev@lists.ozlabs.org, Artem Savkov <asavkov@redhat.com>,
Herton Krzesinski <hkrzesin@redhat.com>
Subject: Re: [bug] stack protector panics on v4.10-rc1+
Date: Mon, 23 Jan 2017 19:04:21 -0600 [thread overview]
Message-ID: <20170124010421.GI30284@gate.crashing.org> (raw)
In-Reply-To: <1761847918.511957.1485216600665.JavaMail.zimbra@redhat.com>
On Mon, Jan 23, 2017 at 07:10:00PM -0500, Jan Stancek wrote:
> I'm running into panics with stack protector enabled on ppc64le
> I came across following gcc commit:
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0d55f4d0aeaeb16629a2c07c96a190695b83a7e6
> which mentions offset above:
> "If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp.
> -0x7008(2) instead of reading __stack_chk_guard variable."
>
> It looks like it's not reading canary value from __stack_chk_guard variable.
> atm. I'm not sure where -28688(r13) falls in ppc kernel (somewhere near paca struct?).
>
> Is anyone else seeing these panics?
Everyone is.
This is fixed in GCC 8 (and will be backported to GCC 7 and GCC 6 and
maybe even GCC 5). See <http://gcc.gnu.org/r244556> (and r244562 and
r244677).
The kernel will need to use -mstack-protector-guard=global for now, and
it later can use -mstack-protector-guard=tls -mstack-protector-register=<reg>
-mstack-protector-offset=<offset>. If your GCC does not support this yet
(most people's situation right now) you cannot use the stack protector in
the kernel.
Segher
next prev parent reply other threads:[~2017-01-24 1:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <627000186.495731.1485210132000.JavaMail.zimbra@redhat.com>
2017-01-24 0:10 ` [bug] stack protector panics on v4.10-rc1+ Jan Stancek
2017-01-24 0:35 ` Tyrel Datwyler
2017-01-24 1:04 ` Segher Boessenkool [this message]
2017-01-24 3:41 ` Michael Ellerman
2017-01-24 4:09 ` Michael Ellerman
2017-01-25 3:54 ` Balbir Singh
2017-01-25 4:17 ` Segher Boessenkool
2017-01-26 7:05 ` Benjamin Herrenschmidt
2017-01-26 7:06 ` Benjamin Herrenschmidt
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=20170124010421.GI30284@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=asavkov@redhat.com \
--cc=christophe.leroy@c-s.fr \
--cc=hkrzesin@redhat.com \
--cc=jstancek@redhat.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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 NNTP newsgroup(s).