Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6096101ybv; Tue, 18 Feb 2020 09:47:36 -0800 (PST) X-Google-Smtp-Source: APXvYqw2JycGoh7qnZDHrb3IjupojlMrYw1b0D+35L73dHjuIeV2iNSd2uvD+v7pPuScM4Ax7Oar X-Received: by 2002:aca:1108:: with SMTP id 8mr2040043oir.127.1582048056269; Tue, 18 Feb 2020 09:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582048056; cv=none; d=google.com; s=arc-20160816; b=YGy9bz1pww53+GDyZU0tFdQ3I4u3GhN9TkgvvKacEucHlt7uTSZca7uR0UDZLkw6QQ OcSqdBr5qAuS4BgnEzLU3PQU0O4tWqTqfa/g1IzhJGdblbHnq8oLZpa6jqPU2WGRupbB zEFSZ8n4X2tZXMKnSwYF/9FGB8OOdc7rdWGbwmNM+IQlRvUyLUFwThKFWKY55rNBfjm2 tf0ZtVtIlTiRA9uF0evQgPfe/dpse4HvD15G6Hitft2b1QeTcgQzZQSMJEDUhmRS9xzz 9QPvC1ILjdtTXE5kOT5ckj+tzt+Cr5IXD4Qx9pPk98ecGVtgvLDCjppc87xXFnNJvnuy R6ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=W/UN+kl0LvCJ2EAWQm0M6A3y3pYUhwoDhe6Qt1Lch4w=; b=rFvIoy/m79CMH4hMNAUASVe1M273CkUthdk66+FTNNEZU6174aNEyDWdyOre7f59La lQ7l2q6h0e14bkvwJE56C7OLNy5NVxZGN7aWLSUI6/Z4kfQFmkoqkuUiYyAbmAMpR+ox GeDYsOv/GyPtbl4xo5LGy+rnSGD4kb/BgUjobhS1IIi6UrmwfasTPjoVAjUa14EEOaM3 dBzg8pKWEkPW8Sz2YA1OXDoUJu15HJIa9fUS18qVDo7BpyGkNZw2HIHI+OvhwzdkizvU Exr7dyKT5XMvbHOsgnywU9q8Xo2qkOp6UToDE7X+jUl5YZhgvMe8nO+o+xbm5pIg/No7 Y7QQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si7572822oic.169.2020.02.18.09.47.24; Tue, 18 Feb 2020 09:47:36 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgBRRqM (ORCPT + 99 others); Tue, 18 Feb 2020 12:46:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:32942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbgBRRqM (ORCPT ); Tue, 18 Feb 2020 12:46:12 -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 8D30E20679; Tue, 18 Feb 2020 17:46:10 +0000 (UTC) Date: Tue, 18 Feb 2020 12:46:09 -0500 From: Steven Rostedt To: Masami Hiramatsu Cc: paulmck@kernel.org, Joel Fernandes , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@kernel.org, gregkh@linuxfoundation.org, gustavo@embeddedor.com, tglx@linutronix.de, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com Subject: Re: [PATCH v2 3/9] rcu,tracing: Create trace_rcu_{enter,exit}() Message-ID: <20200218124609.1a33f868@gandalf.local.home> In-Reply-To: <20200218133335.c87d7b2399ee6532bf28b74a@kernel.org> References: <20200213204444.GA94647@google.com> <20200213205442.GK2935@paulmck-ThinkPad-P72> <20200213211930.GG170680@google.com> <20200213163800.5c51a5f1@gandalf.local.home> <20200213215004.GM2935@paulmck-ThinkPad-P72> <20200213170451.690c4e5c@gandalf.local.home> <20200213223918.GN2935@paulmck-ThinkPad-P72> <20200214151906.b1354a7ed6b01fc3bf2de862@kernel.org> <20200215145934.GD2935@paulmck-ThinkPad-P72> <20200217175519.12a694a969c1a8fb2e49905e@kernel.org> <20200217163112.GM2935@paulmck-ThinkPad-P72> <20200218133335.c87d7b2399ee6532bf28b74a@kernel.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Feb 2020 13:33:35 +0900 Masami Hiramatsu wrote: > On Mon, 17 Feb 2020 08:31:12 -0800 > "Paul E. McKenney" wrote: > > > > > BTW, if you consider the x86 specific code is in the generic file, > > > we can move NOKPROBE_SYMBOL() in arch/x86/kernel/traps.c. > > > (Sorry, I've hit this idea right now) > > > > Might this affect other architectures with NMIs and probe-like things? > > If so, it might make sense to leave it where it is. > > Yes, git grep shows that arm64 is using rcu_nmi_enter() in > debug_exception_enter(). > OK, let's keep it, but maybe it is good to update the comment for > arm64 too. What about following? > > +/* > + * All functions in do_int3() on x86, do_debug_exception() on arm64 must be > + * marked NOKPROBE before kprobes handler is called. > + * ist_enter() on x86 and debug_exception_enter() on arm64 which is called > + * before kprobes handle happens to call rcu_nmi_enter() which means > + * that rcu_nmi_enter() must be marked NOKRPOBE. > + */ > Ah, why don't we just say... /* * All functions called in the breakpoint trap handler (e.g. do_int3() * on x86), must not allow kprobes until the kprobe breakpoint handler * is called, otherwise it can cause an infinite recursion. * On some archs, rcu_nmi_enter() is called in the breakpoint handler * before the kprobe breakpoint handler is called, thus it must be * marked as NOKPROBE. */ And that way we don't make this an arch specific comment. -- Steve