Re: [PATCH v5 3/5] fs: split off do_getxattr from getxattr

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

 




On 12/21/21 11:18 AM, Linus Torvalds wrote:
> On Tue, Dec 21, 2021 at 11:15 AM Stefan Roesch <shr@xxxxxx> wrote:
>>
>> Linus, if we remove the constness, then we either need to cast away the constness (the system call
>> is defined as const) or change the definition of the system call.
> 
> You could also do it as
> 
>         union {
>                 const void __user *setxattr_value;
>                 void __user *getxattr_value;
>         };
>

Pavel brought up a very good point. By adding the kname array into the 
xarray_ctx we increase the size of io_xattr structure too much. In addition
this will also increase the size of the io_kiocb structure. The original
solution did not increase the size.

Per opcode we limit the storage space to 64 bytes. However the array itself
requires 256 bytes.
 
> if you wanted to..
> 
>                  Linus
> 



[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