From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 087AAC43334 for ; Tue, 12 Jul 2022 13:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233230AbiGLNtY (ORCPT ); Tue, 12 Jul 2022 09:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233416AbiGLNtU (ORCPT ); Tue, 12 Jul 2022 09:49:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4726E4F195 for ; Tue, 12 Jul 2022 06:49:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F2A58B817D2 for ; Tue, 12 Jul 2022 13:49:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A82DDC3411C; Tue, 12 Jul 2022 13:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657633756; bh=3ZHbpCASO7F/9OAQZczcQxK6Z78ZRcAd0qGnuMuG9xU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=vMguKPxddNuWFBigAtc6alDqrdbseqfwt3fJN+73n4B3BU5RrCRhzKWzpTyCypkXJ VgSO+RjWvPlxNCPxdR1ZddO6ve7aNjjzUNiIYPei8+/8Wy9DT+j5Thnx61GYs+Lxtq 6YT9dexeenlA9hMT96ZvyrtKGn99UKsW8jvwfJQY3vjs2MF5nEGA2pW70RtXXBr14E i4l3l0F3DtCOxg/Ph629eQBUMkvYi67aayKY63BUan7+L3+99OfuCER3vikNj8E6pB 9qVjPvpmZvvPVYimLJJKdQ52nRaS4euio6TUvsKUB3BLzVnxUdWGFJEwFXa9hTUIYZ w0Fe9d4GPjX9Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 3CFA45C0516; Tue, 12 Jul 2022 06:49:16 -0700 (PDT) Date: Tue, 12 Jul 2022 06:49:16 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: Marco Elver , John Ogness , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Thomas Gleixner , Johannes Berg , Alexander Potapenko , Dmitry Vyukov , Naresh Kamboju , Linux Kernel Functional Testing Subject: Re: [PATCH -printk] printk, tracing: fix console tracepoint Message-ID: <20220712134916.GT1790663@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220503073844.4148944-1-elver@google.com> <20220711182918.338f000f@gandalf.local.home> <20220712002128.GQ1790663@paulmck-ThinkPad-P17-Gen-1> <20220711205319.1aa0d875@gandalf.local.home> <20220712025701.GS1790663@paulmck-ThinkPad-P17-Gen-1> <20220712114954.GA3870114@paulmck-ThinkPad-P17-Gen-1> <20220712093940.45012e47@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220712093940.45012e47@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 12, 2022 at 09:39:40AM -0400, Steven Rostedt wrote: > On Tue, 12 Jul 2022 04:49:54 -0700 > "Paul E. McKenney" wrote: > > > > But a quick fix that stopped the bleeding and allowed printk() to > > > progress would be useful in the short term, regardless of whether or > > > not in the longer term it makes sense to make srcu_read_lock_trace() > > > and srcu_read_unlock_trace() NMI-safe. > > > > Except that doesn't rcuidle && in_nmi() imply a misplaced trace event? > > > > Isn't it still the case that you are not supposed to have trace events > > in NMI handlers before RCU is watching or after it is no longer watching, > > just as for entry/exit code in general? Once in the body of the handler, > > rcuidle should be false and all should be well. > > > > Or am I missing something here? > > I guess the question is, can we have printk() in such a place? Because this > tracepoint is attached to printk and where ever printk is done so is this > tracepoint. As I understand it, code in such a place should be labeled noinstr. Then the call to printk() would be complained about as an illegal noinstr-to-non-noinstr call. But where exactly is that printk()? Thanx, Paul