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 2943BC433EF for ; Tue, 5 Jul 2022 18:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbiGESey (ORCPT ); Tue, 5 Jul 2022 14:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiGESew (ORCPT ); Tue, 5 Jul 2022 14:34:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099D3C32 for ; Tue, 5 Jul 2022 11:34:52 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A3738619D3 for ; Tue, 5 Jul 2022 18:34:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1779BC341D0 for ; Tue, 5 Jul 2022 18:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657046091; bh=6Q6L7ItvRpcjFL8OKolK1uJc+Q7Yy1msl+1o6EkRB/8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mktxa6x986AkFC5I8f5PhofPbCHGkpgol52ImALmNNGYZqrRiDT4+Dk++pSjhtX11 dJFVLFkkNSS76Ub1X14ZvCN7j5YlCxo4AEHf3WeVZo/FOJpDOiJP50EUXNDpYv70KS mEHoma4CI4WFlRS1xXbWLWLgh1UKJO8SGKkX/rFYsb66BuMmCW7DFifhhZWcSb2Cjn 4VqxBDw44B3XqlDVorPkenPW55R1Xe2pkZ3Ys3gxVv3dl8u4vs3kdI0w9++gzyxFE5 JLm8ogFyFTDcO+PzS6EiX5gRhfK5XcfL8BICHIqnKIzzltyJ9MRXRh2ytkcqImiB4g 2ORoqyww/qDXA== Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-31c8a1e9e33so65622827b3.5 for ; Tue, 05 Jul 2022 11:34:51 -0700 (PDT) X-Gm-Message-State: AJIora+nI7etqtsB6BIudrbsOgU/TPIp3dzrG0b7FJzPQGvclbkY6Wyl M0V0m+eOhKCCUm0pjNEGWEkCaJmiEOxii2+1xRGBFQ== X-Google-Smtp-Source: AGRyM1smTdgkTIMoo8AgGK7QmKUaOKBEwIlG7ss1lMXSwBklEboyMmlSfQ0DqJyXk9F7WTuJiJpXJ4rynBZA5kZqd8I= X-Received: by 2002:a81:3d1:0:b0:31c:9b70:ba8a with SMTP id 200-20020a8103d1000000b0031c9b70ba8amr12627600ywd.204.1657046090114; Tue, 05 Jul 2022 11:34:50 -0700 (PDT) MIME-Version: 1.0 References: <20220625161255.547944-1-xukuohai@huawei.com> <20220705160045.GA1240@willie-the-truck> In-Reply-To: <20220705160045.GA1240@willie-the-truck> From: KP Singh Date: Tue, 5 Jul 2022 20:34:39 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v6 0/4] bpf trampoline for arm64 To: Will Deacon Cc: Daniel Borkmann , jean-philippe.brucker@arm.com, Xu Kuohai , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Mark Rutland , Catalin Marinas , Alexei Starovoitov , Zi Shen Lim , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , "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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 5, 2022 at 6:00 PM Will Deacon wrote: > > Hi Daniel, > > On Thu, Jun 30, 2022 at 11:12:54PM +0200, Daniel Borkmann wrote: > > 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 +1 I need to give it another pass. > > > - 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. > > Mark's out at the moment, so I wouldn't hold this series up pending his ack. > However, I agree that it would be good if _somebody_ from the Arm side can > give it the once over, so I've added Jean-Philippe to cc in case he has time Makes sense, Jean-Philippe had worked on BPF trampolines for ARM. > for a quick review. KP said he would also have a look, as he is interested Thank you so much Will, I will give this another pass before the end of the week. > in this series landing. > > Failing that, I'll try to look this week, but I'm off next week and I don't > want this to miss the merge window on my account. Thanks for being considerate. Much appreciated. - KP > > Cheers, > > Will 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 384D1C433EF for ; Tue, 5 Jul 2022 18:35:57 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vk7M+emX656O4uHTEsMsGZZvIyOf8SNGaVTAGPdOW2o=; b=QFboJ2QERhobFB q4PkSLE2z2U3YoT8PYvbuBTZta58MGu4JYbuPmEnzGz3oicsx3sKoz+v3LVpIL5odGXXnbZ5RFOGz XnI4apIVWFTN+QuQA3TUzmwQ7qroVwnfPmb+vsR6eqfA/OhDydAthk8nAkj/fG0zqr6rApXahtwAm 57oKHdtOQG7qzqWV9PB7ugAYWHMl3sfCTxKq8lHbmZCx0z7InIaT1nWmqQSgLBZ8Yxengu3/Tbakk 56PE2HwcYTcN3RtyNArQIyGmQibs0U1M0mnNmz8YB4AkSwWIlFZkxx2q4p/IZ9RRciI3eu90RNC5i aYah/KqojOvl7mbfgEew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nNy-00286N-KG; Tue, 05 Jul 2022 18:34:58 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8nNu-00284h-FV for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 18:34:56 +0000 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 51DDAB818C6 for ; Tue, 5 Jul 2022 18:34:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F3B7C385A2 for ; Tue, 5 Jul 2022 18:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657046091; bh=6Q6L7ItvRpcjFL8OKolK1uJc+Q7Yy1msl+1o6EkRB/8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mktxa6x986AkFC5I8f5PhofPbCHGkpgol52ImALmNNGYZqrRiDT4+Dk++pSjhtX11 dJFVLFkkNSS76Ub1X14ZvCN7j5YlCxo4AEHf3WeVZo/FOJpDOiJP50EUXNDpYv70KS mEHoma4CI4WFlRS1xXbWLWLgh1UKJO8SGKkX/rFYsb66BuMmCW7DFifhhZWcSb2Cjn 4VqxBDw44B3XqlDVorPkenPW55R1Xe2pkZ3Ys3gxVv3dl8u4vs3kdI0w9++gzyxFE5 JLm8ogFyFTDcO+PzS6EiX5gRhfK5XcfL8BICHIqnKIzzltyJ9MRXRh2ytkcqImiB4g 2ORoqyww/qDXA== Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-31cac89d8d6so48281747b3.2 for ; Tue, 05 Jul 2022 11:34:51 -0700 (PDT) X-Gm-Message-State: AJIora9GC5FzdDSvtyRNxmVCwa7RDtCOqDifGkSG/LgQ8bR4evFL7onA +R1FM0FvaBlxXkef1Htf9EJ/Uz8US/r2m8xy98UoYA== X-Google-Smtp-Source: AGRyM1smTdgkTIMoo8AgGK7QmKUaOKBEwIlG7ss1lMXSwBklEboyMmlSfQ0DqJyXk9F7WTuJiJpXJ4rynBZA5kZqd8I= X-Received: by 2002:a81:3d1:0:b0:31c:9b70:ba8a with SMTP id 200-20020a8103d1000000b0031c9b70ba8amr12627600ywd.204.1657046090114; Tue, 05 Jul 2022 11:34:50 -0700 (PDT) MIME-Version: 1.0 References: <20220625161255.547944-1-xukuohai@huawei.com> <20220705160045.GA1240@willie-the-truck> In-Reply-To: <20220705160045.GA1240@willie-the-truck> From: KP Singh Date: Tue, 5 Jul 2022 20:34:39 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v6 0/4] bpf trampoline for arm64 To: Will Deacon Cc: Daniel Borkmann , jean-philippe.brucker@arm.com, Xu Kuohai , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Mark Rutland , Catalin Marinas , Alexei Starovoitov , Zi Shen Lim , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , "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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_113454_845213_77BD9FF0 X-CRM114-Status: GOOD ( 30.59 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 5, 2022 at 6:00 PM Will Deacon wrote: > > Hi Daniel, > > On Thu, Jun 30, 2022 at 11:12:54PM +0200, Daniel Borkmann wrote: > > 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 +1 I need to give it another pass. > > > - 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. > > Mark's out at the moment, so I wouldn't hold this series up pending his ack. > However, I agree that it would be good if _somebody_ from the Arm side can > give it the once over, so I've added Jean-Philippe to cc in case he has time Makes sense, Jean-Philippe had worked on BPF trampolines for ARM. > for a quick review. KP said he would also have a look, as he is interested Thank you so much Will, I will give this another pass before the end of the week. > in this series landing. > > Failing that, I'll try to look this week, but I'm off next week and I don't > want this to miss the merge window on my account. Thanks for being considerate. Much appreciated. - KP > > Cheers, > > Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel