aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2024-02-21 05:16:38 +0000
committerKees Cook <[email protected]>2024-02-29 21:38:02 +0000
commit99db710f768e988e70f1164537bf533a017be24d (patch)
tree385cf2015d588e9cde29d887463f989c553cf2bb /lib/string_helpers.c
parentcoccinelle: semantic patch to check for potential struct_size calls (diff)
downloadkernel-99db710f768e988e70f1164537bf533a017be24d.tar.gz
kernel-99db710f768e988e70f1164537bf533a017be24d.zip
refcount: Annotated intentional signed integer wrap-around
Mark the various refcount_t functions with __signed_wrap, as we depend on the wrapping behavior to detect the overflow and perform saturation. Silences warnings seen with the LKDTM REFCOUNT_* tests: UBSAN: signed-integer-overflow in ../include/linux/refcount.h:189:11 2147483647 + 1 cannot be represented in type 'int' Reviewed-by: Miguel Ojeda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions