Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2722118rwb; Mon, 15 Aug 2022 10:11:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vl59hos8GCM3JKI6TlFrqS8dSxLmZu0omx1i8rjmsq5IGTuzU15a3uJ/K5nYblfQAQlb/ X-Received: by 2002:a17:902:c943:b0:16f:15a0:d497 with SMTP id i3-20020a170902c94300b0016f15a0d497mr17929132pla.80.1660583511165; Mon, 15 Aug 2022 10:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660583511; cv=none; d=google.com; s=arc-20160816; b=KVk0wzIq68PlXs8BTD7jOOZMD5kfxTjU9mB0od5IORAz/jNP+jjkW70QjNhQfUh9rG oIo0/MKiyoWqLUf9MXTgMWjI9piUtDI0TcajYPR4XpN5VYU0R5HhK3iXBmRKRpWbShmX B0gqmsy9CBp8sq7Io2YKcWPJG4MnPFPTJ5ZpqTR2u01rDq2FZJgtSGMOM3+OHsnRPa+o Ao+7m3bAIcl6ns79gp4CAUugbuq233LbpFqGw5P3z5uL2PBYEy52n2hJ6kP78i78EFmn Nd9hvwUqx+Tmnn+QGz7dwy7+iwOs4KlyxokYis4VDyXYLQgyS4NXZsm+W0DF6SfbMsRu IIGw== 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=+HIMbpj2lzuXz68/jp5gvcEQlYwp48dIE7sx5zXTfi8=; b=H2ZVYqlON40qXgK5feaOk73++6m0qmhZ7vaLpLIu+C5qrBAO8c1ULN+Yt75ObYijGo ZxgY0IJFq+pv/2FCYysJ4Binjqp+HWhja8fjLIkT5KRsH7SC9kM2aMAWPPLrUF7areUC NeImR4vgQtKjQHnCRm0tyImx2ukTJiat5ZR0Gq926TDLe34AYR0mNWbQlGP9L5Hvw9he HjiyNUlh6HTH564CF4gGTOWSvUEFTZY6xe7uE/+5TNgvkvjze5tkm7cdWHUhUN4pcEF6 uRHlkqiumCjmqNUw/1c+1MXtsRO0FHsh+lsOLDy9cLB4cdWAaELyKi5/3v3KRcPoAKSJ k91g== 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 i6-20020a635406000000b0041bd09a9c1dsi11099142pgb.536.2022.08.15.10.11.35; Mon, 15 Aug 2022 10:11:51 -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 S231810AbiHOQI5 (ORCPT + 99 others); Mon, 15 Aug 2022 12:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbiHOQIx (ORCPT ); Mon, 15 Aug 2022 12:08:53 -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 396971CFEA; Mon, 15 Aug 2022 09:08:53 -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 B204561199; Mon, 15 Aug 2022 16:08:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30CD4C433C1; Mon, 15 Aug 2022 16:08:50 +0000 (UTC) Date: Mon, 15 Aug 2022 12:08:56 -0400 From: Steven Rostedt To: Alexei Starovoitov Cc: Peter Zijlstra , Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Ingo Molnar , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , LKML , Josh Poimboeuf , Linus Torvalds , Thomas Gleixner Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace Message-ID: <20220815120856.6d632c5d@gandalf.local.home> In-Reply-To: References: <20220813150252.5aa63650@rorschach.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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 Mon, 15 Aug 2022 08:49:11 -0700 Alexei Starovoitov wrote: > > > The whole problem is that it isn't a notrace function and you're abusing > > > a __fentry__ site. > > > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=x86/fineibt&id=8d075bdf11193f1d276bf19fa56b4b8dfe24df9e > > Brand new stuff. > Awesome. That should fit perfectly. > > > foo.c: > > > > __attribute__((__no_instrument_function__)) > > __attribute__((patchable_function_entry(5))) > > Interesting. Didn't know about this attribute. > > > void my_func(void) > > { > > } > > > > void my_foo(void) > > { > > } > > Great. > Jiri, could you please revise your patch with this approach? This is the exact result I was looking for. Something we can all agree to. The point being, include others when developing code that is similar to what other subsystems do. On the code modification front, please Cc the ftrace, kprobe, static_call and jump_label maintainers, as we like to work together. The BPF dispatcher modifications should be no different. There's a lot of experience in this field throughout the kernel. Please utilize it. If it wasn't for this thread, we would never had found out about this easy solution. -- Steve