diff options
| author | Kees Cook <kees@kernel.org> | 2025-03-06 20:19:09 -0800 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-03-07 19:58:05 -0800 |
| commit | ed2b548f1017586c44f50654ef9febb42d491f31 (patch) | |
| tree | d17aa3f3c788656de2f25f9ea31c8a30758fe9e9 /include/linux | |
| parent | d2cf8ccf5a1871058a083c00efe37d7eb91bf6bd (diff) | |
ubsan/overflow: Rework integer overflow sanitizer option to turn on everything
Since we're going to approach integer overflow mitigation a type at a
time, we need to enable all of the associated sanitizers, and then opt
into types one at a time.
Rename the existing "signed wrap" sanitizer to just the entire topic area:
"integer wrap". Enable the implicit integer truncation sanitizers, with
required callbacks and tests.
Notably, this requires features (currently) only available in Clang,
so we can depend on the cc-option tests to determine availability
instead of doing version tests.
Link: https://lore.kernel.org/r/20250307041914.937329-1-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compiler_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index f59393464ea7..4ad3e900bc3d 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -360,7 +360,7 @@ struct ftrace_likely_data { #endif /* Do not trap wrapping arithmetic within an annotated function. */ -#ifdef CONFIG_UBSAN_SIGNED_WRAP +#ifdef CONFIG_UBSAN_INTEGER_WRAP # define __signed_wrap __attribute__((no_sanitize("signed-integer-overflow"))) #else # define __signed_wrap |
