summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2022-10-28 08:53:01 -0700
committerAndrew Morton <akpm@linux-foundation.org>2022-11-30 15:58:41 -0800
commitb2b23ba03cb9059d11b270cc280dcdfa6dbbdf53 (patch)
tree87f7c29076ec6907506cd1d68a384e091cbdde34 /include
parent6e7ba8b5e2380f941dda8a1025d70c5ce5b38982 (diff)
downloadlinux-b2b23ba03cb9059d11b270cc280dcdfa6dbbdf53.tar.gz
linux-b2b23ba03cb9059d11b270cc280dcdfa6dbbdf53.tar.bz2
linux-b2b23ba03cb9059d11b270cc280dcdfa6dbbdf53.zip
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. [vbabka@suse.cz: for slab mempools pool_data is not object size] Link: https://lkml.kernel.org/r/13c4bd6e-09d3-efce-43a5-5a99be8bc96b@suse.cz Link: https://lkml.kernel.org/r/20221028154823.you.615-kees@kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Suggested-by: Vlastimil Babka <vbabka@suse.cz> Link: https://lore.kernel.org/lkml/f4fc52c4-7c18-1d76-0c7a-4058ea2486b9@suse.cz/ Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Cc: David Rientjes <rientjes@google.com> Cc: Marco Elver <elver@google.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Reported-by: Anders Roxell <anders.roxell@linaro.org> Link: https://lore.kernel.org/all/20221031105514.GB69385@mutt/ Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions