linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	 "Darrick J. Wong" <djwong@kernel.org>,
	SHAURYA RANE <ssrane_b23@ee.vjti.ac.in>,
	akpm@linux-foundation.org,  shakeel.butt@linux.dev,
	eddyz87@gmail.com, andrii@kernel.org, ast@kernel.org,
	 linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev,  skhan@linuxfoundation.org,
	david.hunter.linux@gmail.com, khalid@kernel.org,
	 syzbot+09b7d050e4806540153d@syzkaller.appspotmail.com,
	 bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH] mm/filemap: fix NULL pointer dereference in do_read_cache_folio()
Date: Wed, 19 Nov 2025 09:12:13 -0800	[thread overview]
Message-ID: <CAEf4BzYWBUE0VseYgoa4r+UndxiOdCWazZ5FgZxi=dfhXaM16g@mail.gmail.com> (raw)
In-Reply-To: <aR1awLOhdOXNMl9c@infradead.org>

On Tue, Nov 18, 2025 at 9:50 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Tue, Nov 18, 2025 at 11:27:47AM -0800, Andrii Nakryiko wrote:
> > Then please help make it better, give us interfaces you think are
> > appropriate. People do use this functionality in production, it's
> > important and we are not going to drop it. In non-sleepable mode it's
> > best-effort, if the requested part of the file is paged in, we'll
> > successfully read data (such as ELF's build ID), and if not, we'll
> > report that to the BPF program as -EFAULT. In sleepable mode, we'll
> > wait for that part of the file to be paged in before proceeding.
> > PROCMAP_QUERY ioctl() is always in sleepable mode, so it will wait for
> > file data to be read.
>
> That's pretty demanding:  "If you don't give me the interface that I want
> I'll just poke into internals and do broken shit" isn't really the
> best way to make friends and win influence.,

Did you read the second part of my reply? The functionality in
question ([0]) was developed in the open, over multiple revisions,
with both mm and fsdevel mailing list CC'ed. Matthew Wilcox did look
at this, provided feedback and suggestion to use filemap_get_folio() +
read_cache_folio(), which I did incorporate.

  [0] https://lore.kernel.org/bpf/20240829174232.3133883-1-andrii@kernel.org/

>
> > If you don't like the implementation, please help improve it, don't
> > just request dropping it "because BPF folks" or anything like that.
>
> Again, you're trying to put a lot of work you should have done on
> others.  Everyone here is pretty helpful guiding when asking for help,
> but being asked at gunpoint to cleanup the mess your created is not
> going to get everyone drop their work and jump onto your project.

Gunpoint, really?.. Am I not asking for help to improve the code? This
functionality is being used, and we can't "just rip it out" as you
propose. Let's fix it instead.


  reply	other threads:[~2025-11-19 17:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 19:37 ssrane_b23
2025-11-14 20:44 ` Matthew Wilcox
2025-11-16  5:42   ` [PATCH v2] " ssrane_b23
2025-11-16  5:43   ` [PATCH] " SHAURYA RANE
2025-11-16 22:32     ` Matthew Wilcox
2025-11-17 14:10       ` Shaurya Rane
2025-11-17 18:42         ` Andrii Nakryiko
2025-11-17 16:41       ` Darrick J. Wong
2025-11-17 18:03         ` Matthew Wilcox
2025-11-17 18:45           ` Andrii Nakryiko
2025-11-18 13:03             ` Christoph Hellwig
2025-11-18 15:37               ` Matthew Wilcox
2025-11-18 16:12                 ` Darrick J. Wong
2025-11-18 19:38                   ` Andrii Nakryiko
2025-11-19  5:52                     ` Christoph Hellwig
2025-11-19  6:29                     ` Darrick J. Wong
2025-11-18 19:27                 ` Andrii Nakryiko
2025-11-19  5:50                   ` Christoph Hellwig
2025-11-19 17:12                     ` Andrii Nakryiko [this message]
2025-11-18  5:05       ` Christoph Hellwig
2025-11-18 12:51         ` Matthew Wilcox
2025-11-18 12:56           ` Christoph Hellwig

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='CAEf4BzYWBUE0VseYgoa4r+UndxiOdCWazZ5FgZxi=dfhXaM16g@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=david.hunter.linux@gmail.com \
    --cc=djwong@kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=hch@infradead.org \
    --cc=khalid@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shakeel.butt@linux.dev \
    --cc=skhan@linuxfoundation.org \
    --cc=ssrane_b23@ee.vjti.ac.in \
    --cc=syzbot+09b7d050e4806540153d@syzkaller.appspotmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \
    /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