From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53108C433EF for ; Thu, 30 Jun 2022 21:13:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237251AbiF3VNH (ORCPT ); Thu, 30 Jun 2022 17:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237044AbiF3VND (ORCPT ); Thu, 30 Jun 2022 17:13:03 -0400 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76977220C6; Thu, 30 Jun 2022 14:13:02 -0700 (PDT) Received: from sslproxy04.your-server.de ([78.46.152.42]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1o71T6-0001kM-0I; Thu, 30 Jun 2022 23:12:56 +0200 Received: from [85.1.206.226] (helo=linux-3.home) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o71T5-0002uc-Ak; Thu, 30 Jun 2022 23:12:55 +0200 Subject: Re: [PATCH bpf-next v6 0/4] bpf trampoline for arm64 To: Xu Kuohai , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Mark Rutland Cc: Catalin Marinas , Will Deacon , Alexei Starovoitov , Zi Shen Lim , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Jakub Kicinski , Jesper Dangaard Brouer , Russell King , James Morse , Hou Tao , Jason Wang References: <20220625161255.547944-1-xukuohai@huawei.com> From: Daniel Borkmann Message-ID: Date: Thu, 30 Jun 2022 23:12:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220625161255.547944-1-xukuohai@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.6/26589/Thu Jun 30 10:08:14 2022) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Mark, On 6/25/22 6:12 PM, Xu Kuohai wrote: > This patchset introduces bpf trampoline on arm64. A bpf trampoline converts > native calling convention to bpf calling convention and is used to implement > various bpf features, such as fentry, fexit, fmod_ret and struct_ops. > > The trampoline introduced does essentially the same thing as the bpf > trampoline does on x86. > > Tested on raspberry pi 4b and qemu: > > #18 /1 bpf_tcp_ca/dctcp:OK > #18 /2 bpf_tcp_ca/cubic:OK > #18 /3 bpf_tcp_ca/invalid_license:OK > #18 /4 bpf_tcp_ca/dctcp_fallback:OK > #18 /5 bpf_tcp_ca/rel_setsockopt:OK > #18 bpf_tcp_ca:OK > #51 /1 dummy_st_ops/dummy_st_ops_attach:OK > #51 /2 dummy_st_ops/dummy_init_ret_value:OK > #51 /3 dummy_st_ops/dummy_init_ptr_arg:OK > #51 /4 dummy_st_ops/dummy_multiple_args:OK > #51 dummy_st_ops:OK > #57 /1 fexit_bpf2bpf/target_no_callees:OK > #57 /2 fexit_bpf2bpf/target_yes_callees:OK > #57 /3 fexit_bpf2bpf/func_replace:OK > #57 /4 fexit_bpf2bpf/func_replace_verify:OK > #57 /5 fexit_bpf2bpf/func_sockmap_update:OK > #57 /6 fexit_bpf2bpf/func_replace_return_code:OK > #57 /7 fexit_bpf2bpf/func_map_prog_compatibility:OK > #57 /8 fexit_bpf2bpf/func_replace_multi:OK > #57 /9 fexit_bpf2bpf/fmod_ret_freplace:OK > #57 fexit_bpf2bpf:OK > #237 xdp_bpf2bpf:OK > > v6: > - Since Mark is refactoring arm64 ftrace to support long jump and reduce the > ftrace trampoline overhead, it's not clear how we'll attach bpf trampoline > to regular kernel functions, so remove ftrace related patches for now. > - Add long jump support for attaching bpf trampoline to bpf prog, since bpf > trampoline and bpf prog are allocated via vmalloc, there is chance the > distance exceeds the max branch range. > - Collect ACK/Review-by, not sure if the ACK and Review-bys for bpf_arch_text_poke() > should be kept, since the changes to it is not trivial > - Update some commit messages and comments Given you've been taking a look and had objections in v5, would be great if you can find some cycles for this v6. Thanks a lot, Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD1F8C433EF for ; Thu, 30 Jun 2022 21:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FawrqY5LQVWq1ENRizn1XBmFoWffMX9FYR+vob2ToyQ=; b=3HzkakIjEjWSX3jir1vDo9c7X8 kC+YZDL+gz96yiFDeOIMg19dhe0OY37uANH5MQj/UEmalpTpdCtPEmCe71ZaabcfOFU8XhIuyvnWK BpcPHxv+zNt/R522bt3+YF92ZyH/kUyvHVHDvGHnH/9Kr64C30X4MtMBDRH25ROHX7rHFLonWYxut dksysJrJs0lsALuGC1dKeHqljDDgN+bkeoZgMboXX9u/JSZWrbSFAVokLLFf4ghihKc8tQnpkJwvg Ok5U8bL8GPTHrZ8JdphoeFhKpOSTO2AYTC6j2ZQSwptbE0Yg4tje0VpGAYZcrELFIa/5e+iIiN/k0 m0tCselA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o71TQ-001al8-LU; Thu, 30 Jun 2022 21:13:16 +0000 Received: from www62.your-server.de ([213.133.104.62]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o71TN-001aiC-4B for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 21:13:15 +0000 Received: from sslproxy04.your-server.de ([78.46.152.42]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1o71T6-0001kM-0I; Thu, 30 Jun 2022 23:12:56 +0200 Received: from [85.1.206.226] (helo=linux-3.home) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o71T5-0002uc-Ak; Thu, 30 Jun 2022 23:12:55 +0200 Subject: Re: [PATCH bpf-next v6 0/4] bpf trampoline for arm64 To: Xu Kuohai , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Mark Rutland Cc: Catalin Marinas , Will Deacon , Alexei Starovoitov , Zi Shen Lim , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Jakub Kicinski , Jesper Dangaard Brouer , Russell King , James Morse , Hou Tao , Jason Wang References: <20220625161255.547944-1-xukuohai@huawei.com> From: Daniel Borkmann Message-ID: Date: Thu, 30 Jun 2022 23:12:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220625161255.547944-1-xukuohai@huawei.com> Content-Language: en-US X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.6/26589/Thu Jun 30 10:08:14 2022) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_141313_216356_DBFC205B X-CRM114-Status: GOOD ( 16.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hey Mark, On 6/25/22 6:12 PM, Xu Kuohai wrote: > This patchset introduces bpf trampoline on arm64. A bpf trampoline converts > native calling convention to bpf calling convention and is used to implement > various bpf features, such as fentry, fexit, fmod_ret and struct_ops. > > The trampoline introduced does essentially the same thing as the bpf > trampoline does on x86. > > Tested on raspberry pi 4b and qemu: > > #18 /1 bpf_tcp_ca/dctcp:OK > #18 /2 bpf_tcp_ca/cubic:OK > #18 /3 bpf_tcp_ca/invalid_license:OK > #18 /4 bpf_tcp_ca/dctcp_fallback:OK > #18 /5 bpf_tcp_ca/rel_setsockopt:OK > #18 bpf_tcp_ca:OK > #51 /1 dummy_st_ops/dummy_st_ops_attach:OK > #51 /2 dummy_st_ops/dummy_init_ret_value:OK > #51 /3 dummy_st_ops/dummy_init_ptr_arg:OK > #51 /4 dummy_st_ops/dummy_multiple_args:OK > #51 dummy_st_ops:OK > #57 /1 fexit_bpf2bpf/target_no_callees:OK > #57 /2 fexit_bpf2bpf/target_yes_callees:OK > #57 /3 fexit_bpf2bpf/func_replace:OK > #57 /4 fexit_bpf2bpf/func_replace_verify:OK > #57 /5 fexit_bpf2bpf/func_sockmap_update:OK > #57 /6 fexit_bpf2bpf/func_replace_return_code:OK > #57 /7 fexit_bpf2bpf/func_map_prog_compatibility:OK > #57 /8 fexit_bpf2bpf/func_replace_multi:OK > #57 /9 fexit_bpf2bpf/fmod_ret_freplace:OK > #57 fexit_bpf2bpf:OK > #237 xdp_bpf2bpf:OK > > v6: > - Since Mark is refactoring arm64 ftrace to support long jump and reduce the > ftrace trampoline overhead, it's not clear how we'll attach bpf trampoline > to regular kernel functions, so remove ftrace related patches for now. > - Add long jump support for attaching bpf trampoline to bpf prog, since bpf > trampoline and bpf prog are allocated via vmalloc, there is chance the > distance exceeds the max branch range. > - Collect ACK/Review-by, not sure if the ACK and Review-bys for bpf_arch_text_poke() > should be kept, since the changes to it is not trivial > - Update some commit messages and comments Given you've been taking a look and had objections in v5, would be great if you can find some cycles for this v6. Thanks a lot, Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel