Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2466008rwb; Mon, 15 Aug 2022 06:05:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR7rqkt7cCxZJGWSnTedafrT++jPYYNePHyoHgR/+Q3vdGaTBl2BEy5L5QDKpuNdxF2KF9S6 X-Received: by 2002:a17:90b:1e0c:b0:1f5:4e52:4866 with SMTP id pg12-20020a17090b1e0c00b001f54e524866mr28378379pjb.230.1660568744927; Mon, 15 Aug 2022 06:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660568744; cv=none; d=google.com; s=arc-20160816; b=rMEl0DNM9wlYmvPqA+U5aBT75L9l0vZ/vwRrPoQmVkfxSEPSA1P8znLj4wOuUlS7cT xHKVVdqP39gO4sziKkwOcvwi2odD1FbSVElp8tey5AW/AgdElZzUieT1x0P0yVbRImUN vLZ3oDvuK1bKwIZbmAXdFMf1AbqWNDZlPjUDZcEm4Ng+gYBeUj5Vcj2Yb9HcolXfCAcu wn16d+yyQCw3d7j87aeYtgCQxKQV1V3pNBLop0tk3vI5zBBr+l07BfylCsOkigi0c/eP uzKFnvGNV6/QWE1GBYFSOUfAm0gY1/Mu4WRW+7iHkVCPkG5V1eG/ppg6fGhq/pTodYRX 5w8w== 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=5Ly2/Q/Gj3PGUvgRwRp1buJOUgaq2gWZGs2NW4e5dCw=; b=uY2O5YfsifPS/25vw1rqYJXl4+L7s8iSvpQD5pLfpwG6W/taiw2dL4IsRvpHcLuF5l Tk7ijHVaOKohU/NKw3XmO3iu3yNLZeYFt4UAVR9C7gBBbdvLYGO4XSTrGOLuAE9ENSdr 0AlOFQLG1bSENAkRgfzbinjwm1Ln+9c69r45/759sdB+MjMgoQRSjW6HZIAAlUHOUcNX JRdbAmSfcMfzJcsrDaYVQOV0NFJhpR3R9MTnvNy1UvmlMZLDDqqfMBrezd3nbTexGD7Y pQU28NuFIrWcIkIMEB3UAOh+/tLXgxtTVJbOIGUu8KdD66xoBl/woanKSrstvKgcavN5 k6Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=j01s9Ia7; 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 i8-20020a635408000000b004206ecd8fb5si11415323pgb.531.2022.08.15.06.05.33; Mon, 15 Aug 2022 06:05: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=@infradead.org header.s=desiato.20200630 header.b=j01s9Ia7; 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 S233780AbiHOMiF (ORCPT + 99 others); Mon, 15 Aug 2022 08:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbiHOMiC (ORCPT ); Mon, 15 Aug 2022 08:38:02 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3E020F6E; Mon, 15 Aug 2022 05:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=5Ly2/Q/Gj3PGUvgRwRp1buJOUgaq2gWZGs2NW4e5dCw=; b=j01s9Ia7TTbz0+edCRg71r8pvK OPJ21hUqbOgDyr5Xs0qjReFV+8PmFn8bKn17bK2rIvIu5FF1WJCnsxqCFLlzZ5Uil0OtdU272EMJG 5vXELWjfKBx8OOyGHHjmRZQUU14/e3ve+NtHackjQ8hpIxoYaOlNwh9NFshwi02bZ1MvTGBx/Jmee WYtCxOTOZ8usZd6IrqUQA9RV1YOVoqaB95HJQAp4aAA/8t5k9p3wSiNXm8W+dY3R+fdZ8wUdPxGNq T4+ZATJnRe9FZN/Mk7ArdEbj780Kwm0tEJarX9kLfR171evapy3Zl58jpjSmrtnFsPqPMG/npfGGK pKGPvrqQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNZLf-002fiF-9x; Mon, 15 Aug 2022 12:37:39 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 4AF07980153; Mon, 15 Aug 2022 14:37:38 +0200 (CEST) Date: Mon, 15 Aug 2022 14:37:38 +0200 From: Peter Zijlstra To: Jiri Olsa Cc: Steven Rostedt , Alexei Starovoitov , 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: <20220722120854.3cc6ec4b@gandalf.local.home> <20220722122548.2db543ca@gandalf.local.home> <20220722174120.688768a3@gandalf.local.home> <20220813150252.5aa63650@rorschach.local.home> 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 11:44:32AM +0200, Jiri Olsa wrote: > On Mon, Aug 15, 2022 at 10:03:17AM +0200, Peter Zijlstra wrote: > > On Sat, Aug 13, 2022 at 03:02:52PM -0400, Steven Rostedt wrote: > > > On Fri, 12 Aug 2022 23:18:15 +0200 > > > Jiri Olsa wrote: > > > > > > > the patch below moves the bpf function into sepatate object and switches > > > > off the -mrecord-mcount for it.. so the function gets profile call > > > > generated but it's not visible to ftrace > > > > Why ?!? > > there's bpf dispatcher code that updates bpf_dispatcher_xdp_func > function with bpf_arch_text_poke and that can race with ftrace update > if the function is traced I thought bpf_arch_text_poke() wasn't allowed to touch kernel code and ftrace is in full control of it ?