Received: by 10.223.176.5 with SMTP id f5csp322657wra; Sat, 27 Jan 2018 00:22:38 -0800 (PST) X-Google-Smtp-Source: AH8x227/D/Cme+fXbQ2VR6XYb71ql4PmyTDSeE1qPNfcMrsBwIjoGopZ7DydcGhepqYQwXynS4Pw X-Received: by 10.98.59.149 with SMTP id w21mr21263032pfj.7.1517041358313; Sat, 27 Jan 2018 00:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517041358; cv=none; d=google.com; s=arc-20160816; b=BB7ToTLNryVp9a/pzObRoiPlnyDqD5L8TqAgiLTZvdUwWajaHiedtojYp4auNLZaUO a0vlAxtkl5udoddL+40xH7CsjFs4klMrvbOrG9QMy8vU2N3mXhgLP+rew8+isIiIG7/Y QPMTQV9d1p4tIFl6wnBcv7nykMgrG0jeBbsS8BqgR+aMkxSwAmmU02VU8jC9b4sCtXpp v2xxSh7VVp9h05hYcrs1Ow/s9WxfqPCf/Tbt/YFRWbJI8uv0UXRANK/8hIZZOxUpuUIt 3pDJjAFdGtBTleUzYOcHm6xdGxLyysJkqO4I9zDtPtz5bRxvh+j/4qSvHyvjbDPDMRZY ruCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=UnKo8OYe1GVFam1Hy0nY2eGoRTMbe1kZLfCTANCHCgs=; b=C9COCfxrnqzbg2cyLFyDyZ+/DTv3DFsqlaS1N1oavEMQBAe4efKa5fnqKNjoMUsr+G agUV8BpCR2nPVFpDuNGK0oD/bjxUWCMzuzEXVtX+4bRVNUU/bYBfaFXy+36cw+ezHzjs D4oiBJJFEGbDgR/Kd+WTjViefCIqyou89D2xiswTURPL0NI90sbQDwAI9nCDkzXQKeK5 g5CZTc7rUlRIAEf+vvmuftXixHNIA0JCi664HMgEDnyITkVX/MCe7Czd6kzH+CE4yGWk ymxjc9rlxMZ5q/UvdWmIvnbCYCbc/xaBrxDMdrDhDxsRxfY+8t7m0TaFlcL9pzWPRMIO I0Vg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si4162850pgc.472.2018.01.27.00.22.24; Sat, 27 Jan 2018 00:22:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbeA0IVp (ORCPT + 99 others); Sat, 27 Jan 2018 03:21:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:57127 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbeA0IVo (ORCPT ); Sat, 27 Jan 2018 03:21:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 948BBADF0; Sat, 27 Jan 2018 08:13:53 +0000 (UTC) Date: Fri, 26 Jan 2018 18:27:12 +0100 From: Borislav Petkov To: Linus Torvalds Cc: David Woodhouse , Dave Hansen , Liran Alon , Laura Abbott , Andrew Lutomirski , Janakarajan Natarajan , "Mallick, Asit K" , Radim =?utf-8?B?S3LEjW3DocWZ?= , KarimAllah Ahmed , Peter Anvin , Jun Nakajima , Ingo Molnar , the arch/x86 maintainers , Ashok Raj , "Van De Ven, Arjan" , Tim Chen , Paolo Bonzini , Andi Kleen , Linux Kernel Mailing List , Peter Zijlstra , Thomas Gleixner , Greg Kroah-Hartman , Masami Hiramatsu , Arjan van de Ven , Tom Lendacky , Dan Williams , Joerg Roedel , Andrea Arcangeli , KVM list Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation Message-ID: <20180126172712.e6iznttrqzfnwxyw@pd.tnic> References: <7c0b0879-3448-43e4-8380-4708fc787113@default> <50c5d627-8975-184b-b50f-4cc02c5816c5@intel.com> <1516957886.30244.161.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 09:19:09AM -0800, Linus Torvalds wrote: > But did we do that "disable stuffing with SMEP"? I'm not seeing it. In > my tree, it's only conditional on X86_FEATURE_RETPOLINE. Or rather, enable stuffing on !SMEP: + if ((!boot_cpu_has(X86_FEATURE_PTI) && + !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { + setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); + pr_info("Filling RSB on context switch\n"); + } Should be c995efd5a740 ("x86/retpoline: Fill RSB on context switch for affected CPUs") in your tree. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --