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]
Date: Tue, 12 Mar 2024 08:45:04 +0100
From: Borislav Petkov <bp@...en8.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: x86-ml <x86@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
	linux-edac <linux-edac@...r.kernel.org>
Subject: Re: [GIT PULL] EDAC updates for v6.9

On Mon, Mar 11, 2024 at 06:12:54PM -0700, Linus Torvalds wrote:
> Ho humm. Lookie here:
> 
>     static inline unsigned int topology_amd_nodes_per_pkg(void)
>     { return 0; };
> 
> that's the UP case.
> 
> Yeah, I'm assuming nobody tests this for UP,

Unless it gets randomly enabled in my randconfig builds once in a blue
moon, I'd say pretty seldomly. I've heard people raise the question
multiple times whether we should simply make CONFIG_SMP default y on x86
and frankly, it'll get rid of a whole bunch of stupid corner cases like
that...

> but it's clearly wrong to potentially do that modulus by zero.

Yep.

> So I made the merge also change that UP case of
> topology_amd_nodes_per_pkg() to return 1.
> 
> Because dammit, not only is a mod-by-zero wrong, a UP system most
> definitely has one node per package, not zero.

Yap, that's the the straight-forward thing to do, thanks for fixing it!

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ