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 3529DC433EF for ; Mon, 23 May 2022 16:12:34 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZGlOJCA8sghOuyA3xigxfLN1xsoBRSYGEd6iRd6p5e8=; b=okc9veuvNTfQLe TwscbOBU/3rDAC7HqaJ3ZlNnF2EW5x6LB4vHCwJNe75ws5T4YwGocsW0HE4fMPFJP0tU9ClkZONsF IBlHy7l0+GUfdZJgXnCLZ5Mika6d6zHlIP3oDS3Ou+vCIaGBsd8XQemUwIIPfx3+/eYd4QIcaqIoT hi4cJqhA5AZyZmNtEojF02I7mZuNvxlL4o3XANSpbruIz5A3dat0mMIVSoOAnr6k5ATsvaCAqdUE3 QLAM8/ivFx9aVeWEmhnSBJLyzTcRAzhS/x/S2MDqhu9Eb54LrBQcgmSvnKxH+7yAYw3Oitm776nvu HqnRu1OQG7aEOaWKmRsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntAeD-00595c-PE; Mon, 23 May 2022 16:11:09 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntAcz-0058Q5-FZ for linux-arm-kernel@lists.infradead.org; Mon, 23 May 2022 16:09:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 28883139F; Mon, 23 May 2022 09:09:50 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.9.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 055253F73D; Mon, 23 May 2022 09:09:43 -0700 (PDT) Date: Mon, 23 May 2022 17:09:39 +0100 From: Mark Rutland To: Alexei Starovoitov Cc: Xu Kuohai , bpf , linux-arm-kernel , LKML , Network Development , "open list:KERNEL SELFTEST FRAMEWORK" , Catalin Marinas , Will Deacon , Steven Rostedt , Ingo Molnar , Daniel Borkmann , 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 , Borislav Petkov , Dave Hansen , X86 ML , "H. Peter Anvin" , Shuah Khan , Jakub Kicinski , Jesper Dangaard Brouer , Pasha Tatashin , Ard Biesheuvel , Daniel Kiss , Steven Price , Sudeep Holla , Marc Zyngier , Peter Collingbourne , Mark Brown , Delyan Kratunov , Kumar Kartikeya Dwivedi Subject: Re: [PATCH bpf-next v5 5/6] bpf, arm64: bpf trampoline for arm64 Message-ID: References: <20220518131638.3401509-1-xukuohai@huawei.com> <20220518131638.3401509-6-xukuohai@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_090953_688024_0777052B X-CRM114-Status: GOOD ( 19.57 ) 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 Fri, May 20, 2022 at 02:18:20PM -0700, Alexei Starovoitov wrote: > On Wed, May 18, 2022 at 6:54 AM Xu Kuohai wrote: > > > > Add bpf trampoline support for arm64. Most of the logic is the same as > > x86. > > > > Tested on raspberry pi 4b and qemu with KASLR disabled (avoid long jump), > > result: > > #9 /1 bpf_cookie/kprobe:OK > > #9 /2 bpf_cookie/multi_kprobe_link_api:FAIL > > #9 /3 bpf_cookie/multi_kprobe_attach_api:FAIL > > #9 /4 bpf_cookie/uprobe:OK > > #9 /5 bpf_cookie/tracepoint:OK > > #9 /6 bpf_cookie/perf_event:OK > > #9 /7 bpf_cookie/trampoline:OK > > #9 /8 bpf_cookie/lsm:OK > > #9 bpf_cookie:FAIL > > #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 > > #55 fentry_fexit:OK > > #56 fentry_test: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 > > #58 fexit_sleep:OK > > #59 fexit_stress:OK > > #60 fexit_test:OK > > #67 get_func_args_test:OK > > #68 get_func_ip_test:OK > > #104 modify_return:OK > > #237 xdp_bpf2bpf:OK > > > > bpf_cookie/multi_kprobe_link_api and bpf_cookie/multi_kprobe_attach_api > > failed due to lack of multi_kprobe on arm64. > > > > Signed-off-by: Xu Kuohai > > Acked-by: Song Liu > > Catalin, Will, Mark, > > could you please ack this patch that you don't mind us > taking this set through bpf-next ? This is on my queue of things to review alongside some other ftrace and kprobes patches; I'll try to get that out of the way this week. >From a quick glance I'm not too keen on the change to the ftrace trampoline, as to get rid of some existing unsoundness I'd really wanted to move that entirely away from using regs (and had a sketch for how to handle different op handlers). I'd discussed that with Steven and Masami in another thread: https://lore.kernel.org/linux-arm-kernel/YnJUTuOIX9YoJq23@FVFF77S0Q05N/ I'll see if it's possible to make this all work together. It's not entirely clear to me how the FTRACE_DIRECT its are supposed to play with dynamically allocated trampolines, and we might need to take a step back and reconsider. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel