Re: [PATCH] x86/lib: Fix num_digits() signed overflow for INT_MIN

From: Borislav Petkov

Date: Tue Jan 20 2026 - 16:23:06 EST


On Tue, Jan 20, 2026 at 12:24:07PM -0800, H. Peter Anvin wrote:
> The switch is a good improvement. I would say, though, that if we don't need
> signed input then we should just take out the minus handling code and have the
> function take an unsigned int as input.

Yah.

Thx.

--
Regards/Gruss,
Boris.

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