Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1101994lqo; Fri, 17 May 2024 10:38:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCr8yBBKyJJswAz2/Pt3LQfn0pVee5/PxFDg+uYAmzctch/wh6ZwoDZMgmS4D0HG6V260yFRf6hkyFgWOiZBUP+eOD1CWIO6Jk7MndGg== X-Google-Smtp-Source: AGHT+IGbSgYVnJll2G4edEHdIlkwJJWAYT1YndM+YlhdNSiERIuoEzgPb3+EY0DxaosDwWfILyqc X-Received: by 2002:a05:6358:7301:b0:192:8eec:3280 with SMTP id e5c5f4694b2df-193bcff574fmr2524838155d.29.1715967535545; Fri, 17 May 2024 10:38:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715967535; cv=pass; d=google.com; s=arc-20160816; b=MPuTY7jrA4o6191PxIsglCmSaUxNqvG9HxdF3CzvPwtaZIV20qRPXe6VZ3pQMY45nj yD4+AtzlGq+IBuylESe2LQupCD76JzOz062zYQhYSRHmelHeCQiHaYVporb/hvw2Rb6z PR8ZM2pdz0bfIDC3x31LO60owqW3PTEvmfViNSWwxpXdAzhkqPxTeFIe97jToo5VbMWf 9Y29+Zr9ZQFi0OEfVRvofBoWYlvU++ZejsUOJdSr2iP6DPs+rH1hkBywtrIcymkPHqYQ Qwiu7ssRm593s/Ux0LPZmHRbgu2T7XScHVJNNuyosfEtRz7CMw0+yK2K9bF5xCplEomc o0xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Fm4MJHu+W1aDSCsQMe46M71qET3de9is9QO4v/d39ZA=; fh=+ApEqX2XeRhg2p2NpxsXz1//E7S/cUAxAWRR0qa8OAw=; b=Ph//Fp72/c1x+j+MpUAjljZUWoXeRybXShP2VNwKmGUUn5lLD0VJrenSrlPTjc4hJq 6PAM6O09pyXIlfGKXAk5B0H+mIv3nsVDdGUBd5I3ziyzs3hhhgjY89SMBKDWYgiCpDPr Lwnc/8dypvrQQe1x26ZOzMyDaDBfHXRdHK0Os8Xwjidadd6BDjRkEP+56W/vIQAAg8FB lqg3APiiwkNWyrGh18fqztoOqT8h7ZCVObIRDXwq+L4GE+dSaoQsMYkwyYnDl15BeSwv 9f8CX9QGEEVgyts2L+CHqeYMVnxg7u1lDTTD9K6Bj3v3lL3gVy3mmgOB1CS7/Zib/xEH tJ9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=eazJ6Gy3; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63413d72e48si17802289a12.826.2024.05.17.10.38.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=eazJ6Gy3; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-182429-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 645AF282BB2 for ; Fri, 17 May 2024 17:38:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D55B13DDCE; Fri, 17 May 2024 17:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="eazJ6Gy3" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 1A40E13DDAE for ; Fri, 17 May 2024 17:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715967522; cv=none; b=sTysry7YxO4h7qhNi5bBboQNBIOPZ8SvdfyOoZ1uWoTNCtn6iXROFOfXSWigo3hFNuo8RZmVK5QMJJDDXQ2doQbp+9vk5sbrTJOt2zWyIYclgpZ3rWOMUKoDb4V7LlRQdRV35EsLp6J8Pf1YWNcDe+TMCoXBxjtM60MSoL+RHwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715967522; c=relaxed/simple; bh=qO3zR2IR67bI/VE8hUvr6IQZ61FxjTclK/0mMM+9S6c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qf3KRS9mTzAsW4Tm4+QQEivIIN2dzv3C2yeJpBasww+20wh9WO58/AYSXLRZb4dV+1CkwV68940RAfcFwg3jmHH69uYRYSRaeu27XlGn+qT6kmhluk3Mg7oI6Vh7oCOuomuLu33WPfcLtuazCYbgKcj0KyjhaXmsZhdww9JyZQ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=eazJ6Gy3; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id BB76340E016A; Fri, 17 May 2024 17:38:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NiA1uMvF-qli; Fri, 17 May 2024 17:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1715967512; bh=Fm4MJHu+W1aDSCsQMe46M71qET3de9is9QO4v/d39ZA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eazJ6Gy3gNhDigdpBddnxY1jNRqswEZWDGQLwNsOLGHG3ifPikTxfdTpFUlHBtAuy LQi6zYj9VHFbPYAIfScY5Mzx/5QipVYOsxCYeSv9IwQgcQk5ns8gSqNN/t7NZWc1W6 lnOyg/mMY46RbR0lB1LQbEXl0Uon83PlQFPEorSbmyPwRsrcDEhlicIQWqk5/bPd/9 fwwdqepmGJG1btTi1yil4vRLmg+uendcLolyU4Tp5IrrnpCYSwc5RcNJ2Dl26783Gi 0iFXku1nstlOuMFNrSK2iih7iZT8kZgfmHBGy4qgEDfHRdCHce+yzQ/3Hu7rWTgF2F rRiZXWT6pYl5P5LEpud0ecix+HI/soCEjO448kOHLlL8dBN0Iu6E8zznp9qkiMtt5I enZHvM8d2oIgddr3my8Vy6RqT3p03KLJsSGeYoCb+J4MRVHgRCWVE5mOYlZAS5A8kl M4s/1ILg+VI7b0ZIMqAIUfJ57542tzyfsVDbQQM1ztrhVOVMgI0/HdrNQIjUIx8TEV UXid2h/rkgCAO5y7eCJ3LSzk6YjivK2sNLzhNYwOadoXhIuR/4OcdiJiD1lGyTxRy+ nUlVOs7JAqpPicGRl4OHpsZlveOtP/E10D5B1KCj60Az8VylLFArk+kyX+IgphG6KZ J+tSk4rEPGdu7XY7ny5k14gc= Received: from zn.tnic (p5de8ee85.dip0.t-ipconnect.de [93.232.238.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 505A340E025E; Fri, 17 May 2024 17:38:16 +0000 (UTC) Date: Fri, 17 May 2024 19:38:11 +0200 From: Borislav Petkov To: Tony Luck Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Uros Bizjak , Rick Edgecombe , Arnd Bergmann , Mateusz Guzik , Thomas Renninger , Greg Kroah-Hartman , Andi Kleen , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v3] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL Message-ID: <20240517173811.GFZkeWAzKjYtEMwe1e@fat_crate.local> References: <20240517172134.7255-1-tony.luck@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=utf-8 Content-Disposition: inline In-Reply-To: <20240517172134.7255-1-tony.luck@intel.com> On Fri, May 17, 2024 at 10:21:34AM -0700, Tony Luck wrote: > diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c > index 8651643bddae..996f96cfce68 100644 > --- a/arch/x86/kernel/cpu/match.c > +++ b/arch/x86/kernel/cpu/match.c > @@ -39,7 +39,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match) > struct cpuinfo_x86 *c = &boot_cpu_data; > > for (m = match; > - m->vendor | m->family | m->model | m->steppings | m->feature; > + m->vendor | m->family | m->model | m->steppings | m->feature | m->flags; I think this should not do anything implicit even if it is correct but should explicitly check if (!(m->flags & X86_CPU_ID_FLAG_VENDOR_VALID)) continue; I don't have a clear idea how exactly yet - I need to play with it. Maybe this stupid flow in the loop should be finally fixed into something more readable and sensible... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette