summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMahad Ibrahim <mahad.ibrahim.dev@gmail.com>2026-07-22 23:02:46 +0000
committerKees Cook <kees@kernel.org>2026-09-01 16:04:33 -0700
commitb74dc82a3b289b872eb4ceaa2a3528e9d9b53931 (patch)
tree2624cbfaa62bd7c2668d2b5430fbfeaf92921423 /scripts/Makefile.thinlto
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
downloadlinux-next-b74dc82a3b289b872eb4ceaa2a3528e9d9b53931.tar.gz
linux-next-b74dc82a3b289b872eb4ceaa2a3528e9d9b53931.zip
lkdtm: use kmalloc() instead of __get_free_page
lkdtm_debugfs_entry and direct_entry use __get_free_page to allocate a temporary buffer, perform copy_from_user to get the crashtype name, strim() to strip whitespace and find_crashtype to find the corresponding crashtype that is being requested. The lkdtm_debugfs_read uses __get_free_page to allocate a temporary buffer to store all the available crashtypes, and then copy it to userspace. The buffers that are allocated can be allocated with kmalloc as there is nothing special that requires a struct page, or the page allocator. kmalloc() additionally provides a better API that doesn't require ugly casts which obfuscate the code and kfree does not need to know the size of the freed object. Replace use of __get_free_page() with kmalloc(). Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Link: https://patch.msgid.link/20260722230246.2869-1-mahad.ibrahim.dev@gmail.com Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions