Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1494943ybt; Mon, 15 Jun 2020 01:33:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHSbOsJFAvJqcPZSFFBqXxqaQO5G1HmeyO9YgigcKdSIEedYt8Oy3U53ZQqLzOgpmripXp X-Received: by 2002:a17:906:1804:: with SMTP id v4mr23890178eje.104.1592209998273; Mon, 15 Jun 2020 01:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592209998; cv=none; d=google.com; s=arc-20160816; b=WUz1I7QUEevg7Fz6RC88babhbsRC2RZ6FAefF9ypTaAUT+urmXTvX4BzzVWjUmihsE /cznzl5NYL0p4qIX5MQXDjvmL8GNTZ6F/vXrTFsAsZkUO0wNjO2tM4KT5G9o0RhDIJfX vejZDYddsr3MGCBiS+kx1cKaAVp0EDRuLNXBK7BfVElURhk2kZQSZUmmtSyPkIG/CRNa OGoEJ/Nldh0PRt1pldwzAQQBkVkXBuJ5xE2XjvkDTUqX4WaOLKt0xobULwtbb7wFR1fh P+y9noDkAfS1/qssdzlQa0daWsmtwAGAMKAWs2pe+JOfGWGNVrpWv2m968I3cB8ASYZQ g3BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+ZDc66FjhtuDAnAnOt/8l34dAmv5S5LeOFfXTCUFWFI=; b=xHE95kvGd4kdjnRBSZPmlVzC3lq5hNlT9fCPhjSlKK19G8aeQHGyvS7HAXs2PfSE5g t7LQdrz22I0ZvTmw6N3m93UigiGWG3hHfEmmJTODq6mWyqmM5ee6MerBWBoVwrvqOEVo TeHb4RqLt0Xjd2JMClc9U5xb6gf9OUlyXE3TB1nOUfkKoR2uN2QNqY59tz7EuQ6g8zAa ghoG5WSrcPFiZsPvplCWc2w9Nlduv5feB4uhzV7NbZ5UB6hYs2PWgLFvRnUj+xxZAqD8 IelyMgk7/4HluYVO7u8lE0/Zq3nde3SdI8l838FONXe+Xna4Y/W1sOZbeQ1Ec3znMeC2 ttvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RldVNBO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs21si8591106edb.87.2020.06.15.01.32.55; Mon, 15 Jun 2020 01:33:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=RldVNBO8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728782AbgFOI3H (ORCPT + 99 others); Mon, 15 Jun 2020 04:29:07 -0400 Received: from mail.skyhub.de ([5.9.137.197]:37942 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728426AbgFOI3G (ORCPT ); Mon, 15 Jun 2020 04:29:06 -0400 Received: from zn.tnic (p200300ec2f063c00b14e1d4a79d0a94f.dip0.t-ipconnect.de [IPv6:2003:ec:2f06:3c00:b14e:1d4a:79d0:a94f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 526601EC009F; Mon, 15 Jun 2020 10:29:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1592209745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=+ZDc66FjhtuDAnAnOt/8l34dAmv5S5LeOFfXTCUFWFI=; b=RldVNBO8VRbu+oPtPwxU5wt7Gy1Qcrl4QtlSmPdnavoZ/JYnQKFTroG3Zb1fUII65HtQ9A CoZyNrSmHxg4Xmb/x5FJe5if0/x6AnE0QOv+1FEv2a6cIk0AyNVUKAb/O6lJ+Fmz+Ddp9b 2sOz1nCQ+2q+66cAQJlg83Qz3R8sTMw= Date: Mon, 15 Jun 2020 10:28:58 +0200 From: Borislav Petkov To: Thadeu Lima de Souza Cascardo Cc: linux-kernel@vger.kernel.org, Mark Gross , x86@kernel.org, "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , John Johansen , Steve Beattie Subject: Re: [PATCH] x86/speculation/srbds: do not try to turn mitigation off when not supported Message-ID: <20200615082858.GC14668@zn.tnic> References: <20200609174313.2600320-1-cascardo@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200609174313.2600320-1-cascardo@canonical.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2020 at 02:43:13PM -0300, Thadeu Lima de Souza Cascardo wrote: > When SRBDS is mitigated by TSX OFF, update_srbds_msr will still read and Are you talking about this case in srbds_select_mitigation(): if ((ia32_cap & ARCH_CAP_MDS_NO) && !boot_cpu_has(X86_FEATURE_RTM)) srbds_mitigation = SRBDS_MITIGATION_TSX_OFF; ? and you have a system which: * Check to see if this is one of the MDS_NO systems supporting * TSX that are only exposed to SRBDS when TSX is enabled. i.e., no SRBDS microcode for it and the fix is to disable TSX? If so, I think the right fix should be to do: if (!boot_cpu_has(X86_FEATURE_SRBDS_CTRL)) return; in update_srbds_msr() with a comment above it explaining why that check is being done. Hmmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette