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: <7C458D74-49E8-4FFE-BD60-74CA3ABFDC6C@zytor.com>
Date: Tue, 20 Jan 2026 10:17:09 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...en8.de>
CC: David Desobry <david.desobry@...malgen.com>, tglx@...nel.org,
        mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/lib: Fix num_digits() signed overflow for INT_MIN

On January 20, 2026 10:02:06 AM PST, "H. Peter Anvin" <hpa@...or.com> wrote:
>On January 20, 2026 8:40:50 AM PST, Borislav Petkov <bp@...en8.de> wrote:
>>On Tue, Jan 20, 2026 at 08:23:16AM -0800, H. Peter Anvin wrote:
>>> That has got to be the dumbest possible implementation of that task, bug or no bug.
>>
>>LOL, did you read the comment above that function?
>>
>>ROTFL.
>>
>
>I did. No wonder it sucked! 🤣
Seriously, though. As Linus likes to point out, there is a huge difference between "this is stupid" and "you are stupid."

I have said "this is stupid" about my own code more times than I can count. For good reason. 

To be honest, I didn't even need to see the comment to know that that was probably my code in the first place. I recognized my own style at a glance; in particular the kind of code I tend to write specifically for the purpose of small as opposed to fast code. I remember writing this code while waiting for a table in a restaurant :) but I don't remember the context.

I was in a hurry but I almost put in a snark saying "this must be my code or something." :)

Anyway, I do not mind anyone calling my code stupid, especially if it actually is. It may or may not have been stupid in the first place, or the context might have changed, but it doesn't really matter — replacing stupid code is how we improve Linux :)

    -hpa (proud author of plenty of stupid code) 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ