Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
string: Add __realloc_size hint to kmemdup()
Add __realloc_size() hint to kmemdup() so the compiler can reason about the length of the returned buffer. (These must not use __alloc_size, since those include __malloc which says the contents aren't defined[1]). [1] https://lore.kernel.org/linux-hardening/[email protected]/ Cc: Rasmus Villemoes <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Kees Cook <[email protected]>
- Loading branch information