Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1067249pxb; Fri, 1 Apr 2022 03:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6Kvvi4PjQWjmQhzEBDEfr9l8D6MvtXewtQp19er8CpvEnQFt22WhFIQ8in26qMEq9s2bk X-Received: by 2002:a63:680a:0:b0:383:dd15:fe68 with SMTP id d10-20020a63680a000000b00383dd15fe68mr14703133pgc.467.1648810167466; Fri, 01 Apr 2022 03:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648810167; cv=none; d=google.com; s=arc-20160816; b=irNSGV0m2EDBRao6fBBgl4mpDJw/VvsDrBdCXWRb90nyCF1KgCG5yeGRe5afuSeWfJ xjl1ckw5uDqxRb+cE7C6eFbdR0MPK9hC4piUoLb2siNFpbaakv4k1MlZox/j11TM+ESb 6l5RoyDANd5SIt14WFIGeuroj3DYQG6b0epX0rZ4rLdNyRrJM8Q+WZjgvWfAHVu4lxb6 HVne4CYvnkGSx8skQt9RkKljM6VNkeGYwZvTveMIQTEEH/9aHcDnmHasT0IGr/1cK+m1 5uSU4P0cOVOY0rIYOfBFfh7qFw8e/z8761xrXzm3Rvd6yzrnj1smZ3n9AbvicJA7zay+ wHeA== 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=ydyt2jNxl3O78hbITn8La+7DUxMQPdpkjkuE6Bh66sM=; b=Fu9U9FXVuQIlzu84k/OkvX839rqtm93dYMpKfsCfaLaIGjme+na3ghR1FM8NOA2hhs 1KILnk6KGHQEQIStAYkS2rxXX5WVwqXTRSyLc7yKwSpr8K9JVp7/ci3ixnDD0un52tle l4DgETeUaOGbUJ8vEz+/B/L0+zaJMc38JwWSvx0L9dgY3ds4Vk/Ef/VTTFHYukw7RzBB IYQpWanIymJLnwAMCw/MOumALVDgooeSHYDZqprpfsJCtBv/4yLysuAWdcotf9G+8bsX aQl9rnhGhDJsL+Tc0hVqqx0A+fGzEZrafoOy4DNQEwvxqSZ6kwqskmFkDGlmJAzNJtwF tBJQ== 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 e15-20020a630f0f000000b003816043ee38si2190671pgl.45.2022.04.01.03.49.14; Fri, 01 Apr 2022 03:49:27 -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 S239014AbiDABy2 (ORCPT + 99 others); Thu, 31 Mar 2022 21:54:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233627AbiDABy0 (ORCPT ); Thu, 31 Mar 2022 21:54:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF5832571B7; Thu, 31 Mar 2022 18:52:38 -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 ams.source.kernel.org (Postfix) with ESMTPS id 7F046B82277; Fri, 1 Apr 2022 01:52:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 869BDC340ED; Fri, 1 Apr 2022 01:52:35 +0000 (UTC) Date: Thu, 31 Mar 2022 21:52:33 -0400 From: Steven Rostedt To: Song Liu Cc: open list , bpf , Ingo Molnar , Kernel Team Subject: Re: ftrace_direct (used by bpf trampoline) conflicts with live patch Message-ID: <20220331215233.496479fc@rorschach.local.home> In-Reply-To: <20220331214836.663bc7cf@rorschach.local.home> References: <0962AC9B-2FBD-4578-8B2F-A376A6B3B83F@fb.com> <20220331214836.663bc7cf@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 Thu, 31 Mar 2022 21:48:36 -0400 Steven Rostedt wrote: > > Does this make sense to you? Did I miss something? > > I thought the BPF trampoline does: > > call bpf_trace_before_function > call original_function + X86_PATCH_SIZE > call bpf_trace_after_function > > Thus, the bpf direct trampoline calls the unpatched version of the > function call making the live patch useless. Or is this not what it > does? Or perhaps you are only talking about the part of bpf that does not trace the end of a function? -- Steve