Received: by 10.223.176.46 with SMTP id f43csp2123946wra; Sun, 21 Jan 2018 11:53:46 -0800 (PST) X-Google-Smtp-Source: AH8x224i+XWdnBz1h6YlmEHPXGZBfBBVD9EBUdCjJ2kz1HYn/kRYDBi4tIGZQpRmluzeyHlOsHZ9 X-Received: by 10.99.96.131 with SMTP id u125mr5265840pgb.380.1516564426029; Sun, 21 Jan 2018 11:53:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516564425; cv=none; d=google.com; s=arc-20160816; b=Z/68mGmUoktfD26/7fzzEceCqtjwQBuWM4fC9YKtJ6D3lE2TJQoQj8oAC93f51wFhy MdISAzleSrX043b9+SmMLcmzlzf1S9OToQz9SUojUx/E0x2Bruhr6664n4g4ePzH0d/L 0nXdfR49pq1P0AkLcIb54cG/yZm+86DG0qpnLmIWXWqlZwPQUggEl0g2eEe8BwWwE4pI b+X64IxIWkKc0HKltVowvEJpQBgJ57ecju8loX93fhQ6iPBW/2pvBstgDawoFYXeBW1+ yiscf+KgpOeCZ+R/XJIpvOA1kI77QwuL1NllvqSJ2oJwvhc2GkJ6TywvWcI9VcFrfBbw WESw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=d/O1R49rZzFeydRPxUNhTXMxHxQfoZZ3rVWmONadH80=; b=hwTiGtPLIWtfOGdjqrNo0lr4ki8T91g3TUPf5VYxWZjgl0dTgJYKFqvEEQ6kssZ4bx QECm83FI6ZCtlZvxi3EpQ8Rg4HqXOvzAlo9mM1RGUU60ZtkLFmUE4ST7b4xMnjPmDFT6 21wJ1ZArdcy7QBo5Jk/hKvrt1BGT8xI66loNFO19plokLhoqCzDbBCuoCwpxVFzqc4VT QmKwNUTTLvRUzckqj0xX0xzr1djJIWH2ijLmRmfW2lns7naTUiJxnIr1FGD9yjOauFMx R/eKxuj9v3nAF67Cd6X1oJ2EY9Q/XZ65JsL2iOqUhnZlPdOJ88ZyZUpba9pHmSFE3iAz VYtA== 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 m37-v6si2731467plg.154.2018.01.21.11.53.31; Sun, 21 Jan 2018 11:53:45 -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 S1750939AbeAUTxI (ORCPT + 99 others); Sun, 21 Jan 2018 14:53:08 -0500 Received: from mail.skyhub.de ([5.9.137.197]:53074 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbeAUTxH (ORCPT ); Sun, 21 Jan 2018 14:53:07 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MdtQYMTSvpaQ; Sun, 21 Jan 2018 20:53:06 +0100 (CET) Received: from pd.tnic (p200300EC2BEE1B001C757E499366AA02.dip0.t-ipconnect.de [IPv6:2003:ec:2bee:1b00:1c75:7e49:9366:aa02]) (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 E2AA51EC00FF; Sun, 21 Jan 2018 20:53:05 +0100 (CET) Date: Sun, 21 Jan 2018 20:53:03 +0100 From: Borislav Petkov To: David Woodhouse Cc: KarimAllah Ahmed , arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org Subject: Re: [PATCH v2 5/8] x86/speculation: Add basic support for IBPB Message-ID: <20180121195303.afedou2l4ar37e4r@pd.tnic> References: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> <1516528149-9370-6-git-send-email-dwmw@amazon.co.uk> <20180121180621.ufmc5m7nr6v4tjvc@pd.tnic> <31c52131-5f7a-8af0-3092-5fc9e322a734@amazon.com> <20180121190145.uuk3xizxejckth5s@pd.tnic> <1516563060.9814.52.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1516563060.9814.52.camel@infradead.org> 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 Sun, Jan 21, 2018 at 07:31:00PM +0000, David Woodhouse wrote: > Congratulations, you've just turned a potential GCC missed optimisation > into a kernel bug. We don't *care* that it's unlikely that GCC will > miss that optimisation. The point is that it doesn't *have* to do it, > and we don't *check*. Err, I guess I'm missing something: gcc doesn't add any code here - we do. We turn the JMP into a NOP and the three instructions of the wrmsr are from an asm volatile(). So please elaborate. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.