All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Mark Harris <mark.hsj@gmail.com>
Cc: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,  Nam Cao <namcao@linutronix.de>,
	Michael Ellerman <mpe@kernel.org>,
	 linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: hwprobe: Avoid uninitialized read in hwprobe_get_cpus()
Date: Wed, 15 Jul 2026 11:14:14 -0600 (MDT)	[thread overview]
Message-ID: <35b94b17-2a2f-ae20-1156-e06c8de297cc@kernel.org> (raw)
In-Reply-To: <20260714003056.73707-1-mark.hsj@gmail.com>

On Mon, 13 Jul 2026, Mark Harris wrote:

> When cpusetsize < cpumask_size(), hwprobe_get_cpus() did not fully
> initialize its copy of the cpu mask, which could cause non-deterministic
> results from the riscv_hwprobe syscall on a system with more than 8 CPUs
> when the supplied cpu mask is empty.  Address this by fully initializing
> the cpu mask.
> 
> Fixes: e178bf146e4b ("RISC-V: hwprobe: Introduce which-cpus flag")
> Signed-off-by: Mark Harris <mark.hsj@gmail.com>
> Reviewed-by: Nam Cao <namcao@linutronix.de>
> Reviewed-by: Michael Ellerman <mpe@kernel.org>

Thanks, queued for v7.2-rc.


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Paul Walmsley <pjw@kernel.org>
To: Mark Harris <mark.hsj@gmail.com>
Cc: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,  Nam Cao <namcao@linutronix.de>,
	Michael Ellerman <mpe@kernel.org>,
	 linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: hwprobe: Avoid uninitialized read in hwprobe_get_cpus()
Date: Wed, 15 Jul 2026 11:14:14 -0600 (MDT)	[thread overview]
Message-ID: <35b94b17-2a2f-ae20-1156-e06c8de297cc@kernel.org> (raw)
In-Reply-To: <20260714003056.73707-1-mark.hsj@gmail.com>

On Mon, 13 Jul 2026, Mark Harris wrote:

> When cpusetsize < cpumask_size(), hwprobe_get_cpus() did not fully
> initialize its copy of the cpu mask, which could cause non-deterministic
> results from the riscv_hwprobe syscall on a system with more than 8 CPUs
> when the supplied cpu mask is empty.  Address this by fully initializing
> the cpu mask.
> 
> Fixes: e178bf146e4b ("RISC-V: hwprobe: Introduce which-cpus flag")
> Signed-off-by: Mark Harris <mark.hsj@gmail.com>
> Reviewed-by: Nam Cao <namcao@linutronix.de>
> Reviewed-by: Michael Ellerman <mpe@kernel.org>

Thanks, queued for v7.2-rc.


- Paul

  reply	other threads:[~2026-07-15 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  0:30 [PATCH v2] riscv: hwprobe: Avoid uninitialized read in hwprobe_get_cpus() Mark Harris
2026-07-14  0:30 ` Mark Harris
2026-07-15 17:14 ` Paul Walmsley [this message]
2026-07-15 17:14   ` Paul Walmsley

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=35b94b17-2a2f-ae20-1156-e06c8de297cc@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.hsj@gmail.com \
    --cc=mpe@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=palmer@dabbelt.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 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.