linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Shaurya Rane <ssrane_b23@ee.vjti.ac.in>,
	"Darrick J . Wong" <djwong@kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Meta kernel team <kernel-team@meta.com>,
	bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	syzbot+09b7d050e4806540153d@syzkaller.appspotmail.com,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH bpf v2] lib/buildid: use __kernel_read() for sleepable context
Date: Mon, 22 Dec 2025 05:33:41 +0000	[thread overview]
Message-ID: <aUjYNUNygZh87Yih@casper.infradead.org> (raw)
In-Reply-To: <CAEf4BzY2YYJJsMx8BgkKk7BG67pj52stv_GRGwZkj3jnuipw+Q@mail.gmail.com>

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.


  reply	other threads:[~2025-12-22  5:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18 20:55 Shakeel Butt
2025-12-18 21:21 ` Andrew Morton
2025-12-18 23:55 ` Matthew Wilcox
2025-12-19  0:16   ` Shakeel Butt
2025-12-19  4:07     ` Matthew Wilcox
2025-12-19  5:58       ` Shakeel Butt
2025-12-19 17:42         ` Andrii Nakryiko
2025-12-22  5:33           ` Matthew Wilcox [this message]
2025-12-22  5:31         ` Matthew Wilcox
2025-12-22 19:41           ` Shakeel Butt

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=aUjYNUNygZh87Yih@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shakeel.butt@linux.dev \
    --cc=ssrane_b23@ee.vjti.ac.in \
    --cc=syzbot+09b7d050e4806540153d@syzkaller.appspotmail.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