On May 20, 2026 "Mike Rapoport (Microsoft)" <[email protected]> wrote: > > Several functions in selinuxfs.c allocate temporary buffers using > __get_free_page() or get_zeroed_page(). > > These buffers are used either to store a string generated by snprintf() (in > sel_make_bools()) or to copy data from user (sel_read_avc_hash_stats() and > sel_read_sidtab_hash_stats()). > > Such usage does not require struct page access and it is better to allocate > these buffers with kzalloc()/kmalloc() that provide better scalability and > more debugging possibilities. > > Replace use of get_zeroed_page() with kzalloc() and usage of > __get_free_page() with kmalloc(). > > Link: > https://lore.kernel.org/all/[email protected] > Signed-off-by: Mike Rapoport (Microsoft) <[email protected]> > --- > security/selinux/selinuxfs.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-)
I suspect if we look closer we can probably also trim some of those allocations to less then a page, but that can be work for another day. Merged into selinux/dev, thanks Mike. -- paul-moore.com
