Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673008

Re: [PATCH 09/32] ext4: extended attribute value size limit is enforced by vfs

From Andreas Dilger <adilger@dilger.ca>
Newsgroups linux.kernel
Subject Re: [PATCH 09/32] ext4: extended attribute value size limit is enforced by vfs
Date 2017-06-22 21:50 +0200
Message-ID <tVgh4-Ba-3@gated-at.bofh.it> (permalink)
References <tUVmh-3od-3@gated-at.bofh.it> <tUVmj-3od-39@gated-at.bofh.it> <tVeIi-8fG-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Jun 22, 2017, at 12:02 PM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
> 
> On Wed, Jun 21, 2017 at 02:21:19PM -0700, Tahsin Erdogan wrote:
>> EXT4_XATTR_MAX_LARGE_EA_SIZE definition in ext4 is currently unused.
>> Besides, vfs enforces its own 64k limit which makes the 1MB limit in
>> ext4 redundant. Remove it.
> 
> Just FYI I believe the 64k VFS limit exists because XFS is the only fs
> to allow large xattr values, and its maximum is 64k (on-disk field size
> limitation).
> 
> I don't know if anyone actually wants larger values?  Now could be a
> time to have such a conversation, if anyone is so interested.

The EXT4_XATTR_MAX_LARGE_EA_SIZE limit of 1MB was also totally arbitrary,
but a reasonable upper limit for the atomic get/set interface used by
xattrs.  The underlying disk format could actually store xattrs of any size.

I'd think if we want to get huge xattrs that they should be handled by
having separate streams (e.g. open file descriptor, ioctl/syscall to select
a different stream number on that file) so that the data doesn't have to be
completely rewritten any time it is modified, but streams are frowned upon
by many Linux developers for security reasons so will probably be a no-go.

Cheers, Andreas

> --D
> 
>> 
>> Signed-off-by: Tahsin Erdogan <tahsin@google.com>
>> ---
>> fs/ext4/ext4.h | 6 ------
>> 1 file changed, 6 deletions(-)
>> 
>> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
>> index 5d5fc0d0e2bc..2cdd6070e348 100644
>> --- a/fs/ext4/ext4.h
>> +++ b/fs/ext4/ext4.h
>> @@ -2220,12 +2220,6 @@ struct mmpd_data {
>>  */
>> #define EXT4_MMP_MAX_CHECK_INTERVAL	300UL
>> 
>> -/*
>> - * Maximum size of xattr attributes for FEATURE_INCOMPAT_EA_INODE 1Mb
>> - * This limit is arbitrary, but is reasonable for the xattr API.
>> - */
>> -#define EXT4_XATTR_MAX_LARGE_EA_SIZE    (1024 * 1024)
>> -
>> /*
>>  * Function prototypes
>>  */
>> --
>> 2.13.1.611.g7e3b11ae1-goog
>> 


Cheers, Andreas





Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 09/32] ext4: extended attribute value size limit is enforced by vfs Tahsin Erdogan <tahsin@google.com> - 2017-06-21 23:30 +0200
  Re: [PATCH 09/32] ext4: extended attribute value size limit is  enforced by vfs Theodore Ts'o <tytso@mit.edu> - 2017-06-22 03:50 +0200
  Re: [PATCH 09/32] ext4: extended attribute value size limit is  enforced by vfs "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-06-22 20:10 +0200
    Re: [PATCH 09/32] ext4: extended attribute value size limit is  enforced by vfs Andreas Dilger <adilger@dilger.ca> - 2017-06-22 21:50 +0200
      Re: [PATCH 09/32] ext4: extended attribute value size limit is  enforced by vfs Theodore Ts'o <tytso@mit.edu> - 2017-06-23 00:30 +0200
        Re: [PATCH 09/32] ext4: extended attribute value size limit is  enforced by vfs "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-06-23 01:30 +0200

csiph-web