Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mempool: do not use ksize() for poisoning
Nothing appears to be using ksize() within the kmalloc-backed mempools except the mempool poisoning logic. Use the actual pool size instead of the ksize() to avoid needing any special handling of the memory as needed by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE. [[email protected]: for slab mempools pool_data is not object size] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]> Suggested-by: Vlastimil Babka <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Acked-by: Vlastimil Babka <[email protected]> Reviewed-by: Andrey Konovalov <[email protected]> Cc: David Rientjes <[email protected]> Cc: Marco Elver <[email protected]> Cc: Vincenzo Frascino <[email protected]> Reported-by: Anders Roxell <[email protected]> Link: https://lore.kernel.org/all/20221031105514.GB69385@mutt/ Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
- Loading branch information