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 6C7E73A640F for ; Mon, 30 Mar 2026 22:02:13 +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=1774908135; cv=none; b=IG1lSebAO4HoS/BlI6f5Eh8BeBWvpIUSqNHdjcGRQMacJCDyNLebWIaxC0Krn5zg2/GNnzQ/AI8uca5LORLKnCmxqtSiAYbeWeer+MNkIGFHl0LvgTV67NdLguw5E4MDrPVjTgYXUN+UDUqjPxq8xJiWj04F78Zd5XIoeeA+H0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774908135; c=relaxed/simple; bh=dMKfSiekgxZjkTh13fWD4CvvDo1V2lUVqVWSBhhckd0=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=auRo/zb/pTGrJ2b1nfNRfKN6uhbUYyAOVi4WMkIqrV5xdWCPOBa01VAovO/m24Y8SqNfOwILWVskgqkeMDp3Yx1/zzGjbJ1d0zu7xBLsoa6xjC2vu93UspUSaznrvcaQtjmHmb9nQCOuVRVDc0+6ENPaSAzi117k8lkt9ZhOiHw= 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=MPUjEoA8; 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="MPUjEoA8" Received: from ehlo.thunderbird.net ([172.59.162.180]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 62ULj2w02672652 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 30 Mar 2026 14:45:03 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 62ULj2w02672652 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026032601; t=1774907104; bh=XDOrkvsYkeY2oA0k/Lj9hBYAubVJ40xWUQB/u2scLms=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=MPUjEoA8XCHDF81Px6krqO91nxdm2n2tbiX+yaLPUmsomMfU8LL/sWjjBJ3mD8BCl Kch4B+34VhWb3Lt+06s5Vw7mb5WvEmN6TPQjMmCICy3X7h6W8kY7fxo/ccVPgcau2W V7w/3mx1a0N2adBH6+2fft8ccBnOLsWOfKuJ8SxtbnYAGdJ7+Sw7RpUa6oBuoFP1Ui qDGgC0sfXgkr7+IXHu6Z7pdgN2YPPRYI3L3uxCsYj6Cq+SnqmQoA5qCm6ngh7Uoyaf 7tcWOYl7Sbj1zIxVNLXSzQ4wuI4rfZGYboUxpLEFtcGL2DFVUxwIERnFs+OSTvvmHZ mhbKoHljaKNGw== Date: Mon, 30 Mar 2026 14:44:56 -0700 From: "H. Peter Anvin" To: Borislav Petkov , Maciej Wieczor-Retman CC: dave.hansen@linux.intel.com, xin@zytor.com, chang.seok.bae@intel.com, mingo@redhat.com, elena.reshetova@intel.com, maciej.wieczor-retman@intel.com, babu.moger@amd.com, sohil.mehta@intel.com, pawan.kumar.gupta@linux.intel.com, pmladek@suse.com, nik.borisov@suse.com, ptesarik@suse.com, darwi@linutronix.de, tglx@kernel.org, peterz@infradead.org, jpoimboe@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v12 2/4] x86/cpu: Check if feature string is non-zero User-Agent: K-9 Mail for Android In-Reply-To: <20260330211511.GIacrn373-FN3Yy_p4@fat_crate.local> References: <20260330200045.GUacrWbcsBhp9a-kfb@fat_crate.local> <20260330211511.GIacrn373-FN3Yy_p4@fat_crate.local> Message-ID: <3CFC48BC-615C-4A39-A660-2B348DF13B9E@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 March 30, 2026 2:15:11 PM PDT, Borislav Petkov wrote: >On Mon, Mar 30, 2026 at 08:42:11PM +0000, Maciej Wieczor-Retman wrote: >> + * Return the feature's "name" if available, otherwise return the >> + * feature's bit numerals in "word:bit" format so it's easier to ident= ify=2E > >This "numerals" thing is meh but I see why people use it=2E > >It doesn't get any clearer than "word number and bit position"=2E > >> X86_NAMELESS_FEAT_BUF? >>=20 >> X86_NUM_FEAT_BUF? >>=20 >> Not sure how to make it much more shorter without making it also unread= able=2E > >Yeah, I'm at the same spot as you - I can't think of a better name=2E > >Since it is not too widespread, let's leave the longer, more descriptive = one >and we can change it later if really needed=2E > >Thx=2E > The Right Thing=E2=84=A2 would be to have a table in the kernel which incl= udes *all* the feature bit names, not just the ones exported to /proc/cpuin= fo, and use the unfiltered string table for kernel messages (/proc/cpuinfo = being filtered via a bitmask, list, or a flag in the table=2E) I asked Maciej to look into it, and he has been, but I told him to not com= plicate this patchset too much by trying to fix everything in one shot =E2= =80=94 because it does ends up touching code in a surprisingly large set of= places=2E=20 It doesn't help one iota, either, that modprobe is supposed to know what t= he numeric bit positions mean, either=2E It is a pretty egregious design er= ror=2E