Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1306360ybk; Thu, 14 May 2020 05:53:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl6hcm391gFUcBNS+GS8N7TQjYtjyj1ge8wjAoYagV5h2YlcacjQQv2ekgBPEWNGlsxPWY X-Received: by 2002:aa7:d496:: with SMTP id b22mr3916443edr.301.1589460835847; Thu, 14 May 2020 05:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589460835; cv=none; d=google.com; s=arc-20160816; b=QItqCc2yd9hihK9VU1wuB1ywQ0nCc0OSKNeHOMt3lo9AS3qgJJ/9+CbGGpD7Sfdwpa Qg9t49hmgEumty32x/00PMRZ7v3lbYKoUvdgq7Wp0YwT2qsLxND2vqFj8FLGVHbNiMX2 nHPhigVu63yzPALO6rMTU7Rnp3SLqCqT4CMUWKN50Y1fHwt25AMKlTlyJj87ELxAezI4 BrFmTgSSSrsGYsCgPYHftC+FO6gsV1KIwKJ/bk+6p9E6GuJaFiP/zDIpAbZ89PCac9HU Np7yZdbo1g26casG5LBsZ0QFmK9ggbXeExXhzLJBQ+qHcY0wR9IVY2gs9VAVHfH0m7p9 p4KA== 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=e2gmCWn8lf7Zejmge6KxA1kUDivSoLNHdqs5wi0YFi8=; b=nZ+NfwI0og85ICDbxuua71UW3T/BDQWwuMHuH7Gu9jtikyy8Y+RwqYLn5jJF1Jpvse zyN0BcLztWIo2QuD0QtdbR2h2A3RA3eTGFPcONQdjDRa5D7uUgxoGNRvB2s92AzbLSKw ILclHRX4cccP8v5Orj42vnMf8dFifR24x057rLgFQjF8hQCpewjbIoNJRrZmcDj0L4Z8 n8sb6coiMBjKXSAplajazlJcQYYTOtYr2IU0/r7SDfqpcp8bxQaR+jSCr7G3xmajmMUe petQYF0icwaDSRZ/aBbgFH3c5PZZZxMP3t3QMw9rONqSv0h/F1iAVtfDBlqfLig0/5I7 7AOA== 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 e18si1806036eja.513.2020.05.14.05.53.32; Thu, 14 May 2020 05:53:55 -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 S1726105AbgENMwH (ORCPT + 99 others); Thu, 14 May 2020 08:52:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725955AbgENMwG (ORCPT ); Thu, 14 May 2020 08:52:06 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D08C061A0C for ; Thu, 14 May 2020 05:52:06 -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 1jZDKm-0006p3-P1; Thu, 14 May 2020 14:51:32 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 461091004CE; Thu, 14 May 2020 14:51:32 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra , Andy Lutomirski Cc: LKML , X86 ML , "Paul E. McKenney" , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon Subject: Re: [patch V4 part 4 02/24] x86/int3: Avoid atomic instrumentation In-Reply-To: <20200514093257.GT2978@hirez.programming.kicks-ass.net> References: <20200505134926.578885807@linutronix.de> <20200505135313.517429268@linutronix.de> <20200514093257.GT2978@hirez.programming.kicks-ass.net> Date: Thu, 14 May 2020 14:51:32 +0200 Message-ID: <87h7wiznl7.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 Peter Zijlstra writes: > On Wed, May 13, 2020 at 09:57:52PM -0700, Andy Lutomirski wrote: >> On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner wrote: >> > >> > From: Peter Zijlstra >> > >> > Use arch_atomic_*() and READ_ONCE_NOCHECK() to ensure nothing untoward >> > creeps in and ruins things. >> > >> > That is; this is the INT3 text poke handler, strictly limit the code >> > that runs in it, lest it inadvertenly hits yet another INT3. >> >> >> Acked-by: Andy Lutomirski >> >> Does objtool catch this error? > > It does not. I'll put it on the (endless) todo list.. Well, at least it detects when that code calls out into something which is not in the non-instrumentable section. As long as instrumentation respects the rules that this section is taboo, this should not happen. Emphasis on *should*.