From: Mike Rapoport <rppt@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: "Michael Neuling" <mikey@neuling.org>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Aleksa Paunovic" <aleksa.paunovic@htecgroup.com>,
"Aleksandar Rikalo" <arikalo@gmail.com>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Andrew Jones" <ajones@ventanamicro.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Djordje Todorovic" <djordje.todorovic@htecgroup.com>,
"Guo Ren" <guoren@kernel.org>,
"Junhui Liu" <junhui.liu@pigmoral.tech>,
"Kevin Brodsky" <kevin.brodsky@arm.com>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Nam Cao" <namcao@linutronix.de>,
"Oleg Nesterov" <oleg@redhat.com>,
"Oscar Salvador" <osalvador@suse.de>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Paul Walmsley" <pjw@kernel.org>,
"Qinglin Pan" <panqinglin2020@iscas.ac.cn>,
"Raj Vishwanathan4" <rvishwanathan@mips.com>,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/5] riscv: mm: Fix NULL pointer dereference in __set_memory
Date: Fri, 10 Apr 2026 10:53:57 +0300 [thread overview]
Message-ID: <adislUQ_dddOZZlW@kernel.org> (raw)
In-Reply-To: <c390be36-ac4a-4964-9072-7ccf074d2f7f@kernel.org>
On Fri, Apr 10, 2026 at 09:42:26AM +0200, David Hildenbrand (Arm) wrote:
> On 4/10/26 08:23, Michael Neuling wrote:
> >>> area = find_vm_area((void *)start);
> >>> + if (!area) {
> >>> + ret = -EINVAL;
> >>> + goto unlock;
> >>> + }
> >>> page_start = (start - (unsigned long)area->addr) >> PAGE_SHIFT;
> >>>
> >>> for (i = page_start; i < page_start + numpages; ++i) {
> >>
> >> Which caller would end up calling __set_memory() in such a way?
> >
> > It wouldn't. You're right on this and the other two. Sorry for the noise.
>
> Slopped-by: Cursor:claude-4.6-opus-high-thinking
>
> :)
It's a general tendency of LLMs to generate overly defensive code and raise
concerns about theoretical issues.
Maybe it's worth taking into account when writing prompts specific to
kernel development.
> Patch #1 seems reasonable (although non-critical); not sure about patch
> #2, leaving both to Risc-V people!
>
> --
> Cheers,
>
> David
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-04-10 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 9:11 [PATCH 0/5] riscv: Assorted bug fixes Michael Neuling
2026-04-09 9:11 ` [PATCH 1/5] riscv: errata: Fix bitwise vs logical AND in MIPS errata patching Michael Neuling
2026-04-09 9:11 ` [PATCH 2/5] riscv: ptrace: Fix register corruption in compat_riscv_gpr_set on error Michael Neuling
2026-04-09 9:11 ` [PATCH 3/5] riscv: mm: Fix NULL pointer dereference in __set_memory Michael Neuling
2026-04-09 12:37 ` David Hildenbrand (Arm)
2026-04-10 6:23 ` Michael Neuling
2026-04-10 7:42 ` David Hildenbrand (Arm)
2026-04-10 7:53 ` Mike Rapoport [this message]
2026-04-10 7:59 ` David Hildenbrand (Arm)
2026-04-10 8:55 ` Michael Neuling
2026-04-09 9:11 ` [PATCH 4/5] riscv: mm: Fix NULL dereferences in napot hugetlb functions Michael Neuling
2026-04-09 12:36 ` David Hildenbrand (Arm)
2026-04-09 9:11 ` [PATCH 5/5] riscv: mm: Fix TOCTOU race in remove_pte_mapping Michael Neuling
2026-04-09 12:32 ` David Hildenbrand (Arm)
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=adislUQ_dddOZZlW@kernel.org \
--to=rppt@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=akpm@linux-foundation.org \
--cc=aleksa.paunovic@htecgroup.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=arikalo@gmail.com \
--cc=arnd@arndb.de \
--cc=bjorn@rivosinc.com \
--cc=david@kernel.org \
--cc=djordje.todorovic@htecgroup.com \
--cc=guoren@kernel.org \
--cc=junhui.liu@pigmoral.tech \
--cc=kevin.brodsky@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=ljs@kernel.org \
--cc=mikey@neuling.org \
--cc=namcao@linutronix.de \
--cc=oleg@redhat.com \
--cc=osalvador@suse.de \
--cc=palmer@dabbelt.com \
--cc=panqinglin2020@iscas.ac.cn \
--cc=pjw@kernel.org \
--cc=rvishwanathan@mips.com \
--cc=vishal.moola@gmail.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