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: <eac13252-cbc3-4396-895b-bd0800c7318e@oracle.com>
Date: Fri, 30 Jan 2026 12:21:45 +0000
From: John Garry <john.g.garry@...cle.com>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: kernel@...0n.name, jiaxun.yang@...goat.com, tsbogend@...ha.franken.de,
        tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
        dave.hansen@...ux.intel.com, hpa@...or.com, luto@...nel.org,
        peterz@...radead.org, arnd@...db.de, x86@...nel.org,
        loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org, linux-arch@...r.kernel.org,
        vulab@...as.ac.cn, gregkh@...uxfoundation.org, rafael@...nel.org,
        dakr@...nel.org
Subject: Re: [PATCH v2 3/4] MIPS: Loongson: Make cpumask_of_node() robust
 against NUMA_NO_NODE

On 25/01/2026 03:55, Huacai Chen wrote:
> Reviewed-by: Huacai Chen <chenhuacai@...ngson.cn>

Thanks

So can a loongarch or mips maintainer pick this up please?

> 
> On Wed, Jan 7, 2026 at 5:51 PM John Garry <john.g.garry@...cle.com> wrote:
>>
>> The arch definition of cpumask_of_node() cannot handle NUMA_NO_NODE - which
>> is a valid index - so add a check for this.
>>
>> Signed-off-by: John Garry <john.g.garry@...cle.com>
>> ---
>>   arch/mips/include/asm/mach-loongson64/topology.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/include/asm/mach-loongson64/topology.h b/arch/mips/include/asm/mach-loongson64/topology.h
>> index 3414a1fd17835..89bb4deab98a6 100644
>> --- a/arch/mips/include/asm/mach-loongson64/topology.h
>> +++ b/arch/mips/include/asm/mach-loongson64/topology.h
>> @@ -7,7 +7,7 @@
>>   #define cpu_to_node(cpu)       (cpu_logical_map(cpu) >> 2)
>>
>>   extern cpumask_t __node_cpumask[];
>> -#define cpumask_of_node(node)  (&__node_cpumask[node])
>> +#define cpumask_of_node(node)    ((node) == NUMA_NO_NODE ? cpu_all_mask : &__node_cpumask[node])
>>
>>   struct pci_bus;
>>   extern int pcibus_to_node(struct pci_bus *);
>> --
>> 2.43.5
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ