From: Dan Li <ashimida@linux.alibaba.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: masahiroy@kernel.org, michal.lkml@markovi.net,
catalin.marinas@arm.com, will@kernel.org, keescook@chromium.org,
nathan@kernel.org, tglx@linutronix.de, akpm@linux-foundation.org,
samitolvanen@google.com, frederic@kernel.org, rppt@kernel.org,
mark.rutland@arm.com, yifeifz2@illinois.edu, rostedt@goodmis.org,
viresh.kumar@linaro.org, andreyknvl@gmail.com,
colin.king@canonical.com, ojeda@kernel.org,
luc.vanoostenryck@gmail.com, elver@google.com,
nivedita@alum.mit.edu, ardb@kernel.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-hardening@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH] [PATCH V3]ARM64: SCS: Add gcc plugin to support Shadow Call Stack
Date: Thu, 14 Oct 2021 05:40:08 +0800 [thread overview]
Message-ID: <c2d0bfc9-364e-a2a8-e786-7a5102e34ddc@linux.alibaba.com> (raw)
In-Reply-To: <CAKwvOd=qxHU41HFEWLAz6DOvSMPdW863E9SKVe0PFK0ePDvizQ@mail.gmail.com>
On 10/14/21 2:50 AM, Nick Desaulniers wrote:
> On Wed, Oct 13, 2021 at 11:03 AM Dan Li <ashimida@linux.alibaba.com> wrote:
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 62c3c1d..da2da8c 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -81,7 +81,7 @@ config ARM64
>> select ARCH_SUPPORTS_DEBUG_PAGEALLOC
>> select ARCH_SUPPORTS_HUGETLBFS
>> select ARCH_SUPPORTS_MEMORY_FAILURE
>> - select ARCH_SUPPORTS_SHADOW_CALL_STACK if CC_HAVE_SHADOW_CALL_STACK
>> + select ARCH_SUPPORTS_SHADOW_CALL_STACK if (CC_HAVE_SHADOW_CALL_STACK || GCC_PLUGIN_SHADOW_CALL_STACK)
>> select ARCH_SUPPORTS_LTO_CLANG if CPU_LITTLE_ENDIAN
>> select ARCH_SUPPORTS_LTO_CLANG_THIN
>> select ARCH_SUPPORTS_CFI_CLANG
>> @@ -1062,7 +1062,7 @@ config ARCH_HAS_FILTER_PGPROT
>>
>> # Supported by clang >= 7.0
>> config CC_HAVE_SHADOW_CALL_STACK
>> - def_bool $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
>> + def_bool (CC_IS_CLANG && $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18))
>
> I guess since clang supported SCS since clang-7, but the minimally
> supported version of clang according to
> Documentation/process/changes.rst is 10.0.1, then this could be:
>
> def_boot CC_IS_CLANG || $(cc-option, -fsanitize=shadow-call-stack -ffixed-x18)
>
> Then we won't have to touch it again once SCS lands in upstream GCC,
> as the cc-option test will start to pass?
>
Thanks Nick,
That sounds reasonable.
prev parent reply other threads:[~2021-10-13 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 18:03 [PATCH] [PATCH V3]ARM64: SCS: Add gcc plugin to support Shadow Call Stack Dan Li
2021-10-13 18:50 ` Nick Desaulniers
2021-10-13 21:40 ` Dan Li [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=c2d0bfc9-364e-a2a8-e786-7a5102e34ddc@linux.alibaba.com \
--to=ashimida@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=colin.king@canonical.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nivedita@alum.mit.edu \
--cc=ojeda@kernel.org \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
--cc=will@kernel.org \
--cc=yifeifz2@illinois.edu \
/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