From: Christophe LEROY <christophe.leroy@c-s.fr>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Fix stackprotector detection for non-glibc toolchains
Date: Sat, 13 Oct 2018 09:32:19 +0200 [thread overview]
Message-ID: <7e1acec1-c840-321b-0a93-99679fce6cb3@c-s.fr> (raw)
In-Reply-To: <20181012225832.13827-1-mpe@ellerman.id.au>
Le 13/10/2018 à 00:58, Michael Ellerman a écrit :
> If GCC is not built with glibc support then we must explicitly tell it
> which register to use for TLS mode stack protector, otherwise it will
> error out and the cc-option check will fail.
Oh ? I didn't encounter such a problem with the nolibc GCC from
https://mirrors.edge.kernel.org/pub/tools/crosstool/
I did all my tests with powerpc64-linux-gcc 8.1 on x86_64
Christophe
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 1888636c9eb6..3d008115fe18 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -180,7 +180,8 @@ config PPC
> select HAVE_ARCH_SECCOMP_FILTER
> select HAVE_ARCH_TRACEHOOK
> select HAVE_CBPF_JIT if !PPC64
> - select HAVE_STACKPROTECTOR if $(cc-option,-mstack-protector-guard=tls)
> + select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
> + select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
> select HAVE_CONTEXT_TRACKING if PPC64
> select HAVE_DEBUG_KMEMLEAK
> select HAVE_DEBUG_STACKOVERFLOW
>
next prev parent reply other threads:[~2018-10-13 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 22:58 [PATCH] powerpc: Fix stackprotector detection for non-glibc toolchains Michael Ellerman
2018-10-13 7:32 ` Christophe LEROY [this message]
2018-10-13 11:55 ` Michael Ellerman
2018-10-13 15:48 ` Segher Boessenkool
2018-10-15 9:36 ` Michael Ellerman
2018-10-15 4:01 ` Michael Ellerman
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=7e1acec1-c840-321b-0a93-99679fce6cb3@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=linuxppc-dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.