Received: by 10.223.176.46 with SMTP id f43csp2378567wra; Thu, 25 Jan 2018 08:58:44 -0800 (PST) X-Google-Smtp-Source: AH8x227lQWtENPXUzQkGOHKLSai+7BnyG6wqSmo0tWofrW6GadJWcyhrfs676CADG58zpdXpaKML X-Received: by 2002:a17:902:c01:: with SMTP id 1-v6mr11391558pls.55.1516899523962; Thu, 25 Jan 2018 08:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516899523; cv=none; d=google.com; s=arc-20160816; b=Tfx3GDuOWPjU/eAFOtOcLO32ydy/SBS3HAfOn7E3JACaPr3hEjJtNScMSJIqWiVQxG wDhL8PHwsBG2SfVkDEAB9bOkqIynia4W/qKwwr1CL+1UMHfp/dewz+iDC+jUHRYwFc14 7RS0el5C0fwonBJdp3HxhZzsuMD51PQPYzjtK+3I7HVLi43yeE+fBRFXKDp7XtDyWOuN uinoFbwMTnlScuoZiARDZK391WI99tDd0cU+egIA4+Degc+yqe/qf3swNJsjdb5o+3d3 ts+EBmL0LLilhmj/+Uc6eDvUtq1B8rAE5pXsNP81Ixht2ZQLAbhbqXDpmvjeNoeVoRYF Us+A== 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=Set18J1WOxiVU+G3hdTp/hmh+kvaY/Y4ASxnwtEPmvY=; b=eZ1xRBrIX5Tfpyxrg85muh/PRrpjpWWO6bRE8WfS1dHzfgu4eL6W6g0BvevxOPEbx7 T6AT7aZBdKGBf8AlM/lyTIgy00IR+DayKVjsV33o1tBAp54/kMWEbgwi7cIjGDbge7b3 15t40qgUH6LFwmLHFkoJe2c5g1QstO2c388s00KoWqws+b/mxh9rxSZSEsbvx/M7JRVy MO/qVUL4hK7v9ESHZdjiI/6It7jHo58dUKIwyvd/dgLDKsIa56hutCM7hpEpOFPKGT5B gEaXGW9dczY8THkhHXGVeIigs+mcv2GG7Xj0y5Xu37Uo8DAki/mxKO9GYy3wFk7p2yCZ eGyA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34-v6si1811376ple.102.2018.01.25.08.58.29; Thu, 25 Jan 2018 08:58:43 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbeAYQ4w (ORCPT + 99 others); Thu, 25 Jan 2018 11:56:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52646 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbeAYQ4v (ORCPT ); Thu, 25 Jan 2018 11:56:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6561412E4F5; Thu, 25 Jan 2018 16:56:51 +0000 (UTC) Received: from treble (ovpn-124-179.rdu2.redhat.com [10.10.124.179]) by smtp.corp.redhat.com (Postfix) with SMTP id BA26160BF4; Thu, 25 Jan 2018 16:56:46 +0000 (UTC) Date: Thu, 25 Jan 2018 10:56:46 -0600 From: Josh Poimboeuf To: David Woodhouse Cc: Borislav Petkov , tim.c.chen@linux.intel.com, pjt@google.com, jikos@kernel.org, gregkh@linux-foundation.org, dave.hansen@intel.com, mingo@kernel.org, riel@redhat.com, luto@amacapital.net, torvalds@linux-foundation.org, ak@linux.intel.com, keescook@google.com, peterz@infradead.org, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/pti] x86/retpoline: Fill return stack buffer on vmexit Message-ID: <20180125165646.ytc4upthpaqtwi45@treble> References: <1515755487-8524-1-git-send-email-dwmw@amazon.co.uk> <20180125120743.ey32gvl5mjam4r2s@pd.tnic> <1516882849.30244.94.camel@infradead.org> <20180125124554.vdx7rrnfrxrzl2ng@pd.tnic> <20180125151024.bidjr26r667vs7h5@treble> <20180125155110.mw655b7fwgm7qqc7@pd.tnic> <1516896198.30244.133.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1516896198.30244.133.camel@infradead.org> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 25 Jan 2018 16:56:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25, 2018 at 04:03:18PM +0000, David Woodhouse wrote: > On Thu, 2018-01-25 at 16:51 +0100, Borislav Petkov wrote: > > > > > And the seg fault is objtool's way of telling you you need a > > > ANNOTATE_NOSPEC_ALTERNATIVE above the alternative ;-) > > > > Except that it blew up when I did this which doesn't have ALTERNATIVE > > (it's the diff I saved :-)) > > Yeah, ANNOTATE_NOSPEC_ALTERNATIVE just tells objtool "don't look at the > alternative; you're not going to like it". > > If you start putting a __fill_rsb() function out of line somewhere and > only *calling* it from alternatives, then objtool is going to shit > itself when it sees that function, regardless. Right, if you *really* want it always inline, the short term solution is to just patch it in with X86_FEATURE_ALWAYS. And don't ask me what the long term solution is, I don't even know what I'm having for lunch today. -- Josh