diff options
author | Kees Cook <keescook@chromium.org> | 2024-02-21 06:16:38 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2024-02-29 22:38:02 +0100 |
commit | 99db710f768e988e70f1164537bf533a017be24d (patch) | |
tree | 385cf2015d588e9cde29d887463f989c553cf2bb /arch/arm/boot/compressed/misc.c | |
parent | coccinelle: semantic patch to check for potential struct_size calls (diff) | |
download | linux-99db710f768e988e70f1164537bf533a017be24d.tar.xz linux-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 <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20240221051634.work.287-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'arch/arm/boot/compressed/misc.c')
0 files changed, 0 insertions, 0 deletions