Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2643197rwb; Mon, 15 Aug 2022 08:51:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR40KBayJ2+NGiM2fAnGUtgnK0fJai5hEi/Yf6hmFuDlMTFapj54BxvF+FIlHA01AArMQeXo X-Received: by 2002:a17:907:9606:b0:72f:826d:21b4 with SMTP id gb6-20020a170907960600b0072f826d21b4mr10818352ejc.510.1660578680259; Mon, 15 Aug 2022 08:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660578680; cv=none; d=google.com; s=arc-20160816; b=ansiUUXwZ8IDFdDZbAx6AoCJZs2Qhto9MaAYAsG6a/ywUDWiZLkfeIhp+HoQavwFjo yFi6HkpcmUukvxZFLC8SsL84XyAIPctZVCS9amRO5ehmcePI7fgHNI8Ft7UoX4kfq/Ss IZOQkNk7jBX7r2CsdzT7ZSRNtOGUy9x3EIrC5kkCnsIib1l8jSwoLP5+hL6C7WO8dJHv Vj2z/bntoU/t26oiuDRzjJwaXDBWCN2f9xWShCGIeFE23G1UNx/lNGC2xf3yyWq+8Oxu ajCPCIdal9GohIEX2DXj+cUsF6UjgQLlziYCnM8OFO0qlZ3RM27gcfXB/s+FBKYKQe14 z8gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P5wY5zgg3rjOGWIVZoee4r16o0xMuIGJOZZTb6Q98pw=; b=gnHup3fHRf8DP6E8nlH7fBgTm4eqRrFWLVVkae4eU8kHdVkbPCufxuk/g3Cp2IddKo oqwavZRG061iQA4yreyBIx8MCuFhRZ5RO28IWzmWJ0BwzM2vDzLr4xV5OVQHUVBa1VQl pmh+5cYiCBRC1oELoe0BH2HnFQVg6NfPvktivQjMLU2e1LpywpDA2ZUSI+T7nNv4+OnT JSWXJXbMZ/uSE5vH5OQfc/k6mImf/+BjWL/MfikC1jyly3tz/hk412JQjbVjmKC7FEPF SUpJlS9iVCttNIAX/V0UIV1V7oJTCzNfgu/J6pKQmL0rwk3VvuKECIST7kCYDoLv1Qh/ gFEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cGyHTvHg; 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 m9-20020a056402430900b00441d2634adesi9403304edc.266.2022.08.15.08.50.54; Mon, 15 Aug 2022 08:51:20 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cGyHTvHg; 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 S229455AbiHOPtM (ORCPT + 99 others); Mon, 15 Aug 2022 11:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbiHOPtA (ORCPT ); Mon, 15 Aug 2022 11:49:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DADE9EE32; Mon, 15 Aug 2022 08:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=P5wY5zgg3rjOGWIVZoee4r16o0xMuIGJOZZTb6Q98pw=; b=cGyHTvHgOgGnA3KI+8g9w+XWlt N/0YnVmrgyjEAkR/jU/cyKgYsOOyrOu8Y1c+vunhtZQCKA4ZdEtrEwD49WJf/9QWRc//3g8D4YqVp DXX/ZDLGBSBuP9I1f9ZuRpaPakNRJqj7bxXP3WgvGEgXg7AlktKH1QKAb4LJ39AIDjEAonl3b6REk qgy6llVcH+zA8neTygsz1XUcBAk6uEYaB6363ngNIjhwcJORPC27TiEJcyCaP0gezi2gmdoNUNBAE Knszmkl3DyH4Uo25vNxpDvKNEXFPSo/y0WanxovWiil8U7KbOOXE23CDnyeUIjSlNHOrJepfbTzHt zIIipRlw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNcKb-005q2a-BO; Mon, 15 Aug 2022 15:48:45 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 8613F9801D4; Mon, 15 Aug 2022 17:48:44 +0200 (CEST) Date: Mon, 15 Aug 2022 17:48:44 +0200 From: Peter Zijlstra To: Alexei Starovoitov Cc: Jiri Olsa , Steven Rostedt , 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 Subject: Re: [RFC] ftrace: Add support to keep some functions out of ftrace Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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, Aug 15, 2022 at 08:35:53AM -0700, Alexei Starovoitov wrote: > On Mon, Aug 15, 2022 at 8:28 AM Peter Zijlstra wrote: > > > > On Mon, Aug 15, 2022 at 08:17:42AM -0700, Alexei Starovoitov wrote: > > > It's hiding a fake function from ftrace, since it's not a function > > > and ftrace infra shouldn't show it tracing logs. > > > In other words it's a _notrace_ function with nop5. > > > > Then make it a notrace function with a nop5 in it. That isn't hard. > > That's exactly what we're trying to do. All the while claiming ftrace is broken while it is not. > Jiri's patch is one way to achieve that. Fairly horrible way. > What is your suggestion? Mailed it already. > Move it from C to asm ? Would be much better than proposed IMO. > Make it naked function with explicit inline asm? Can be made to work but is iffy because the compiler can do horrible things with placing the asm().