[PATCH v3 2/2] vfs: avoid duplicating creds in faccessat if possible

Mateusz Guzik mjguzik at gmail.com
Thu Mar 2 18:51:55 UTC 2023


On 3/2/23, Al Viro <viro at zeniv.linux.org.uk> wrote:
> On Thu, Mar 02, 2023 at 07:22:17PM +0100, Mateusz Guzik wrote:
>
>> Ops, I meant "names_cache", here:
>> 	names_cachep = kmem_cache_create_usercopy("names_cache", PATH_MAX, 0,
>> 			SLAB_HWCACHE_ALIGN|SLAB_PANIC, 0, PATH_MAX, NULL);
>>
>> it is fs/dcache.c and I brainfarted into the above.
>
> So you mean __getname() stuff?
>

yes. do some lookups in a loop on a kernel built with
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y (there may be a runtime switch for
it?) and  you will see memset using most time in perf top

-- 
Mateusz Guzik <mjguzik gmail.com>



More information about the Linux-security-module-archive mailing list