From: Michael Ellerman <mpe@ellerman•id.au>
To: Christophe LEROY <christophe.leroy@c-s•fr>,
Peter Zijlstra <peterz@infradead•org>
Cc: Benjamin Herrenschmidt <benh@kernel•crashing.org>,
Paul Mackerras <paulus@samba•org>, Ingo Molnar <mingo@redhat•com>,
segher@kernel•crashing.org, linux-kernel@vger•kernel.org,
linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct
Date: Thu, 20 Sep 2018 09:54:16 +1000 [thread overview]
Message-ID: <875zz1avrr.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <f6a36d25-ce19-5d56-69d9-198215a7b9e1@c-s.fr>
Christophe LEROY <christophe.leroy@c-s•fr> writes:
> Le 19/09/2018 =C3=A0 13:58, Peter Zijlstra a =C3=A9crit=C2=A0:
>> On Wed, Sep 19, 2018 at 11:14:43AM +0000, Christophe Leroy wrote:
>>> In order to allow the use of non global stack protector canary,
>>> the stack canary needs to be located at a know offset defined
>>> in Makefile via -mstack-protector-guard-offset.
>>>
>>> On powerpc/32, register r2 points to current task_struct at
>>> all time, the stack_canary located inside task_struct can be
>>> used directly if it is located in a known place.
>>>
>>> In order to allow that, this patch moves the stack_canary field
>>> out of the randomized area of task_struct.
>>=20
>> And you cannot use something like asm-offsets to extract this?
>
> I have not been able to find a way to define the compilation flags AFTER=
=20
> building asm-offsets.h, see https://patchwork.ozlabs.org/patch/971521/
>
> If you have a suggestion, it is welcomed.
Hmm, that's something of a hard problem.
But the stack canary is one of the things we really *do* want to be
randomised, so we should probably try to come up with a solution.
cheers
prev parent reply other threads:[~2018-09-19 23:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 11:14 [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct Christophe Leroy
2018-09-19 11:14 ` [PATCH v2 2/2] powerpc/32: add stack protector support Christophe Leroy
2018-09-19 13:26 ` Segher Boessenkool
2018-09-19 14:22 ` Christophe LEROY
2018-09-19 14:32 ` Segher Boessenkool
2018-09-19 11:58 ` [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct Peter Zijlstra
2018-09-19 12:25 ` Christophe LEROY
2018-09-19 12:52 ` Peter Zijlstra
2018-09-19 23:54 ` Michael Ellerman [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=875zz1avrr.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=benh@kernel$(echo .)crashing.org \
--cc=christophe.leroy@c-s$(echo .)fr \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@redhat$(echo .)com \
--cc=paulus@samba$(echo .)org \
--cc=peterz@infradead$(echo .)org \
--cc=segher@kernel$(echo .)crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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