kmalloc_obj fixes for v7.0-rc2

- Fix pointer-to-array allocation types for ubd and kcsan
 
 - Force size overflow helpers to __always_inline
 
 - Bump __builtin_counted_by_ref to Clang 22.1 from 22.0 (Nathan Chancellor)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRSPkdeREjth1dHnSE2KwveOeQkuwUCaaCJawAKCRA2KwveOeQk
 u2LdAQD/wZYe1YCCrUR+jM6EvAoI2CzUEQUQMyzLtjIyeSR6VAD8CSdZu0htnwwy
 Ca76IzSF8Aj0D7Hytxkk8HDAD4WuxA0=
 =QucI
 -----END PGP SIGNATURE-----

Merge tag 'kmalloc_obj-v7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kmalloc_obj fixes from Kees Cook:

 - Fix pointer-to-array allocation types for ubd and kcsan

 - Force size overflow helpers to __always_inline

 - Bump __builtin_counted_by_ref to Clang 22.1 from 22.0 (Nathan Chancellor)

* tag 'kmalloc_obj-v7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  kcsan: test: Adjust "expect" allocation type for kmalloc_obj
  overflow: Make sure size helpers are always inlined
  init/Kconfig: Adjust fixed clang version for __builtin_counted_by_ref
  ubd: Use pointer-to-pointers for io_thread_req arrays
This commit is contained in:
Linus Torvalds 2026-02-26 10:05:15 -08:00
commit 3f4a08e644
4 changed files with 11 additions and 11 deletions

View file

@ -168,7 +168,7 @@ static bool __report_matches(const struct expect_report *r)
if (!report_available())
return false;
expect = kmalloc_obj(observed.lines);
expect = (typeof(expect))kmalloc_obj(observed.lines);
if (WARN_ON(!expect))
return false;