linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Ye Bin <yebin@huaweicloud.com>
Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, jack@suse.cz,
	Ye Bin <yebin10@huawei.com>,
	syzbot+4d99a966fd74bdeeec36@syzkaller.appspotmail.com
Subject: Re: [PATCH v3 1/4] ext4: fix WARNING in ext4_expand_extra_isize_ea
Date: Fri, 9 Dec 2022 00:35:24 -0500	[thread overview]
Message-ID: <Y5LJHI1cHDK0Stjq@mit.edu> (raw)
In-Reply-To: <20221208023233.1231330-2-yebin@huaweicloud.com>

In general, please don't use commit summaries like:

	ext4: fix WARNING in ext4_expand_extra_isize_ea
	
The commit summary should be a summary of what the change *does*.  A
description of *why* the change is needed is properly placed in the
body of the description.  So something like "ext4: clamp
EXT4_XATTR_SIZE_MAX to XATTR_SIZE_MAX" would be a better one-line
commit summary.

That being said, I've decided to not apply this patch.  A 16 MB
extended attribute size is not _that_ insane, although admittedly it's
quite bit larger than any other file system or OS supports (unless you
include Solaris and NTFS's alternate data forks as "extended
attributes").

I personally don't think the mm/page_alloc warning is that big of a
deal (even if it does cause a Syzbot report), and if you really do
care about suppressing the warning, using the kvmalloc() instead of
kmalloc() will do that --- and it does make ext4 friendly in the case
of where we are storing, say, a 30KB Windows ACL as an extended
attribute, since it avoided needing to make a order 3 page allocation.
(Which again, as far as I'm concerned, is more important than the
suppressing the page_alloc warning.)

We may ultimately decide to clamp EXT4_XATTR_SIZE_MAX to
XATTR_SIZE_MAX, but one could imagine some system attribute that in
the future might want to be larger than 32k, that wouldn't be accessed
via the standard xattr API.  That seems unlikely, but I want to keep
our options open.

Cheers,

					- Ted

  reply	other threads:[~2022-12-09  5:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  2:32 [PATCH v3 0/4] Fix two issue about ext4 extended attribute Ye Bin
2022-12-08  2:32 ` [PATCH v3 1/4] ext4: fix WARNING in ext4_expand_extra_isize_ea Ye Bin
2022-12-09  5:35   ` Theodore Ts'o [this message]
2022-12-08  2:32 ` [PATCH v3 2/4] ext4: allocate extended attribute value in vmalloc area Ye Bin
2022-12-09  5:35   ` Theodore Ts'o
2022-12-08  2:32 ` [PATCH v3 3/4] ext4: rename xattr_find_entry() and __xattr_check_inode() Ye Bin
2022-12-09  5:38   ` Theodore Ts'o
2022-12-08  2:32 ` [PATCH v3 4/4] ext4: fix inode leak in 'ext4_xattr_inode_create()' Ye Bin
2022-12-09  5:39   ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5LJHI1cHDK0Stjq@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+4d99a966fd74bdeeec36@syzkaller.appspotmail.com \
    --cc=yebin10@huawei.com \
    --cc=yebin@huaweicloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).