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 4204A7082D for ; Mon, 23 Mar 2026 18:32:00 +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=1774290722; cv=none; b=sQkDVuMPrkYLubGgxOfj6bdJo6hDI4KhrAz2N6C28OaHHLtmMdwaV9qdYHhcEnmMX3ukkkWSO1v42CRP07F19U+eYC+EJCXe/lOhk6fs6oEG+KwQAJ3equFsL5hklknEu18It+RhKxHYn8m2L+7vs34qxRh06JNMN0OWYMkL584= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774290722; c=relaxed/simple; bh=b6ln7PjHS2RGrgt7TglRq4f5aMjKi0MJsKN8p2G6RHA=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=IOzwK8Io97urXi/qxwaAlmFnn2CGEUMjJYZT1tSN9PGjdjy6TiX2A5IWo2DS6IwYoyaasWqmCFQ/+v8NfBSzlyNSFM2V+7ddPj00lGn5c5gyttvfyh3PVE/5KMNHaCyvOtfyPBM2174S0FlesgMJDO+NuQDRjCglIgKFmSaHfbk= 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=S+8WfiEa; 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="S+8WfiEa" 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 62NIF6e82919574 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 23 Mar 2026 11:15:07 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 62NIF6e82919574 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026022301; t=1774289708; bh=wdMHT3rGuDt8IZVVVSTafOGHf3HTUQa/r8RmbSvHxOI=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=S+8WfiEa9t3+FKDsHmBVYhmlR7cx7YDAyBLEZLDLqx02Tc8Vq3ekCGmbLZgjxezFy RB38v9aWALAyq/Ijcag2YPYRo9Uemav0raRJCVZcRIdsNLDTIH4ozPYWyvFHREhLsm t3+cSPrS6Js9ugoMoltH5aODTdJWh6wefjJaVFyzMqWS8TypHGAvWauDqmlYakW9ov oM5ks1w4Pys+C8MgdHhM8v68A6rC6ontK+9U5KWUiixL4iaPAXsf0ziNF9FqenGQor xzKgmbhIpGzV4cFSClEwAq0VxWedVApb7cpgTsU9AevBUZtWDEltFUwWapZ+GvkP7A inmT6tk7Sy/Ug== Date: Mon, 23 Mar 2026 11:15:01 -0700 From: "H. Peter Anvin" To: Maciej Wieczor-Retman , Borislav Petkov CC: tglx@kernel.org, peterz@infradead.org, xin@zytor.com, maciej.wieczor-retman@intel.com, babu.moger@amd.com, chang.seok.bae@intel.com, sohil.mehta@intel.com, dave.hansen@linux.intel.com, jpoimboe@kernel.org, elena.reshetova@intel.com, pawan.kumar.gupta@linux.intel.com, ak@linux.intel.com, darwi@linutronix.de, mingo@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v11 2/4] x86/cpu: Check if feature string is non-zero User-Agent: K-9 Mail for Android In-Reply-To: References: <20260323140222.GCacFH7gxMNOw-smj4@fat_crate.local> <20260323162324.GFacFo_LVNMJtPT6w8@fat_crate.local> <20260323175151.GIacF9t0vrWxk1L9sB@fat_crate.local> Message-ID: <1DF9B057-5A26-4BDF-BEEE-084D40B559BF@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 23, 2026 11:11:33 AM PDT, Maciej Wieczor-Retman wrote: >On 2026-03-23 at 18:51:51 +0100, Borislav Petkov wrote: >>On Mon, Mar 23, 2026 at 04:58:20PM +0000, Maciej Wieczor-Retman wrote: >>> Ah sorry, it's a bit of a misunderstanding, the X86_CAP_BUF_SIZE refer= s only to >>> the value that's needed for a buffer when the word:bit format is retur= ned=2E >>> Otherwise the const char * is returned from the x86_cap_flags[] array= =2E >> >>Yes, I know that=2E That's why I said: >> >>"But this macro name is generically saying, this is the cap string size= =2E Which >>makes it misleading=2E" >> >>> So I guess the constant name should be different? Maybe X86_CAP_NUM_BU= F_SIZE? >> >>#define X86_NAMELESS_FEAT_STRLEN >> >>or so=2E >> >>Your naming must be explicit and denote for what this is used=2E >> >>-- >>Regards/Gruss, >> Boris=2E >> >>https://people=2Ekernel=2Eorg/tglx/notes-about-netiquette > >Thanks! I'll correct it > Call it "BUF" or "BUFLEN"=2E It's not the length of the string, but the le= ngth of the buffer for the caller to allocate=2E