Received: by 10.192.165.148 with SMTP id m20csp4642773imm; Tue, 1 May 2018 00:39:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZGC/Rt0fk3DYdfat+MSA+DZq/dKXb4IWEq8UXuEHG/bk2yTMBqAGxDUVmBnNrexpyPTcZ X-Received: by 2002:a17:902:7e05:: with SMTP id b5-v6mr14964838plm.230.1525160384605; Tue, 01 May 2018 00:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525160384; cv=none; d=google.com; s=arc-20160816; b=kb8gc8rqmwST/1JilK2PXshHJOCuKx1sEFvzgZ8mNIn1e0AIk+JBaB6q+JAW/yLMDb ovyZYlbD7wUY5+9HGt7h+MLLhhd97iv9Dd9BsCs+NWIHU0E5pwOGR7w7wDc3Ft2sr07Y Io9d609oBr1mRPxCwcM08RSeTSjviQcwTFOgtxeHUyLw38PQ32TutcLcwKj3Kbroal6R HqtoZFw9xkUjo7VGjiifX6oZoVogKR8+ytpAwqq2LyIi1lzUUNEp30uV7YrtbUWwWzlj Z+VKgNSIbTecMrbky9nAJB4uG4z+n5naOyuf9kSojssI5gjh0Gkl85R3xHs8ISlwf1ML DaKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=gWmz2x6u+Lx/nuO0eICTHmPpcERNea+kJjcMOrSq3as=; b=urjBZwFRVqMXRtSSfAxNg4WNkMUsTse6Nq9aQN3GO6rt+0q+cfjzHxitLYAiTfbY/P mlK+D7OIQD76G9ygnHk6J24CdVAS1Wdpi9n2yl973obFv/6Sx5cFB39rIEKVPcLVDm9N eDMg0G3iGBQyyEwnu5tP871VITFAaSeIUMHsH90kSL9BS/JZKW6XN5T/UiW5W+uUWkJS XI52qLGu5Q48hSbRWZik78/QjA87vlOzmhYZudFzpxbvEe+QmJlVX+c2efjpVRhJzLa5 l+CE67NBy3GKr2AjZN5t/LS+/8nQhCmdjKp8Mzbz8yZbbwjcaDFVKGM5MB5EIMbRETQk hYDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IJndWz3z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189-v6si7564509pgc.571.2018.05.01.00.39.18; Tue, 01 May 2018 00:39:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IJndWz3z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752602AbeEAHjH (ORCPT + 99 others); Tue, 1 May 2018 03:39:07 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:34902 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbeEAHjF (ORCPT ); Tue, 1 May 2018 03:39:05 -0400 Received: by mail-io0-f194.google.com with SMTP id g1-v6so3572651iob.2 for ; Tue, 01 May 2018 00:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gWmz2x6u+Lx/nuO0eICTHmPpcERNea+kJjcMOrSq3as=; b=IJndWz3zwPeZzUEue+C9Mo8B9r/7O+6lc2ni7wSiwy8F9BihOrQ7zqUTFwlOMRjgjL kfuBh5Q183+fuE79QjgRJL7fcTM5Kw5+m4DjAH7mcmb648JxEpKFQTh943jS2F+V/DUU je6ufToBYQouWJ649lEnCt5th+SaEilYesLDKqLlZXO51gBcHsmLqWTnVSB61XIQs7OE 9aLJBab/VgFnW7WtOlvFGxoqKrHgByAxOvrrAUzqRKNpMuBDmxRYa7IX+VuTrs/vO+DO OpYLzkQsyk2wlHXKeLiIPHYUwE+R7+pV9HTG75S7l8WvMmYyP2Vcjax+IS9I4lmoeo8T 3LmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gWmz2x6u+Lx/nuO0eICTHmPpcERNea+kJjcMOrSq3as=; b=EtNKOcjzENNXRBZhAxN9Gb7sbwqPX5MawSi4zJzhTb5VFuGKuMGrt806rQwIIc9WZG lU3sfqXUSnXTttmZZqg1KmDk1CxUKufYr1+3PggX4H3rPod/3UL1kxWrsiPvfFfeURxZ 4nOxVE3dgTNfo6r7xZu18kEYvx8/0gXb8ku44r856dDyoGSTDiZULVDtbUDIiNbtHjSE Jkb5U5HPAFr0OoFojuU3KVjEidlhL+uUrSjm/amb6N7tqtdJNXkowR4JLWMYBLQRNKbT AZzVjrFLoIv+2Jwiqww9S32UMqqvgevDD5FwwbTiEyU2L4Rk2M3f8c+r6tF4XlQlU2b6 6uUw== X-Gm-Message-State: ALQs6tDsAJSEr0zdXYLR7iq5LorV/31kpmzyRz28bNyPHPEW10uaDde/ 81k2hydJy9c3p9FBDopHRhkq5Zm9R45MQsIShA== X-Received: by 2002:a6b:3d1:: with SMTP id e78-v6mr15529888ioi.297.1525160345189; Tue, 01 May 2018 00:39:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:9e86:0:0:0:0:0 with HTTP; Tue, 1 May 2018 00:39:04 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?J=C3=B6rg_Otte?= Date: Tue, 1 May 2018 09:39:04 +0200 Message-ID: Subject: Re: [v4.17-rcx] Lost IBPB, IBRS_FW support for spectre_v2 mitigation. To: Thomas Gleixner Cc: kirill.shutemov@linux.intel.com, Linux Kernel Mailing List , Linus Torvalds , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-30 21:53 GMT+02:00 Thomas Gleixner : > J=C3=B6rg, > > On Mon, 30 Apr 2018, J=C3=B6rg Otte wrote: > >> In v4.16 I already had support for BPB, IBRS_FW for spectre_v2 mitigatio= n. >> But this went away in v17-rcx. >> >> With 4.16 I have: >> jojo@fichte:~$ cd /sys/devices/system/cpu/vulnerabilities; grep ".*" * >> meltdown:Mitigation: PTI >> spectre_v1:Mitigation: __user pointer sanitization >> spectre_v2:Mitigation: Full generic retpoline, IBPB, IBRS_FW >> >> With 4.17-rcx I have: >> meltdown:Mitigation: PTI >> spectre_v1:Mitigation: __user pointer sanitization >> spectre_v2:Mitigation: Full generic retpoline >> >> Processor is >> vendor_id : GenuineIntel >> cpu family : 6 >> model : 60 >> model name : Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz >> stepping : 3 >> microcode : 0x24 >> >> >> The problem goes away if I revert: >> d94a155 x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruptio= n > > Does the patch below fix the problem for you? > > Thanks, > > tglx > > 8<------------------ > Subject: x86/cpu: Restore CPUID_8000_0008_EBX reload > From: Thomas Gleixner > Date: Mon, 30 Apr 2018 21:47:46 +0200 > > The recent commt which addresses the x86_phys_bits corruption with > encrypted memory on CPUID reload after a microcode update lost the reload > of CPUID_8000_0008_EBX as well. > > As a consequence IBRS and IBRS_FW are not longer detected > > Restore the behaviour by bringing the reload of CPUID_8000_0008_EBX back,= . > > Fixes: d94a155c59c9 ("x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustm= ent corruption") > Reported-by: J=C3=B6rg Otte > Signed-off-by: Thomas Gleixner > Cc: kirill.shutemov@linux.intel.com > --- > arch/x86/kernel/cpu/common.c | 5 +++++ > 1 file changed, 5 insertions(+) > > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -848,6 +848,11 @@ void get_cpu_cap(struct cpuinfo_x86 *c) > c->x86_power =3D edx; > } > > + if (c->extended_cpuid_level >=3D 0x80000008) { > + cpuid(0x80000008, &eax, &ebx, &ecx, &edx); > + c->x86_capability[CPUID_8000_0008_EBX] =3D ebx; > + } > + > if (c->extended_cpuid_level >=3D 0x8000000a) > c->x86_capability[CPUID_8000_000A_EDX] =3D cpuid_edx(0x80= 00000a); > No, does not fix it. Thanks, J=C3=B6rg