Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1646438ioo; Sun, 22 May 2022 22:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWqVo16u+ruTQymXU6wjkXrOiSKP30uCkv4k+0xjosqClORZUvYZGxNzewo420DbdXb04v X-Received: by 2002:a17:902:6bc1:b0:15d:1e15:1a75 with SMTP id m1-20020a1709026bc100b0015d1e151a75mr22094203plt.114.1653285183513; Sun, 22 May 2022 22:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653285183; cv=none; d=google.com; s=arc-20160816; b=E8Jrw+HUjMj2e5m1ntSyspQBtz94cTfX5ro+QCnp5muREYOjTpggOaTJ/DeprJnqsC WPz9H06JCw9FYsKNYmwx3/9ZO94Jf6CrEqnmA/1t72YHj4MwWdVyws2BqWznUp9N9ako nrxb5eZ3vgD3vYDzZoR4CqEEq6lfDZAiRMa00oF9OkG9AEFjFSmGJDFSIsVByY2nAHbe Uc8fzYu447csj2RYVsf1aOIjm2HZz1TeH66haVMmSSaoO9gghc7oS+ZEtNHuZ0avhve9 SsntD32174oSkS1H75PIToa20bacKLZu0+LPRclwHL3r6yLVH/9tjbfBekEX+wZwtWB8 vxAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DDu/yTLze4KFg1yFxzaUGUfDQmxCo5o2Ixng2muyqhM=; b=PTgfRw0muOOvTNl6X3i+4HSCh04UoONDq+4DrbAPlZNMwwfFfsz6K1xCRIyOcmV9Qv tV7E77DO+N+euLyBxPoplWvR9hpW/wISUPH7pEY0ewpngfpzUFaksRwtdnIWS4AX6ZiX 2+GHd3LPxR2iel8m3CePsbTnjVsVUkN6elKVd9Gg9Szbh7S/MN4jmoN771j4Bz4BARYK 5v7z24icU66Oe8vRCmitmDAW/7Q6cfPWiWyVrNtGwbbkKX3xqJfmexImA1szN6wQJSAJ HHdlbbthbQ91rk3h+aSA3tWAI08ewNu6yZAX2hoMvtzjmO85u86l1ACBDPMuQBwd8vEk lMtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="cGT/MLA7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y36-20020a056a00182400b0050dfc3c58fbsi13288503pfa.5.2022.05.22.22.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="cGT/MLA7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A9BB62A251; Sun, 22 May 2022 22:50:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245353AbiETVSl (ORCPT + 99 others); Fri, 20 May 2022 17:18:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236005AbiETVSg (ORCPT ); Fri, 20 May 2022 17:18:36 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBA7319C74A; Fri, 20 May 2022 14:18:34 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id n23so12335896edy.0; Fri, 20 May 2022 14:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DDu/yTLze4KFg1yFxzaUGUfDQmxCo5o2Ixng2muyqhM=; b=cGT/MLA73M02bfwmF153L+N9j9VGqt4svVWLmTvd8me8wufermxRixpqT7FiftfEWw snz0jt0fvMmRJycvtC19EfxtGK0uJLEpqsINRZHAIqqJGJAidG3GhnE1JcDorl4KbQX0 U/yijzz++jneJNOfIv0LL0x7C6yfmr7DX6xT3nJk9Zto9Ra+FvcvEXKvVoeiVSAsGFdv qw0xXE4mEi5xNL1V+f/6usYfu8dha1bsepuEf309yAsCpxjkgzYvoOeO4WkooK7VEDev i+6XuTpJ/+khHFt4PCt8ogJCs284JujSoeaCEdicl39lyA+h5ojY5er7SAf3ZrVTH/Pr g42w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DDu/yTLze4KFg1yFxzaUGUfDQmxCo5o2Ixng2muyqhM=; b=xaYTWvq3jB9ymqJwktTlOmu5PrnxZWNgSSOTcw1f8ONkEqAtSkoxbSmd4aTAB+bH9Z /vXBnGOt+a8+Z0nh4W4zlwE1nziC6Q5B1gpM1nd7lItRIU3BRfVU12mAOS4i6KC+oBTZ axDnArJ5aNepuCCpqF2URxBtIbmS5TZ2HywDxTAgHyyKLmUjiIGIAunbw0kVYOiZ8yp4 boiTZCH4DdK2jj+v9H2pkVjsbvxAIQz9gunfQ1LTzlFRhniejiRO9vbIrId+LSz8Xxz0 stZ5MQKX3tniZgD4yKDtIx67h20BU1EVom+1hAlzwe5GGfLiT3g6y5AqOQpurNfET5Ud 3CLw== X-Gm-Message-State: AOAM530PEmh0BHEPZmM1WfpPA+KWTh7nRlRQ/xjDkxPNcxAfQzsUJuT6 CKZFAeL2GUO6yqDTHp3cPxbymmgllpVdekWWenHKkuMa X-Received: by 2002:a05:6402:1d48:b0:427:dfa3:2272 with SMTP id dz8-20020a0564021d4800b00427dfa32272mr12914264edb.333.1653081513187; Fri, 20 May 2022 14:18:33 -0700 (PDT) MIME-Version: 1.0 References: <20220518131638.3401509-1-xukuohai@huawei.com> <20220518131638.3401509-6-xukuohai@huawei.com> In-Reply-To: <20220518131638.3401509-6-xukuohai@huawei.com> From: Alexei Starovoitov Date: Fri, 20 May 2022 14:18:20 -0700 Message-ID: Subject: Re: [PATCH bpf-next v5 5/6] bpf, arm64: bpf trampoline for arm64 To: Xu Kuohai Cc: 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 , Mark Rutland , Pasha Tatashin , Ard Biesheuvel , Daniel Kiss , Steven Price , Sudeep Holla , Marc Zyngier , Peter Collingbourne , Mark Brown , Delyan Kratunov , Kumar Kartikeya Dwivedi Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 ?