Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refcount: Remove unused __signed_wrap function annotations

With CONFIG_UBSAN_INTEGER_WRAP being replaced by Overflow Behavior
Types, remove the __signed_wrap function annotation as it is already
unused, and any future work here will use OBT annotations instead.

Link: https://patch.msgid.link/20260331163725.2765789-1-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

Kees Cook 00247cbf a96ef584

+6 -13
+1 -8
include/linux/compiler_types.h
··· 432 432 #define at_least 433 433 #endif 434 434 435 - /* Do not trap wrapping arithmetic within an annotated function. */ 436 - #ifdef CONFIG_UBSAN_INTEGER_WRAP 437 - # define __signed_wrap __attribute__((no_sanitize("signed-integer-overflow"))) 438 - #else 439 - # define __signed_wrap 440 - #endif 441 - 442 435 /* Section for code which can't be instrumented at all */ 443 436 #define __noinstr_section(section) \ 444 437 noinline notrace __attribute((__section__(section))) \ 445 438 __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage \ 446 - __no_sanitize_memory __signed_wrap 439 + __no_sanitize_memory 447 440 448 441 #define noinstr __noinstr_section(".noinstr.text") 449 442
+5 -5
include/linux/refcount.h
··· 170 170 return atomic_read(&r->refs); 171 171 } 172 172 173 - static inline __must_check __signed_wrap 173 + static inline __must_check 174 174 bool __refcount_add_not_zero(int i, refcount_t *r, int *oldp) 175 175 { 176 176 int old = refcount_read(r); ··· 212 212 return __refcount_add_not_zero(i, r, NULL); 213 213 } 214 214 215 - static inline __must_check __signed_wrap 215 + static inline __must_check 216 216 bool __refcount_add_not_zero_limited_acquire(int i, refcount_t *r, int *oldp, 217 217 int limit) 218 218 { ··· 244 244 return __refcount_add_not_zero_limited_acquire(1, r, oldp, limit); 245 245 } 246 246 247 - static inline __must_check __signed_wrap 247 + static inline __must_check 248 248 bool __refcount_add_not_zero_acquire(int i, refcount_t *r, int *oldp) 249 249 { 250 250 return __refcount_add_not_zero_limited_acquire(i, r, oldp, INT_MAX); ··· 277 277 return __refcount_add_not_zero_acquire(i, r, NULL); 278 278 } 279 279 280 - static inline __signed_wrap 280 + static inline 281 281 void __refcount_add(int i, refcount_t *r, int *oldp) 282 282 { 283 283 int old = atomic_fetch_add_relaxed(i, &r->refs); ··· 383 383 __refcount_inc(r, NULL); 384 384 } 385 385 386 - static inline __must_check __signed_wrap 386 + static inline __must_check 387 387 bool __refcount_sub_and_test(int i, refcount_t *r, int *oldp) 388 388 { 389 389 int old = atomic_fetch_sub_release(i, &r->refs);