Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 890 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#define __nosanitizethread __attribute__((no_sanitize("thread"))) | #define __nosanitizethread __attribute__((no_sanitize("thread"))) | ||||
#else | #else | ||||
#define __nosanitizeaddress | #define __nosanitizeaddress | ||||
#define __nosanitizememory | #define __nosanitizememory | ||||
#define __nosanitizethread | #define __nosanitizethread | ||||
#endif | #endif | ||||
/* | |||||
* Make it possible to opt out of stack smashing protection. | |||||
*/ | |||||
#if __has_attribute(no_stack_protector) | |||||
kib: Why does this need _KERNEL protection? | |||||
Done Inline ActionsNo real reason. Note, gcc <= 10 does not have this attribute. markj: No real reason.
Note, gcc <= 10 does not have this attribute. | |||||
Not Done Inline ActionsIt looks like the gcc <= 10 spelling is __attribute__ ((__optimize__ ("-fno-stack-protector"))) andrew: It looks like the gcc <= 10 spelling is `__attribute__ ((__optimize__ ("-fno-stack… | |||||
#define __nostackprotector __attribute__((no_stack_protector)) | |||||
#else | |||||
#define __nostackprotector | |||||
#endif | |||||
/* Guard variables and structure members by lock. */ | /* Guard variables and structure members by lock. */ | ||||
#define __guarded_by(x) __lock_annotate(guarded_by(x)) | #define __guarded_by(x) __lock_annotate(guarded_by(x)) | ||||
#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) | #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) | ||||
/* Alignment builtins for better type checking and improved code generation. */ | /* Alignment builtins for better type checking and improved code generation. */ | ||||
/* Provide fallback versions for other compilers (GCC/Clang < 10): */ | /* Provide fallback versions for other compilers (GCC/Clang < 10): */ | ||||
#if !__has_builtin(__builtin_is_aligned) | #if !__has_builtin(__builtin_is_aligned) | ||||
#define __builtin_is_aligned(x, align) \ | #define __builtin_is_aligned(x, align) \ | ||||
Show All 16 Lines |
Why does this need _KERNEL protection?