Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp963335ybh; Tue, 21 Jul 2020 12:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNCmBBpRrImcdJvN8LpZQ7tXN8reE7EAFM8dWLfWNXFYx6VYWyOdAkMTfZX0tSqa0gggz3 X-Received: by 2002:a50:9f8c:: with SMTP id c12mr27043264edf.149.1595358746108; Tue, 21 Jul 2020 12:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595358746; cv=none; d=google.com; s=arc-20160816; b=Ej5Dl0ng1TLCRDCWdxXkXqWuKPeoikTXVz1Y9fTx/lHSoxeb3oDf6ikVUlbSn02p2R Y0NvhN5KhShsQKfsCw+IkwdnR1ezkTRvPQIjcCYBaH/V9RXukPpuUbBicTPvzN/xukjk Svm08KKPelBzEpjwqz/NPwVbqmyTrX5QUv3uxoLz9wYcPAGtrgtBoxmdjAxRw+4XeG90 fIHClK0NxmLaM0JoIrIY+1e3hVDBdRJFawHta/6ye9z3KXu970PCYEvxMA+s/MWmr+NW ZzaoczNOrAK1gAc56SYX3CwjhgLFZaI7iGqogZ3KwbChtqvTTRUl2p0prqqngppNxabA NUgQ== 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=R2zugMccFiI0jJgvQMs0TPnzzQfNHe0PTn5J5IwA7Vg=; b=wDrSwYCGyT6hq4YvxCMS+geoq/z8DSb6AZpqDqwF/cnCJNuO9Y7OXTEZmCXmrC3tfn gXtBM1aGgb1lZgN8lCLhDKbhwpYPFBUv7GfxEcHUENzdi0Cf1c/U0te3DSFKOR7JZFMp 5Guhad1S21rc9lCHeKeGOrB46mhR1PdhrArMxrJZeG2GlMPpY92/G/t/GeHAvfR031qm SejxDPeXRQ7u70vgPxfAGc5SQ0g+0LLZzKWr6axVsxvjCJ3jNa9ymlMIA++jFTOz7Fa7 g1Xa1HPpB3obma81vLhoZRkTSOj3aMeQ/FWYGjIGgWI5o0oBBtyufzsyfVmubowrbQJ0 Mgew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=R19nnLcc; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si12553257ejx.754.2020.07.21.12.12.03; Tue, 21 Jul 2020 12:12:26 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=R19nnLcc; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730437AbgGUTLz (ORCPT + 99 others); Tue, 21 Jul 2020 15:11:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726602AbgGUTLw (ORCPT ); Tue, 21 Jul 2020 15:11:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E744AC061794; Tue, 21 Jul 2020 12:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=R2zugMccFiI0jJgvQMs0TPnzzQfNHe0PTn5J5IwA7Vg=; b=R19nnLcc1ehZda6baIKpJBp4mk QIU+wDYISg1oiFi1U088VyKvy4CooK8rP1aGzRtF9XgpDe7eTIFV5r5689wWdYUJ+kYWCyJFppnHe nqnVDpB+MOc7wNPL3u1wcpwcRyUTibeYFoZ5XQDOq5H50e5y/OqubPR0zS217bggT7wpva3a9ANM7 finoA5pjqRnrzqe5tTkqDI+yyfEltcwPUMKHMM+FcE0XgdWmzuY4QGbHUG0CxVcaj2fo8FJfZoGej y8rSdDOLXtpi9uJ1cu34SMbBgoHDTpVf2xUJM8yurQyaUxcOCForZjuAREOFTQHAPuEArGD2e6Sf2 YkXN9VdA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxxfo-00084N-76; Tue, 21 Jul 2020 19:11:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D3C7E3011C6; Tue, 21 Jul 2020 21:11:29 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BEE3D203C9761; Tue, 21 Jul 2020 21:11:29 +0200 (CEST) Date: Tue, 21 Jul 2020 21:11:29 +0200 From: Peter Zijlstra To: Ira Weiny Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Andy Lutomirski , Dave Hansen , x86@kernel.org, Dan Williams , Vishal Verma , Andrew Morton , Fenghua Yu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH RFC V2 17/17] x86/entry: Preserve PKRS MSR across exceptions Message-ID: <20200721191129.GG10769@hirez.programming.kicks-ass.net> References: <20200717072056.73134-1-ira.weiny@intel.com> <20200717072056.73134-18-ira.weiny@intel.com> <20200717093041.GF10769@hirez.programming.kicks-ass.net> <20200721180134.GB643353@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721180134.GB643353@iweiny-DESK2.sc.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 21, 2020 at 11:01:34AM -0700, Ira Weiny wrote: > On Fri, Jul 17, 2020 at 11:30:41AM +0200, Peter Zijlstra wrote: > > On Fri, Jul 17, 2020 at 12:20:56AM -0700, ira.weiny@intel.com wrote: > > > +static void noinstr idt_save_pkrs(idtentry_state_t state) > > > > noinstr goes in the same place you would normally put inline, that's > > before the return type, not after it. > > > > Sorry about that. But that does not look to be consistent. > > 10:57:35 > git grep 'noinstr' arch/x86/entry/common.c > ... > arch/x86/entry/common.c:idtentry_state_t noinstr idtentry_enter(struct pt_regs *regs) > arch/x86/entry/common.c:void noinstr idtentry_exit(struct pt_regs *regs, idtentry_state_t state) > arch/x86/entry/common.c:void noinstr idtentry_enter_user(struct pt_regs *regs) > arch/x86/entry/common.c:void noinstr idtentry_exit_user(struct pt_regs *regs) > ... > > Are the above 'wrong'? Is it worth me sending a patch? I think I already fixed all those, please check tip/master.