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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 03, 2023 at 09:39:11PM +0100, Mateusz Guzik wrote:

> the allocation routine does not have any information about the size
> available at compilation time, so has to resort to a memset call at
> runtime. Instead, should this be:
> 
> f = kmem_cache_alloc(...);
> memset(f, 0, sizeof(*f));
> 
> ... the compiler could in principle inititalize stuff as indicated by
> code and emit zerofill for the rest. Interestingly, last I checked
> neither clang nor gcc knew how to do it, they instead resort to a full
> sized memset anyway, which is quite a bummer.

For struct file I wouldn't expect a win from that, TBH.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux