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 F4170439005 for ; Tue, 20 Jan 2026 18:17:44 +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=1768933066; cv=none; b=h9W2eWBfXFlJL/lrhW0mWa3LmgN4tEpuxXXNaaF+tQcRQqowf+hZxkFfGe9F7NT07PatrqnbJ7XG3FOW8bH3lKRu+y+EyQ1YiEiA+zi2UjuAWUFFEQkV5AI1Au+ifSMJD0I5MC6DW9I30ip1mBbpj/9mH5UZrFWDlmWsMOCXHDk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768933066; c=relaxed/simple; bh=4HIjsxxlkoRWRllSLUq4BhcHosJuNGQPMPoMRU7q2qI=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=Cx14QlPpc/jv0EXeqIcvhv0GqQ4qvTU6dkG6a9zw2mB71/4YlcwlmXfFOUZLN5MRt9W/l810fGcHTNTvs3ScvK6BAfF2edSEIYisQIkkeqYHBnFNADXKi4AwpREp80mhaccDulwtfFVGs0Khz38Ll69kxvIAbn9bBK/yctZuX/c= 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=T8f5ayZG; 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="T8f5ayZG" Received: from ehlo.thunderbird.net (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 60KIHEmk3823894 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 20 Jan 2026 10:17:15 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 60KIHEmk3823894 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025122301; t=1768933035; bh=N/euDveJoeEmJXg9ulRK6tEYTFyUzhhg11TbYpaMq/w=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=T8f5ayZGDFXITUC4993pUHyNvCObgm0fIwAXavutW2H2MSYmECctQEOuiKW8BPi0i 0zCA80JgcPO81O+YxtCv6gj7LVPrAJkDhMYW1SummFD3NWvkUYcxyMi1qy63IKX3M6 i44FQACIviyU4jQ5ucQWr1omnamJSleFxOQFRz8jDfnmQjej3/BopzVmweKSY35oKN slMMYRJxSAoSs54LNXf+LeOAX+J/2eydh908OTDkoHYnYDLaaZrkDPAaS4kmSmA6+7 8fjqAqDrM02TlnOBpE42/1VyL4Uk3KeyY20M1TZ7jzYbDRqGMmb8pT77jVg1hElX/h s6FyegIxgjauA== Date: Tue, 20 Jan 2026 10:17:09 -0800 From: "H. Peter Anvin" To: Borislav Petkov CC: David Desobry , tglx@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/lib: Fix num_digits() signed overflow for INT_MIN User-Agent: K-9 Mail for Android In-Reply-To: References: <20260120094258.41313-1-david.desobry@formalgen.com> <53DB5B87-BA96-44B1-AE1B-9055CB7B9350@zytor.com> <20260120164050.GBaW-wEvzp9WVFj9n9@fat_crate.local> Message-ID: <7C458D74-49E8-4FFE-BD60-74CA3ABFDC6C@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On January 20, 2026 10:02:06 AM PST, "H=2E Peter Anvin" w= rote: >On January 20, 2026 8:40:50 AM PST, Borislav Petkov wrot= e: >>On Tue, Jan 20, 2026 at 08:23:16AM -0800, H=2E Peter Anvin wrote: >>> That has got to be the dumbest possible implementation of that task, b= ug or no bug=2E >> >>LOL, did you read the comment above that function? >> >>ROTFL=2E >> > >I did=2E No wonder it sucked! =F0=9F=A4=A3 Seriously, though=2E As Linus likes to point out, there is a huge differen= ce between "this is stupid" and "you are stupid=2E" I have said "this is stupid" about my own code more times than I can count= =2E For good reason=2E=20 To be honest, I didn't even need to see the comment to know that that was = probably my code in the first place=2E I recognized my own style at a glanc= e; in particular the kind of code I tend to write specifically for the purp= ose of small as opposed to fast code=2E I remember writing this code while = waiting for a table in a restaurant :) but I don't remember the context=2E I was in a hurry but I almost put in a snark saying "this must be my code = or something=2E" :) Anyway, I do not mind anyone calling my code stupid, especially if it actu= ally is=2E It may or may not have been stupid in the first place, or the co= ntext might have changed, but it doesn't really matter =E2=80=94 replacing = stupid code is how we improve Linux :) -hpa (proud author of plenty of stupid code)=20