]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sparse doesn't support struct randomization
authorMatthew Wilcox <mawilcox@microsoft.com>
Fri, 19 Jan 2018 00:34:08 +0000 (16:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Jan 2018 18:09:41 +0000 (10:09 -0800)
Without this patch, I drown in a sea of unknown attribute warnings

Link: http://lkml.kernel.org/r/20180117024539.27354-1-willy@infradead.org
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/compiler-gcc.h

index 2272ded07496d6044ebe43e930047237bb5f254e..631354acfa7204757a4ec29e74581dc2ee723a13 100644 (file)
 /* Mark a function definition as prohibited from being cloned. */
 #define __noclone      __attribute__((__noclone__, __optimize__("no-tracer")))
 
-#ifdef RANDSTRUCT_PLUGIN
+#if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__)
 #define __randomize_layout __attribute__((randomize_layout))
 #define __no_randomize_layout __attribute__((no_randomize_layout))
 #endif