lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 23 Feb 2022 10:39:35 -0700 From: Nathan Chancellor <nathan@...nel.org> To: Dan Li <ashimida@...ux.alibaba.com> Cc: catalin.marinas@....com, will@...nel.org, ndesaulniers@...gle.com, keescook@...omium.org, masahiroy@...nel.org, tglx@...utronix.de, akpm@...ux-foundation.org, mark.rutland@....com, samitolvanen@...gle.com, npiggin@...il.com, linux@...ck-us.net, mhiramat@...nel.org, ojeda@...nel.org, luc.vanoostenryck@...il.com, elver@...gle.com, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, llvm@...ts.linux.dev, linux-hardening@...r.kernel.org Subject: Re: [PATCH] [PATCH] AARCH64: Add gcc Shadow Call Stack support On Wed, Feb 23, 2022 at 12:50:21AM -0800, Dan Li wrote: > > > On 2/22/22 08:16, Nathan Chancellor wrote: > > On Tue, Feb 22, 2022 at 01:57:36AM -0800, Dan Li wrote: > > > Shadow call stack is available in GCC > 11.2.0, this patch makes > > > the corresponding kernel configuration available when compiling > > > the kernel with gcc. > > > config SHADOW_CALL_STACK > > > - bool "Clang Shadow Call Stack" > > > - depends on CC_IS_CLANG && ARCH_SUPPORTS_SHADOW_CALL_STACK > > > + bool "Shadow Call Stack" > > > + depends on ARCH_SUPPORTS_SHADOW_CALL_STACK > > > depends on DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER > > > help > > > - This option enables Clang's Shadow Call Stack, which uses a > > > + This option enables Clang/GCC's Shadow Call Stack, which uses a > > > > I wonder if we want to just ditch the mention of the compiler if both > > support it? > > > > My intention is to remind users that this is a compiler feature. > But since there is also a hint in CC_HAVE_SHADOW_CALL_STACK: > +# Supported by clang >= 7.0 or GCC ... > > Removing the specific compiler here also looks fine to me. > Would this look better? > > "This option enables Shadow Call Stack, which uses a ..." > > or maybe: > > "This option enables compiler's Shadow Call Stack, which uses a ..." I do not honestly have a strong opinion around removing mention of the compiler so either looks fine to me (might be better to say "the compiler's Shadow ..." in the second one). > > > shadow stack to protect function return addresses from being > > > overwritten by an attacker. More information can be found in > > > Clang's documentation: > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > > index 09b885cc4db5..a48a604301aa 100644 > > > --- a/arch/arm64/Kconfig > > > +++ b/arch/arm64/Kconfig > > > @@ -1255,7 +1255,7 @@ config HW_PERF_EVENTS > > > config ARCH_HAS_FILTER_PGPROT > > > def_bool y > > > -# Supported by clang >= 7.0 > > > +# Supported by clang >= 7.0 or GCC > 11.2.0 > > > > Same thing here, although eventually there may be a minimum GCC version > > bump to something newer than 11.2.0, which would allow us to just drop > > CONFIG_CC_HAVE_SHADOW_CALL_STACK altogether. No strong opinion. > > > > As Guenter said, I thought maybe we could mark the minimum available > version for users :) Yes, that is what I was getting at with the "minimum version" comment. It should remain around. Cheers, Nathan
Powered by blists - more mailing lists