Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3407029rwb; Tue, 16 Aug 2022 02:22:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4f96APMLpoyAfCt0169k5e611dCyZWepCA7gi84mHFGPzkKmP7a3ikspZ/osh202C8qtCk X-Received: by 2002:a17:90a:e7c3:b0:1f5:8428:bee2 with SMTP id kb3-20020a17090ae7c300b001f58428bee2mr22322265pjb.33.1660641765001; Tue, 16 Aug 2022 02:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660641764; cv=none; d=google.com; s=arc-20160816; b=uBSd8OcTqwIPk5DJy8Cm1a+8DBbBmTtzo1fFiCqkrrWQurkDe04Z6nK24PHB9K7noC TrhVuyE+Y1LoXig2DGQXja575/o/NiojD17goPIE3p7EY/ohsxlnWVPLlC9Dn//o9fAL veEuykNnD2u4et6LKpMC5sQX2yWyy5rABZ7xmYDTP0V2Ez9kni+o5E6NV7DeTNuTf/nt kqR5SBBhH4jCHM742ugIRV/M+7oIq1QZYr1L2X7zbXvYhL5wXrGgZ2n9XzkidKC003Hf HZSrYYJem55XCgVh8Jgc97T2vfGMorltxXPQ+uguAZnUBdaawnotaIx57LwDpHS02Qbx IZYA== 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:date:from:dkim-signature; bh=pyTZytG+72+2/FZ5A1dNsnzW13neVvkCe+2kVkYrp8Q=; b=QnCnM1VjxDaE2POAgfg3u01EQaqO4RZHx5qCIasOMOwmSCo/VWypb684WyG0LmnQe7 TueedWcmSoPjfF4nCPLR6fgyfDiq9y7fgAFNp45hOPuRq78l1o2/d4+LT0Y041l8iZtz AMsKASB+7wo2XE1zY7+RVI9eTzkXn3t0j13TJlUG/gxBic83W85wpP4pUcFeY3H0GtWN 47nPLmC5OTWHN72s6ZHNZzBU2JFFkSvnxksBbJREXVH62u6ngDP0DQyvh7guj5bYK0M3 BNmYinQJ39EVjVxlLjySri2VIu4/i+B5dVLLr2vS7kiCgF0R/rRDKwbaPT22Eh1pw4CX zH3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AV3ifGSE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a65558f000000b0041e2cc843a0si13059030pgs.592.2022.08.16.02.22.33; Tue, 16 Aug 2022 02:22:44 -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=@gmail.com header.s=20210112 header.b=AV3ifGSE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232412AbiHPIwB (ORCPT + 99 others); Tue, 16 Aug 2022 04:52:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232622AbiHPIvg (ORCPT ); Tue, 16 Aug 2022 04:51:36 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1CE1F619B; Mon, 15 Aug 2022 23:56:38 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id fy5so17228961ejc.3; Mon, 15 Aug 2022 23:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc; bh=pyTZytG+72+2/FZ5A1dNsnzW13neVvkCe+2kVkYrp8Q=; b=AV3ifGSEj5rwDb3AbGDo+NVEIw1WNeHbNMtVSKR9X9ruPzZ1XfEv0oy7KrPKo0RQn/ H64hT1+5BCeY7aa8v2Ydr11tm4uXivRuo/riY/K5DG8E5GzfPm+1VoChYqdCG2my64d7 mc48Axjwqcq/1AkhvPx3ZdYEEJDtRUvvp69/c4dnUkbldDO8A9I96i2O/C+vd5BOwgu2 YxTRxBM61+3MOPgE7Epi8XNbGRLilLC6hQqk94BVhDbZ53qiN1sCok933/BAo/vprrr1 +FEn0et+6PpudVZBRFIBREcrDjIJdlEZjF9BwIW6S9PlVER95rtLqlx1GVeIHRgWrQWY 6nXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc; bh=pyTZytG+72+2/FZ5A1dNsnzW13neVvkCe+2kVkYrp8Q=; b=QFrFsiNsp+6gLzZMdP7gpRjm/XoRnh7z/sQIsoya/jQASdiY9XzU6JoamF8lqoxEMx sDcsWy2N59z8WFEtN/ODN4e1YN39bldpqnpHbwWQPiQLTz6FMtJK0Yqz8rXRoy0Zh79U bLYdgt8urcWqtbjX+tstgFZ/THSk1ZZ4xawGsf/bJlsy7L0P27EYE47tlNX0YJ925tXP GRWqizyXmWnOLty2xneJ5cOVXYHCZSCEL2VSF6EvwdT5CAUdWM6TC4HiSFwLDwEms9wQ 6SDIXPfI6dKHORs6VI0HdpxVJLiTX7glcx9SUgnH4IVli1O+Wg4d2hUBVErPSGjs7U30 b6Wg== X-Gm-Message-State: ACgBeo1kgdzgBed4v0ZdHCHnKKP1DkXPdqFezlzauf7fytc/oBzHSEcP r7LMTs99WZR1jK9p0adMEOI= X-Received: by 2002:a17:907:60c7:b0:731:148b:c515 with SMTP id hv7-20020a17090760c700b00731148bc515mr12509099ejc.724.1660632997158; Mon, 15 Aug 2022 23:56:37 -0700 (PDT) Received: from krava ([193.85.244.190]) by smtp.gmail.com with ESMTPSA id h26-20020a17090619da00b00734bfab4d59sm4985944ejd.170.2022.08.15.23.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 23:56:36 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 16 Aug 2022 08:56:33 +0200 To: Peter Zijlstra Cc: Alexei Starovoitov , 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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, Aug 15, 2022 at 05:48:44PM +0200, Peter Zijlstra wrote: > 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. nice, that would be independent of the compiler atributes and config checking.. will check on this one ;-) thanks, jirka > > > 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().