[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUjYNUNygZh87Yih@casper.infradead.org>
Date: Mon, 22 Dec 2025 05:33:41 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrii Nakryiko <andrii@...nel.org>,
Shaurya Rane <ssrane_b23@...vjti.ac.in>,
"Darrick J . Wong" <djwong@...nel.org>,
Christoph Hellwig <hch@...radead.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Meta kernel team <kernel-team@...a.com>, bpf@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
syzbot+09b7d050e4806540153d@...kaller.appspotmail.com,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH bpf v2] lib/buildid: use __kernel_read() for sleepable
context
On Fri, Dec 19, 2025 at 09:42:13AM -0800, Andrii Nakryiko wrote:
> From a user perspective, I'd very much appreciate it if I get exactly
> the requested amount of bytes from freader_fetch_sync(), so yeah,
> let's please keep the loop. It does seem that ret <= 0 handling is
> correct and should not result in an endless loop.
No, you don't understand. If __kernel_read() doesn't get all the data in
one call, it's not there to get. If a partial amount of data is useful
(I suspect not), we can return it, otherwise an error is the way to go.
The loop just betrays a lack of understanding of the VFS.
Powered by blists - more mailing lists