lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <933f2a1e-8a57-46a1-bedf-73ae3d67ed4c@nvidia.com>
Date: Wed, 25 Jun 2025 04:34:40 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Daniel Wagner <wagi@...nel.org>, Jens Axboe <axboe@...nel.dk>, Christoph
 Hellwig <hch@....de>
CC: Keith Busch <kbusch@...nel.org>, Sagi Grimberg <sagi@...mberg.me>,
	"Michael S. Tsirkin" <mst@...hat.com>, "Martin K. Petersen"
	<martin.petersen@...cle.com>, Thomas Gleixner <tglx@...utronix.de>, Costa
 Shulyupin <costa.shul@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
	Valentin Schneider <vschneid@...hat.com>, Waiman Long <llong@...hat.com>,
	Ming Lei <ming.lei@...hat.com>, Frederic Weisbecker <frederic@...nel.org>,
	Hannes Reinecke <hare@...e.de>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-block@...r.kernel.org"
	<linux-block@...r.kernel.org>, "linux-nvme@...ts.infradead.org"
	<linux-nvme@...ts.infradead.org>, "megaraidlinux.pdl@...adcom.com"
	<megaraidlinux.pdl@...adcom.com>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>, "storagedev@...rochip.com"
	<storagedev@...rochip.com>, "virtualization@...ts.linux.dev"
	<virtualization@...ts.linux.dev>, "GR-QLogic-Storage-Upstream@...vell.com"
	<GR-QLogic-Storage-Upstream@...vell.com>
Subject: Re: [PATCH 1/5] lib/group_cpus: Let group_cpu_evenly() return the
 number of initialized masks

On 6/17/25 06:43, Daniel Wagner wrote:
> group_cpu_evenly() might have allocated less groups then requested:
>
> group_cpu_evenly()
>    __group_cpus_evenly()
>      alloc_nodes_groups()
>        # allocated total groups may be less than numgrps when
>        # active total CPU number is less then numgrps
>
> In this case, the caller will do an out of bound access because the
> caller assumes the masks returned has numgrps.
>
> Return the number of groups created so the caller can limit the access
> range accordingly.
>
> Acked-by: Thomas Gleixner<tglx@...utronix.de>
> Reviewed-by: Hannes Reinecke<hare@...e.de>
> Reviewed-by: Ming Lei<ming.lei@...hat.com>
> Signed-off-by: Daniel Wagner<wagi@...nel.org>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ