From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B3DB3A35BE for ; Tue, 20 Jan 2026 19:51:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938706; cv=none; b=dMMtcy3belOMhMmAd9X/Ut+0ZL2O5CxaexGoDRjg3RWCiNkPiYejG2H9bVkF/Z10pP5S7OrWl2A/OvkMpVjcxiCvj1xRhxJ+8NC4p4MLAkaCyyf4J5759VnhtCa+lH7zdNWqGmmM3MjLsKcJs4/SvQd+86nLwkQ3QvfzzZx8lIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938706; c=relaxed/simple; bh=aR6QUqJrxTeCYMzNIZCy+lfxySyE/z7lfWKcZR7WxCM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=frbL/pn0hWFL/fo6MaSusjKfwazywzbSLlNFtWHhfV2oU1pnOnCgcaWC9zxQvwqup91Y6tdBhdP6GiysSAtD/rgMNzODMRsv2Je3f7wF2PZVt0cG5BGWyfB25C8XlvL4jAGdllh13Oz6xsNgul3LT+1nl4LOLaNYyNdkOADF7+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=f6fRlcYc; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="f6fRlcYc" Received: from [IPV6:2601:646:8081:9483:12c5:bc8e:d949:3497] ([IPv6:2601:646:8081:9483:12c5:bc8e:d949:3497]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 60KJok943892087 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 20 Jan 2026 11:51:04 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 60KJok943892087 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025122301; t=1768938664; bh=VgvNfoIOlsCkTq34axINTDSHA1+Ie2uS2Nr9Gi6/IFg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=f6fRlcYc5B2jjIAJtwVq5m1xyEj/NJPb0W55DJ+wiGTNLCQh4VtBRvxHKee7Q9wKS aflKPhE6vge2c/tiGlnT6DQCkMLf1YKtW0TNXoE9MS2IoZFuMouqQe1eTeEpsIxSdv APzNuvFXAO6NvyUnZFXhQu0xiW207QrraYZoXO5bQpHOsGFkfXWp5JdfIbVC/vbJft KqIoGvBRMP6U3/VXfdnjBx7e1cvK9fV2f5J9lOcBgE5q1JhTpWQBUF8jtwJBTWkxt7 7YfqFMMa/EG6QlV8TVj27l0QrvL7ght48LAUf3OTwaLQ5a/zddm1wgVOxskIVx424f dDsZuB+/E8BFA== Message-ID: Date: Tue, 20 Jan 2026 11:50:41 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/lib: Fix num_digits() signed overflow for INT_MIN To: Borislav Petkov , David Desobry Cc: tglx@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <20260120094258.41313-1-david.desobry@formalgen.com> <53DB5B87-BA96-44B1-AE1B-9055CB7B9350@zytor.com> <20260120164050.GBaW-wEvzp9WVFj9n9@fat_crate.local> <7C458D74-49E8-4FFE-BD60-74CA3ABFDC6C@zytor.com> <20260120191655.GDaW_Up2ZOv5AHhbq7@fat_crate.local> Content-Language: en-US, sv-SE From: "H. Peter Anvin" In-Reply-To: <20260120191655.GDaW_Up2ZOv5AHhbq7@fat_crate.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2026-01-20 11:16, Borislav Petkov wrote: > > Absolutely. We do that all the time and it used to work back then. Hell, it > works fine for CPU numbers but if someone wants to give it INT_MIN... we > didn't care about that. We needed it for this gunk: > > a17bce4d1dce ("x86/boot: Further compress CPUs bootup message") > For negative numbers? Dave Hansen pointed out that we currently don't ever pass negative numbers, in which case it would make more sense to have the function simply take an unsigned int. -hpa