[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72nfByD5sO0a2G2hKCPtHgOhdYfFaXcK7pHnxXRGRUUjDQ@mail.gmail.com>
Date: Thu, 4 Jun 2020 17:05:46 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alexander Popov <alex.popov@...ux.com>
Cc: Kees Cook <keescook@...omium.org>,
Emese Revfy <re.emese@...il.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Thiago Jung Bauermann <bauerman@...ux.ibm.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Jessica Yu <jeyu@...nel.org>,
Sven Schnelle <svens@...ckframe.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Collingbourne <pcc@...gle.com>,
Naohiro Aota <naohiro.aota@....com>,
Alexander Monakov <amonakov@...ras.ru>,
Mathias Krause <minipli@...glemail.com>,
PaX Team <pageexec@...email.hu>,
Brad Spengler <spender@...ecurity.net>,
Laura Abbott <labbott@...hat.com>,
Florian Weimer <fweimer@...hat.com>,
Kernel Hardening <kernel-hardening@...ts.openwall.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>, gcc@....gnu.org,
notify@...nel.org
Subject: Re: [PATCH 2/5] gcc-plugins/stackleak: Use asm instrumentation to
avoid useless register saving
Hi Alexander,
On Thu, Jun 4, 2020 at 3:50 PM Alexander Popov <alex.popov@...ux.com> wrote:
>
> diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
> index cdf016596659..522d57ae8532 100644
> --- a/include/linux/compiler_attributes.h
> +++ b/include/linux/compiler_attributes.h
> @@ -41,6 +41,7 @@
> # define __GCC4_has_attribute___nonstring__ 0
> # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8)
> # define __GCC4_has_attribute___fallthrough__ 0
> +# define __GCC4_has_attribute___no_caller_saved_registers__ 0
> #endif
Nit: if you do another version, please move it before `noclone` to
keep the order (`fallthrough` was added in the wrong place).
Otherwise don't worry, I will sort it together with `fallthrough` when
I send a patch.
> +/*
> + * Optional: only supported since gcc >= 7
> + *
> + * gcc: https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#index-no_005fcaller_005fsaved_005fregisters-function-attribute_002c-x86
> + * clang: https://clang.llvm.org/docs/AttributeReference.html#no-caller-saved-registers
> + */
> +#if __has_attribute(__no_caller_saved_registers__)
> +# define __no_caller_saved_registers __attribute__((__no_caller_saved_registers__))
> +#else
> +# define __no_caller_saved_registers
> +#endif
Ditto.
Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cheers,
Miguel
Powered by blists - more mailing lists