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 83BA6C0015E for ; Fri, 21 Jul 2023 16:30:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230384AbjGUQa3 (ORCPT ); Fri, 21 Jul 2023 12:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjGUQaK (ORCPT ); Fri, 21 Jul 2023 12:30:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4735423B; Fri, 21 Jul 2023 09:28:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD52861D47; Fri, 21 Jul 2023 16:26:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE0D4C433CA; Fri, 21 Jul 2023 16:26:33 +0000 (UTC) Date: Fri, 21 Jul 2023 12:26:32 -0400 From: Steven Rostedt To: Alexander Lobakin Cc: Peter Zijlstra , LKML , Ingo Molnar , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , "Benjamin Herrenschmidt" , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Borislav Petkov , , "H. Peter Anvin" , Josh Poimboeuf , "Jiri Kosina" , Miroslav Benes , Petr Mladek , Joe Lawrence , Colin Ian King , Masami Hiramatsu , "Nicholas Piggin" , Jisheng Zhang , , , , , , =?UTF-8?B?546L6LSH?= , Guo Ren , Jakub Kicinski Subject: Re: [PATCH] tracing: Have all levels of checks prevent recursion Message-ID: <20230721122632.56b4df6c@gandalf.local.home> In-Reply-To: <035cee53-255b-11a3-d7ac-ca46c05b907b@intel.com> References: <20211015110035.14813389@gandalf.local.home> <20211015161702.GF174703@worktop.programming.kicks-ass.net> <20211015133504.6c0a9fcc@gandalf.local.home> <20211015135806.72d1af23@gandalf.local.home> <20211015180429.GK174703@worktop.programming.kicks-ass.net> <20211015142033.72605b47@gandalf.local.home> <20211015142541.4badd8a9@gandalf.local.home> <1b402c0c-1beb-d93f-ff6d-955350995ca3@intel.com> <20230721120040.6ed2c02a@gandalf.local.home> <035cee53-255b-11a3-d7ac-ca46c05b907b@intel.com> X-Mailer: Claws Mail 3.19.1 (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: live-patching@vger.kernel.org On Fri, 21 Jul 2023 18:06:07 +0200 Alexander Lobakin wrote: > > Just because you disable interrupts does not mean you are in interrupt > > context. > > Ah okay, thanks! IOW, if we want to check in some code that we're > certainly have interrupts enabled and are not in the interrupt context, > we must always do > > if (!(in_hardirq() || irqs_disabled())) > Yeah, probably. > , nothing more elegant / already existing / ...? It's not a common check. What would you call that? irq_safe() ? -- Steve