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 linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 27 Jun 2017 10:14:38 -0500 From: Tom Lendacky <thomas.lendacky@....com> To: linux-arch@...r.kernel.org, linux-efi@...r.kernel.org, kvm@...r.kernel.org, linux-doc@...r.kernel.org, x86@...nel.org, kexec@...ts.infradead.org, linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com, xen-devel@...ts.xen.org, linux-mm@...ck.org, iommu@...ts.linux-foundation.org Cc: Brijesh Singh <brijesh.singh@....com>, Toshimitsu Kani <toshi.kani@....com>, Radim Krčmář <rkrcmar@...hat.com>, Matt Fleming <matt@...eblueprint.co.uk>, Alexander Potapenko <glider@...gle.com>, "H. Peter Anvin" <hpa@...or.com>, Larry Woodman <lwoodman@...hat.com>, Jonathan Corbet <corbet@....net>, Joerg Roedel <joro@...tes.org>, "Michael S. Tsirkin" <mst@...hat.com>, Ingo Molnar <mingo@...hat.com>, Andrey Ryabinin <aryabinin@...tuozzo.com>, Dave Young <dyoung@...hat.com>, Rik van Riel <riel@...hat.com>, Arnd Bergmann <arnd@...db.de>, Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>, Borislav Petkov <bp@...en8.de>, Andy Lutomirski <luto@...nel.org>, Boris Ostrovsky <boris.ostrovsky@...cle.com>, Dmitry Vyukov <dvyukov@...gle.com>, Juergen Gross <jgross@...e.com>, Thomas Gleixner <tglx@...utronix.de>, Paolo Bonzini <pbonzini@...hat.com> Subject: [PATCH v8 RESEND 37/38] compiler-gcc.h: Introduce __nostackp function attribute Create a new function attribute, __nostackp, that can used to turn off stack protection on a per function basis. Signed-off-by: Tom Lendacky <thomas.lendacky@....com> --- include/linux/compiler-gcc.h | 2 ++ include/linux/compiler.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 0efef9c..de48b32 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -162,6 +162,8 @@ #if GCC_VERSION >= 40100 # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) + +#define __nostackp __attribute__((__optimize__("no-stack-protector"))) #endif #if GCC_VERSION >= 40300 diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 707242f..615d50d 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -458,6 +458,10 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s #define __visible #endif +#ifndef __nostackp +#define __nostackp +#endif + /* * Assume alignment of return value. */
Powered by blists - more mailing lists