From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-b6-smtp.messagingengine.com (flow-b6-smtp.messagingengine.com [202.12.124.141]) (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 2B6BA1339A4; Thu, 24 Jul 2025 11:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753356894; cv=none; b=WSl8LtaW9YuxnGJ3wC3qq8Kpnf7mVLuCm36FhiCPCx7g8SCE7ssTTV9NXJ/jPpeqNO6WxUfp7eBSnPsmcLwAnwxxly8XIijc1eYvX+1ZjvrCYQbQaYHykJHdbqoB6eeMkaae/r8RPby6V46FSJ7+cVCJcLNAR0CkoodueAW8ELE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753356894; c=relaxed/simple; bh=SoMhZ76vgVDSFxSBf5IMdj3LjxZmenzhbkKzcjKrPjo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PxtC+Mqegfb1VfDLiurve5wTxBDR2WHbUgiDXDWHlDJx6bNSMbth0JW1fUn6bMrkTZOd7/h1a7ZQ0oUWb2lqWEjGNtU5uaYzyW2+4MY7lixcFLeEutMzgoLzV+2vP+bMzhNxzUVqGiR8xwxsGWd1v46IcC7eF1lYXsG94ynMgvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com; spf=pass smtp.mailfrom=kroah.com; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b=Lhi4KC0j; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=oJcOTe0r; arc=none smtp.client-ip=202.12.124.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kroah.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kroah.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="Lhi4KC0j"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="oJcOTe0r" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailflow.stl.internal (Postfix) with ESMTP id 3EFF2130208F; Thu, 24 Jul 2025 07:34:50 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Thu, 24 Jul 2025 07:34:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1753356890; x=1753364090; bh=ayZPjTbnqa GMIbyiNla0DcfzBuX0r5Ej8CoWt6fQIes=; b=Lhi4KC0jV5xluRUm3bB4L3qaNU vOo5/p9eXlVCqRsHi7pOaVZp+J5CgVYVZAa488ZVbJf/yQ4IpD9WWnztUooPNGdw MHdsJ7wWBvbMVI/lvJWdCn4EFmP0lHitMHBZr+CXC1MsgOl8dLetnTkoSBzfL1Gg vrYPl6IYJxoMromhpQLNMlEARyfV+Po9EyI1S4Y/UPLVl0CfDa9kBpPqFYkQ4aEe SNHu5sQ+cpK133mSdxh66I+wtgMLuTYEzPB1ee61LY/N151BPvmNlYpH2VL9AB6S Xii8nDOonqwxIlyWQn8GKUnDwDASXGN05ptZrYJqb5SeeiCcg9wcDz95Tpkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1753356890; x=1753364090; bh=ayZPjTbnqaGMIbyiNla0DcfzBuX0r5Ej8Co Wt6fQIes=; b=oJcOTe0rddHdGy0Enco7O1vQm2Qa5J+HfVZoBqhLJ/XIo19uNPU GTItOr7WHfyrsrvUr0zJ1OjrDtDqgOnJ78uO/EsZgSbUd95A57gYOZix1X9yewQG PbNtUfX6UoYPokh+EGYJi7zPLeKG8WFPB4zMm2p6RwZfgCcV/1Dy6r8lMn1cYI9J 3cXaCyhAHDvAj+rcD/4Rha1/+6wJTxaBYBooAhu9FSoI+SdqWKNWdrT4jtCVLs5/ hp+c8Sr2/CODJWqzN2Sg5ednC+JBvIRPuj+ko5HTMJhm5uZu3PhXHvDTzPYyZ1up cRrTqs7KrXwNW3+31tcLCfEXN/YhTAC5Zeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdektdehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcumffj uceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeehgedvvedvle ejuefgtdduudfhkeeltdeihfevjeekjeeuhfdtueefhffgheekteenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtg homhdpnhgspghrtghpthhtohepfedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehmrggtihgvjhdrfihivggtiihorhdqrhgvthhmrghnsehinhhtvghlrdgtohhmpdhrtg hpthhtohepthhglhigsehlihhnuhhtrhhonhhigidruggvpdhrtghpthhtohepmhhinhhg ohesrhgvughhrghtrdgtohhmpdhrtghpthhtohepsghpsegrlhhivghnkedruggvpdhrtg hpthhtohepuggrvhgvrdhhrghnshgvnheslhhinhhugidrihhnthgvlhdrtghomhdprhgt phhtthhopeigkeeisehkvghrnhgvlhdrohhrghdprhgtphhtthhopehhphgrseiihihtoh hrrdgtohhmpdhrtghpthhtoheprhhitggrrhguohdrnhgvrhhiqdgtrghluggvrhhonhes lhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehtohhnhidrlhhutghksehinh htvghlrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Jul 2025 07:34:48 -0400 (EDT) Date: Thu, 24 Jul 2025 13:34:44 +0200 From: Greg KH To: Maciej Wieczor-Retman Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Ricardo Neri , Tony Luck , Kyung Min Park , xin3.li@intel.com, maciej.wieczor-retman@intel.com, Farrah Chen , stable@vger.kernel.org, Borislav Petkov , linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v3] x86: Clear feature bits disabled at compile-time Message-ID: <2025072440-prepaid-resilient-9603@gregkh> References: <20250724104539.2416468-1-maciej.wieczor-retman@intel.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=us-ascii Content-Disposition: inline In-Reply-To: <20250724104539.2416468-1-maciej.wieczor-retman@intel.com> Your reply-to is messed up :( On Thu, Jul 24, 2025 at 12:45:35PM +0200, Maciej Wieczor-Retman wrote: > If some config options are disabled during compile time, they still are > enumerated in macros that use the x86_capability bitmask - cpu_has() or > this_cpu_has(). > > The features are also visible in /proc/cpuinfo even though they are not > enabled - which is contrary to what the documentation states about the > file. Examples of such feature flags are lam, fred, sgx, ibrs_enhanced, > split_lock_detect, user_shstk, avx_vnni and enqcmd. > > Add a DISABLED_MASK_INITIALIZER macro that creates an initializer list > filled with DISABLED_MASKx bitmasks. > > Initialize the cpu_caps_cleared array with the autogenerated disabled > bitmask. > > Fixes: ea4e3bef4c94 ("Documentation/x86: Add documentation for /proc/cpuinfo feature flags") > Reported-by: Farrah Chen > Signed-off-by: H. Peter Anvin (Intel) > Signed-off-by: Maciej Wieczor-Retman > Cc: > --- > Resend: > - Fix macro name to match with the patch message. That's a v4, not a RESEND. Doesn't Intel have a "Here is how to submit a patch to the kernel" training program you have to go through? confused, greg k-h