From: Al Viro <viro@zeniv.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: asmadeus@codewreck.org, Leo Stone <leocstone@gmail.com>,
syzbot+03fb58296859d8dbab4d@syzkaller.appspotmail.com,
ericvh@gmail.com, ericvh@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux_oss@crudebyte.com, lucho@ionkov.net,
syzkaller-bugs@googlegroups.com,
v9fs-developer@lists.sourceforge.net, v9fs@lists.linux.dev,
Fedor Pchelkin <pchelkin@ispras.ru>,
Seth Forshee <sforshee@kernel.org>,
Christian Brauner <brauner@kernel.org>
Subject: Re: Alloc cap limit for 9p xattrs (Was: WARNING in __alloc_frozen_pages_noprof)
Date: Wed, 11 Dec 2024 22:55:00 +0000 [thread overview]
Message-ID: <20241211225500.GH3387508@ZenIV> (raw)
In-Reply-To: <CAHk-=wiH+FmLBGKk86ung9Qbrwd0S-7iAnEAbV9QDvX5vAjL7A@mail.gmail.com>
On Wed, Dec 11, 2024 at 01:32:26PM -0800, Linus Torvalds wrote:
> On Wed, 11 Dec 2024 at 13:04, <asmadeus@codewreck.org> wrote:
> >
> > Christian Schoenebeck's suggestion was something like this -- I guess
> > that's good enough for now and won't break anything (e.g. ACLs bigger
> > than XATTR_SIZE_MAX), so shall we go with that instead?
>
> Please use XATTR_SIZE_MAX. The KMALLOC_MAX_SIZE limit seems to make no
> sense in this context.
>
> Afaik the VFS layer doesn't allow getting an xattr bigger than
> XATTR_SIZE_MAX anyway, and would return E2BIG for them later
> regardless, so returning anything bigger wouldn't work anyway, even if
> p9 tried to return such a thing up to some bigger limit.
E2BIG on attempt to set, quiet cap to XATTR_SIZE_MAX on attempt to get
(i.e. never asking more than that from fs) and if filesystem complains
about XATTR_SIZE_MAX not being enough, E2BIG it is (instead of ERANGE
normally expected on "your buffer is too small for that").
next prev parent reply other threads:[~2024-12-11 22:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 10:05 [syzbot] [v9fs?] WARNING in __alloc_frozen_pages_noprof syzbot
2024-12-11 20:02 ` Leo Stone
2024-12-11 20:28 ` [syzbot] [v9fs?] " syzbot
2024-12-11 21:04 ` Alloc cap limit for 9p xattrs (Was: WARNING in __alloc_frozen_pages_noprof) asmadeus
2024-12-11 21:32 ` Linus Torvalds
2024-12-11 22:55 ` Al Viro [this message]
2024-12-12 10:17 ` Christian Schoenebeck
2024-12-12 11:22 ` Christian Schoenebeck
2024-12-11 21:04 ` [syzbot] Re: [syzbot] [v9fs?] WARNING in __alloc_frozen_pages_noprof syzbot
2024-12-12 0:20 ` [PATCH] 9p: Limit xattr size to XATTR_SIZE_MAX Leo Stone
2026-05-18 16:36 ` Forwarded: Re: [PATCH RFC] drm/lease: Fix warning on large user-controlled allocations syzbot
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=20241211225500.GH3387508@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=asmadeus@codewreck.org \
--cc=brauner@kernel.org \
--cc=ericvh@gmail.com \
--cc=ericvh@kernel.org \
--cc=leocstone@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=pchelkin@ispras.ru \
--cc=sforshee@kernel.org \
--cc=syzbot+03fb58296859d8dbab4d@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=v9fs@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.