summaryrefslogtreecommitdiff
path: root/include/linux/compiler-clang.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-07-29 20:49:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-07-29 20:49:58 -0700
commita26321ee4c935a63c29ed6518f27e38826b36e68 (patch)
treef01a967746d2d158020d1afcbb891b082a772481 /include/linux/compiler-clang.h
parentbeb6c8326eb4e7006c4aa16b0fee3e303d42e685 (diff)
parentf627b51aaa041cba715b59026cf2d9cb1476c7ed (diff)
Merge tag 'hardening-v6.17-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening fixes from Kees Cook: "Notably, this contains the fix for for the GCC __init mess I created with the kstack_erase annotations. - staging: media: atomisp: Fix stack buffer overflow in gmin_get_var_int(). I was asked to carry this fix, so here it is. :) - fortify: Fix incorrect reporting of read buffer size - kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS - compiler_types: Provide __no_kstack_erase to disable coverage only on Clang" * tag 'hardening-v6.17-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: compiler_types: Provide __no_kstack_erase to disable coverage only on Clang fortify: Fix incorrect reporting of read buffer size kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS staging: media: atomisp: Fix stack buffer overflow in gmin_get_var_int()
Diffstat (limited to 'include/linux/compiler-clang.h')
-rw-r--r--include/linux/compiler-clang.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index 4fc8e26914ad..fa4ffe037bc7 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -89,6 +89,9 @@
#define __no_sanitize_coverage
#endif
+/* Only Clang needs to disable the coverage sanitizer for kstack_erase. */
+#define __no_kstack_erase __no_sanitize_coverage
+
#if __has_feature(shadow_call_stack)
# define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))
#endif