Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2649819rwd; Fri, 9 Jun 2023 14:48:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45RkpS1rNWPBhvI7aryNidxMh5MER+ZDp4idQJaNDlpvHdFA3yB64Jnev/nN5DEOahwT6E X-Received: by 2002:a05:6a00:1826:b0:63b:854e:8459 with SMTP id y38-20020a056a00182600b0063b854e8459mr2620054pfa.31.1686347326510; Fri, 09 Jun 2023 14:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686347326; cv=none; d=google.com; s=arc-20160816; b=CRd2PGpTVxTJTFV+SVl2ryqRdGYeneXcuUem7d7kT1rnJkp44z84ARIUQKMmiuiRp4 45FdPYyJOwccjwQeJqybTd+zKRQbA96g7eKvDkQFMcuA7x9OaGxpD0xr2F+Tmtj7B3WT 92ucAxoseuinHPsMhIBN2ksROCpUd3puu7SGQSAogbZvYA2bHIR1g+sJO3Mrlh4g7KdU DQ2rBWWWF7yZUu4q2mQgtfKyHFsSjzB0D+Od4YzcIxhgGjK0Fj8+oz8tgs5T/oivY0/H u9557BoLjPyZLemEukKKLXZ41OC2TjI0+3dlR+L/pBXdewalSdAB6GnJftgRnLXy8dkZ OVTQ== 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=4qaY4EWK1ot6DuTquMqVDtyzYHOln/nQgHLZbykeE/Q=; b=ZcgQyrF6GDi7Y/PCL8bKtDTvZnyPX0XVpX2lKnYymLg16hXvkIcAbt8YJ730qlPavH 7x6h7EjtYqtsH7TdcK+zDBsGkrZymudpyAAVsHVsPgER3f3IN+qdZ2ul7liv3JYkZzf9 2ZvxlxuUyn6VTLwaFGRV8dquOo8AKJULsWbc9DzSI1cEVuarKoMGpLsrXEb+4WuHB4Rl DGHWL6GEtMmR6ak2l4V6ydCNVpPVa6C/4B1WtiY9IPw51qNs3tG3I1uHRNMl4A2YqTt+ Bt6KB54EZHn97PaITLw5bKlt8KQOVru5SfVWeKJ4HbSfDWWxJqIxSk/42q0vvrblA9Ke ux9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a630b02000000b0053f2551834esi3208474pgl.735.2023.06.09.14.48.29; Fri, 09 Jun 2023 14:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbjFIV3J (ORCPT + 99 others); Fri, 9 Jun 2023 17:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjFIV3I (ORCPT ); Fri, 9 Jun 2023 17:29:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A2C1AE; Fri, 9 Jun 2023 14:29:07 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 9E37660BBB; Fri, 9 Jun 2023 21:29:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BA5CC433EF; Fri, 9 Jun 2023 21:29:04 +0000 (UTC) Date: Fri, 9 Jun 2023 17:29:02 -0400 From: Steven Rostedt To: Mark Rutland Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Song Liu , live-patching@vger.kernel.org, Kees Cook , Miguel Ojeda , Nick Desaulniers , Ingo Molnar Subject: Re: [PATCH] ftrace: Allow inline functions not inlined to be traced Message-ID: <20230609172902.1d386ed7@gandalf.local.home> In-Reply-To: References: <20230502164102.1a51cdb4@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 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Jun 2023 10:50:51 +0100 Mark Rutland wrote: > Unfortunately, from a quick build-test of arm64 there are a bunch of places > that are currently inline that need to be __always_inline for this to be safe. > Notably we have a few low-level helpers like is_kernel_in_hyp_mode() that are > only inlines, and those get used in the bowels of our entry code before we've > restored some HW state (e.g. in arch_nmi_enter()). Sounds like you also need to add noinstr ;-) > > I'm happy to go audit and fixup arm64, but that will take some work. > > Maybe it's worth having something like: > > #ifdef ARCH_CAN_TRACE_INLINE > #define __notrace_inline > #else > #define __notrace_inline notrace > #endif > > ... so that we can opt-in where this is safe, (e.g. on x86)? I guess I can do that. -- Steve