Merge branch 'merge/randstruct' into for-next/gcc-plugins
This commit is contained in:
commit
d1185a8c5d
14 changed files with 1146 additions and 9 deletions
|
|
@ -223,6 +223,11 @@
|
|||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))
|
||||
|
||||
#ifdef RANDSTRUCT_PLUGIN
|
||||
#define __randomize_layout __attribute__((randomize_layout))
|
||||
#define __no_randomize_layout __attribute__((no_randomize_layout))
|
||||
#endif
|
||||
|
||||
#endif /* GCC_VERSION >= 40500 */
|
||||
|
||||
#if GCC_VERSION >= 40600
|
||||
|
|
@ -294,6 +299,14 @@
|
|||
#define __no_sanitize_address __attribute__((no_sanitize_address))
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 50100
|
||||
/*
|
||||
* Mark structures as requiring designated initializers.
|
||||
* https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
|
||||
*/
|
||||
#define __designated_init __attribute__((designated_init))
|
||||
#endif
|
||||
|
||||
#endif /* gcc version >= 40000 specific checks */
|
||||
|
||||
#if !defined(__noclone)
|
||||
|
|
|
|||
|
|
@ -440,10 +440,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
|
|||
# define __attribute_const__ /* unimplemented */
|
||||
#endif
|
||||
|
||||
#ifndef __designated_init
|
||||
# define __designated_init
|
||||
#endif
|
||||
|
||||
#ifndef __latent_entropy
|
||||
# define __latent_entropy
|
||||
#endif
|
||||
|
||||
#ifndef __randomize_layout
|
||||
# define __randomize_layout __designated_init
|
||||
#endif
|
||||
|
||||
#ifndef __no_randomize_layout
|
||||
# define __no_randomize_layout
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Tell gcc if a function is cold. The compiler will assume any path
|
||||
* directly leading to the call is unlikely.
|
||||
|
|
|
|||
|
|
@ -24,10 +24,17 @@
|
|||
#ifndef MODULE_ARCH_VERMAGIC
|
||||
#define MODULE_ARCH_VERMAGIC ""
|
||||
#endif
|
||||
#ifdef RANDSTRUCT_PLUGIN
|
||||
#include <generated/randomize_layout_hash.h>
|
||||
#define MODULE_RANDSTRUCT_PLUGIN "RANDSTRUCT_PLUGIN_" RANDSTRUCT_HASHED_SEED
|
||||
#else
|
||||
#define MODULE_RANDSTRUCT_PLUGIN
|
||||
#endif
|
||||
|
||||
#define VERMAGIC_STRING \
|
||||
UTS_RELEASE " " \
|
||||
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
|
||||
MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
|
||||
MODULE_ARCH_VERMAGIC
|
||||
MODULE_ARCH_VERMAGIC \
|
||||
MODULE_RANDSTRUCT_PLUGIN
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue