compiler-gcc: be consistent with underscores use for `no_sanitize`
PATCH 1/5 compiler-gcc: be consistent with underscores use for `no_sanitize`
Other macros that define shorthands for attributes in e.g. compiler_attributes.h and elsewhere use underscores.
--- include/linux/compiler-gcc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/compiler-gcc.h +4 -4
@@ -83,25 +83,25 @@#endif #if __has_attribute (__no_sanitize_address__) -#define __no_sanitize_address __attribute__((no_sanitize_address)) +#define __no_sanitize_address __attribute__((__no_sanitize_address__))#else #define __no_sanitize_address#endif #if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__) -#define __no_sanitize_thread __attribute__((no_sanitize_thread)) +#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))#else #define __no_sanitize_thread#endif #if __has_attribute (__no_sanitize_undefined__) -#define __no_sanitize_undefined __attribute__((no_sanitize_undefined)) +#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__))#else #define __no_sanitize_undefined#endif #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__) -#define __no_sanitize_coverage __attribute__((no_sanitize_coverage)) +#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))#else #define __no_sanitize_coverage#endif
base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
Signature · 1 line
2.38.1
PATCH 2/5 compiler-gcc: remove attribute support check for `__no_sanitize_address__`
The attribute was added in GCC 4.8, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
--- include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-)
include/linux/compiler-gcc.h +0 -4
@@ -82,11 +82,7 @@#define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))#endif -#if __has_attribute (__no_sanitize_address__)#define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#else -#define __no_sanitize_address -#endif #if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__)#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))
Signature · 1 line
2.38.1
Re: [PATCH 2/5] compiler-gcc: remove attribute support check for `__no_sanitize_address__`
Quoted 7 lines · Miguel Ojeda
The attribute was added in GCC 4.8, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 2/5] compiler-gcc: remove attribute support check for `__no_sanitize_address__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 4.8, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 24 lines
--- include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-)include/linux/compiler-gcc.h +0
-4@@ -82,11 +82,7 @@#define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))#endif -#if __has_attribute (__no_sanitize_address__)#define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#else -#define __no_sanitize_address -#endif #if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__)#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))Signature · 1 line
2.38.1
PATCH 3/5 compiler-gcc: remove attribute support check for `__no_sanitize_thread__`
In reply to Miguel OjedaThe attribute was added in GCC 5.1, which matches the minimum GCC version supported by the kernel.
Therefore, remove the check.
--- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/compiler-gcc.h +1 -1
@@ -84,7 +84,7 @@#define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__) +#if defined(__SANITIZE_THREAD__)#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))#else #define __no_sanitize_thread
Signature · 1 line
2.38.1
Re: [PATCH 3/5] compiler-gcc: remove attribute support check for `__no_sanitize_thread__`
Quoted 8 lines · Miguel Ojeda
The attribute was added in GCC 5.1, which matches the minimum GCC version supported by the kernel.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 20 lines
--- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/compiler-gcc.h +1
-2@@ -84,7 +84,7 @@#define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__) +#if defined(__SANITIZE_THREAD__)#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))#else #define __no_sanitize_thread --2.38.1
Re: [PATCH 3/5] compiler-gcc: remove attribute support check for `__no_sanitize_thread__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 5.1, which matches the minimum GCC version supported by the kernel.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 3/5] compiler-gcc: remove attribute support check for `__no_sanitize_thread__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 5.1, which matches the minimum GCC version supported by the kernel.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 21 lines
--- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/compiler-gcc.h +1
-1@@ -84,7 +84,7 @@#define __no_sanitize_address __attribute__((__no_sanitize_address__)) -#if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__) +#if defined(__SANITIZE_THREAD__)#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))#else #define __no_sanitize_threadSignature · 1 line
2.38.1
PATCH 4/5 compiler-gcc: remove attribute support check for `__no_sanitize_undefined__`
In reply to Miguel OjedaThe attribute was added in GCC 4.9, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
--- include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-)
include/linux/compiler-gcc.h +0 -4
@@ -90,11 +90,7 @@#define __no_sanitize_thread#endif -#if __has_attribute (__no_sanitize_undefined__)#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) -#else -#define __no_sanitize_undefined -#endif #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__)#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))
Signature · 1 line
2.38.1
Re: [PATCH 4/5] compiler-gcc: remove attribute support check for `__no_sanitize_undefined__`
Quoted 7 lines · Miguel Ojeda
The attribute was added in GCC 4.9, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 4/5] compiler-gcc: remove attribute support check for `__no_sanitize_undefined__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 4.9, while the minimum GCC version supported by the kernel is GCC 5.1.
Therefore, remove the check.
Signed-off-by Miguel Ojeda <[email protected]>
Quoted 24 lines
--- include/linux/compiler-gcc.h | 4 ---- 1 file changed, 4 deletions(-)include/linux/compiler-gcc.h +0
-4@@ -90,11 +90,7 @@#define __no_sanitize_thread#endif -#if __has_attribute (__no_sanitize_undefined__)#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) -#else -#define __no_sanitize_undefined -#endif #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__)#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))Signature · 1 line
2.38.1
PATCH 5/5 compiler-gcc: document minimum version for `__no_sanitize_coverage__`
In reply to Miguel OjedaThe attribute was added in GCC 12.1.
This will simplify future cleanups, and is closer to what we do in compiler_attributes.h.
--- include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/compiler-gcc.h +3 -0
@@ -92,6 +92,9 @@#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) +/* +* Only supported since gcc >= 12 +*/ #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__)#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))#else
Signature · 1 line
2.38.1
Re: [PATCH 5/5] compiler-gcc: document minimum version for `__no_sanitize_coverage__`
Quoted 8 lines · Miguel Ojeda
The attribute was added in GCC 12.1.
This will simplify future cleanups, and is closer to what we do in
compiler_attributes.h.Signed-off-by Miguel Ojeda <[email protected]>
Quoted 21 lines
--- include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/compiler-gcc.h +3
-1@@ -92,6 +92,9 @@#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) +/* +* Only supported since gcc >= 12 +*/ #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__)#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))#else --2.38.1
Re: [PATCH 5/5] compiler-gcc: document minimum version for `__no_sanitize_coverage__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 12.1.
This will simplify future cleanups, and is closer to what we do in
compiler_attributes.h.Signed-off-by Miguel Ojeda <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 5/5] compiler-gcc: document minimum version for `__no_sanitize_coverage__`
In reply to Miguel OjedaQuoted 7 lines · Miguel Ojeda
The attribute was added in GCC 12.1.
This will simplify future cleanups, and is closer to what we do in
compiler_attributes.h.Signed-off-by Miguel Ojeda <[email protected]>
Quoted 22 lines
--- include/linux/compiler-gcc.h | 3 +++ 1 file changed, 3 insertions(+)include/linux/compiler-gcc.h +3
-0@@ -92,6 +92,9 @@#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__)) +/* +* Only supported since gcc >= 12 +*/ #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__)#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))#else Signature · 1 line
2.38.1
Quoted 4 lines · Miguel Ojeda
Other macros that define shorthands for attributes in e.g.
compiler_attributes.hand elsewhere use underscores.Signed-off-by Miguel Ojeda <[email protected]>
Signature · 1 line
Kees Cook
Quoted 4 lines · Miguel Ojeda
Other macros that define shorthands for attributes in e.g.
compiler_attributes.hand elsewhere use underscores.Signed-off-by Miguel Ojeda <[email protected]>
Quoted 44 lines
--- include/linux/compiler-gcc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)include/linux/compiler-gcc.h +4
-4@@ -83,25 +83,25 @@#endif #if __has_attribute (__no_sanitize_address__) -#define __no_sanitize_address __attribute__((no_sanitize_address)) +#define __no_sanitize_address __attribute__((__no_sanitize_address__))#else #define __no_sanitize_address#endif #if defined(__SANITIZE_THREAD__) &&__has_attribute (__no_sanitize_thread__) -#define __no_sanitize_thread __attribute__((no_sanitize_thread)) +#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))#else #define __no_sanitize_thread#endif #if __has_attribute (__no_sanitize_undefined__) -#define __no_sanitize_undefined __attribute__((no_sanitize_undefined)) +#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__))#else #define __no_sanitize_undefined#endif #if defined(CONFIG_KCOV ) &&__has_attribute (__no_sanitize_coverage__) -#define __no_sanitize_coverage __attribute__((no_sanitize_coverage)) +#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))#else #define __no_sanitize_coverage#endif base-commit:
9abf2313adc1ca1b6180c508c25f22f9395cc780Signature · 1 line
2.38.1