Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2522004ybk; Tue, 12 May 2020 01:16:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJCUWToZIvQcfPVwizKlkm8Fd8hqsBqQxIK679FMytTQR+pLShMd7fV7XvrnqYX3DUnu0vS X-Received: by 2002:a05:6402:1768:: with SMTP id da8mr17010470edb.216.1589271392172; Tue, 12 May 2020 01:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589271392; cv=none; d=google.com; s=arc-20160816; b=Yoxbf806OC//7sMjrQ/4G2YxFS8aC26kZjh3H29yqZDFk9iJ/TRwJ2RA/skMxLOZEf WQCWu9ViAihZwxdgkDid/IdNT+9UMPMKBCRsLJDWpoDkK+T8bB3+EGzs9k5KmzgJlig8 El+SokFb1Kr1lQZnd6wdYK6LlHv33N1Ip/xv7drq8ER61j/9XmJlcb1zuL+Bs+loa/pi IgoGpN0dPpzREqZ2ieN2OnqhAx6DTpe43ee0aOSL53N7UH33DooXs6V7hSo//33tzwn4 lbraT+FrvuMK0btnDoz7O5L6WACC2TPzPnGa7NpmMcqKYPeu15BKdj+idF/kVbE13mHO nvWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=Mh5+6Xddt4ZVqD7jz5CLdfmkevzikIM7xG3GwxMvk3M=; b=wynf4qUs7DrZkgUMlU0qIw0EphaqYBPuI/KJARysO7abIKKsdALMUXPYyhyOoiyEj6 U9LaCR9vZeWSU691mUS2DJL3I+dlVVBnlZwcPPe9z1U6Y+WgXlE+4oRZGo2IIyy6HMO9 nbz8jG7nvdrldMhH1Rit8Qq6EgjKkyXJfZ+gAHAvDK5PbCdjFvqjNHCnNx0pCBVBr3Il bUmdwNkP1gewVhRelTOwAI7YdNWIOVeeiLUWZCquO220KGocOTYq6TB6W012ML6xplWa Ii0oic8I7nLnqXjyJklmVF/uwNbOgCDPwD9vs+NWO1foFXICHyqkJ9n7So1QNlX+fUKP 0Krw== ARC-Authentication-Results: i=1; mx.google.com; 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 bm7si4146527edb.68.2020.05.12.01.16.08; Tue, 12 May 2020 01:16:32 -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; 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 S1728986AbgELIOi (ORCPT + 99 others); Tue, 12 May 2020 04:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbgELIOh (ORCPT ); Tue, 12 May 2020 04:14:37 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A020BC061A0C for ; Tue, 12 May 2020 01:14:37 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jYQ3A-000794-UD; Tue, 12 May 2020 10:14:05 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 321E41004DE; Tue, 12 May 2020 10:14:04 +0200 (CEST) From: Thomas Gleixner To: Steven Rostedt Cc: LKML , x86@kernel.org, "Paul E. McKenney" , Andy Lutomirski , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon Subject: Re: [patch V4 part 2 10/18] x86/entry/64: Check IF in __preempt_enable_notrace() thunk In-Reply-To: <20200511215108.3ccea526@oasis.local.home> References: <20200505134112.272268764@linutronix.de> <20200505134341.087595319@linutronix.de> <20200511215108.3ccea526@oasis.local.home> Date: Tue, 12 May 2020 10:14:04 +0200 Message-ID: <87blmt604z.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt writes: > On Tue, 05 May 2020 15:41:22 +0200 > Thomas Gleixner wrote: > >> The preempt_enable_notrace() ASM thunk is called from tracing, entry code >> RCU and other places which are already in or going to be in the noinstr >> section which protects sensitve code from being instrumented. >> >> Calls out of these sections happen with interrupts disabled, which is >> handled in C code, but the push regs, call, pop regs sequence can be >> completely avoided in this case. >> >> This is also a preparatory step for annotating the call from the thunk to >> preempt_enable_notrace() safe from a noinstr section. >> > > BTW, after applying this patch, I get the following error: > > /work/git/linux-test.git/arch/x86/entry/thunk_64.S: Assembler messages: > /work/git/linux-test.git/arch/x86/entry/thunk_64.S:67: Error: invalid operands (*UND* and *UND* sections) for `+' > /work/git/linux-test.git/arch/x86/entry/thunk_64.S:67: Error: invalid operands (*UND* and *ABS* sections) for `/' > make[3]: *** [/work/git/linux-test.git/scripts/Makefile.build:349: arch/x86/entry/thunk_64.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... Yes I know, but I'm going to drop that patch completely.