Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp727608pxb; Tue, 2 Feb 2021 16:52:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyZy+twefuatdcbhVC2L1ENsudmNFY+cNeSehZ344P9yiAsbZpVpkKsFUGFJvBMkuIX6JG X-Received: by 2002:a05:6402:50a:: with SMTP id m10mr650212edv.324.1612313575054; Tue, 02 Feb 2021 16:52:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313575; cv=none; d=google.com; s=arc-20160816; b=aogWItwo9I5DmnuqgCsvVd52pfZKY6uAp3P0H0GyOHyxTu6pQJJLJ6+iKJw6HJb1t2 RJlYvImnp4URtFeodiu0CMqocqiIjhgepVpBD/vcQ1ApZEKDv9mVwbmQzGFRv2CHx5eO ZeTd13EIYs2Igb2lnbNtT2ivs/gUrIjsKXQocIWy9gk29fHXkNacqwUQlEwEegTJDuhd F/svUHJCcLDHQ11MnbNHSSPz2Y1sePtd5sdPMalBM90GgzUGRMSwy278MTuS17DLTeGA UN5CC4D5usCXvUrin8GvAuk4cPOy56J4O0blllbOu44gVrQfsgSQ/oHLlc51BhnXXmm1 4H5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Bg4mCqbtLgoPYjckGTfcjUHczZNVISNhDWAaP6dfZrg=; b=Q+Y8SBF2QQdyvS+1ZGoioiUo5VDNzG6z/dSqFy6bK1seEandYyGgc7ZCdWjOejqOph lE3yh0npfyRdjXKWwEdm9Qfceo9EjDDRQO7Ps3ctyUwdey2ejhnOEH1y2V2mhBZsiqvq 9Hs+4KrAkNzJHyjTKvnEm+beZF3ROVJS8fXtlKMieAhV2XhtnE/ZIDo+W+MgvF5SSk6s m9P6hISsIIp3u94TlvyDGodrqifVazlO7ObIL02phuKZlGdFsY3eslTMzZ9e4BDb99q3 PCmxg4ynYivTjJEtaEXZMQoAkuEv+/aoZ5IfFYM0YzxgEXLACBILAJ14jwUHSCXwlqPx sCrw== 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 qu20si304659ejb.436.2021.02.02.16.52.31; Tue, 02 Feb 2021 16:52:55 -0800 (PST) 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 S232911AbhBBVF5 (ORCPT + 99 others); Tue, 2 Feb 2021 16:05:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:46306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231902AbhBBVF4 (ORCPT ); Tue, 2 Feb 2021 16:05:56 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C024164F3F; Tue, 2 Feb 2021 21:05:14 +0000 (UTC) Date: Tue, 2 Feb 2021 16:05:13 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: Alexei Starovoitov , Masami Hiramatsu , Nikolay Borisov , LKML , Alexei Starovoitov , bpf , Josh Poimboeuf Subject: Re: kprobes broken since 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") Message-ID: <20210202160513.38ada3a7@gandalf.local.home> In-Reply-To: References: <20210129175943.GH8912@worktop.programming.kicks-ass.net> <20210129140103.3ce971b7@gandalf.local.home> <20210129162454.293523c6@gandalf.local.home> <20210130074410.6384c2e2@oasis.local.home> <20210202095249.5abd6780@gandalf.local.home> <20210202115623.08e8164d@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Feb 2021 19:30:34 +0100 Peter Zijlstra wrote: > That does mean that kprobes are then fundamentally running from > in_nmi(), which is what started all this. I just thought about the fact that tracing records the context of the function it is called in. If you set "in_nmi()" for all ftrace handlers, then all functions will look like they are in an NMI context during tracing. That is, the preempt count is checked to fill in the flags in the ring buffer that denotes what context the event (in this case the function) was called in. -- Steve