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 4CFE1C433F5 for ; Wed, 20 Apr 2022 11:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378081AbiDTLqD (ORCPT ); Wed, 20 Apr 2022 07:46:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238863AbiDTLpz (ORCPT ); Wed, 20 Apr 2022 07:45:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3DCC419B6 for ; Wed, 20 Apr 2022 04:43:09 -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 66676B81DAB for ; Wed, 20 Apr 2022 11:43:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 065B3C385B7 for ; Wed, 20 Apr 2022 11:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650454987; bh=SJX0hL833Q2ataycRYrB6BhXBqWa4plfzhGevB+mLF0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oM1KQON57Ca6wBOgHh+FwifBZLN62uNymm74lCFy5MxgS/8YQn5HfvBjWuMraqk8r 8xanKPCKTIW0/Zxdzggzmp8RVE92mejk9Sq5b7LMEUxuKOqa9AHoOLG4WiuIoiAszo xmPJDuxYDBzmf4Qrr61QC+MZdkaP+ch0AKLWPl2Z+C+XL6zdy/Dx1sfTTm98FAycnu FUMJm1uEda+QrCbcCHFQI2Fa+4TAJIqN+FE2OMdjAZbV4BHeDQ6lnkuJdFX9zSeLUm vByjWYsORkfYyMVKuyrE3+VRH525NnnVm30zHowKwLGimwP8M1z9ax4m+AU19AlCLJ OKtbIg/i4yqOA== Received: by mail-ej1-f45.google.com with SMTP id g18so2914220ejc.10 for ; Wed, 20 Apr 2022 04:43:06 -0700 (PDT) X-Gm-Message-State: AOAM533a3Is6G8U+LR/jTywNH8hWKWcZG4WgEv1QUvwRUpXVo8LG30rD jO70J/4uSkEDtTdtL8Iyy1yiR0vXGUAZKR2vBRKJ2w== X-Google-Smtp-Source: ABdhPJyANcMdvA+ktghYJ4f27ywVan8fgMqIgZ69qYBtSH3bIIwYJZEjs0aaoX0yznuqG16ZBoHNgWlTZ78/VQ4KW/g= X-Received: by 2002:a17:907:6089:b0:6db:a3d7:3fa9 with SMTP id ht9-20020a170907608900b006dba3d73fa9mr18759957ejc.593.1650454985018; Wed, 20 Apr 2022 04:43:05 -0700 (PDT) MIME-Version: 1.0 References: <20220414162220.1985095-1-xukuohai@huawei.com> <20220414162220.1985095-6-xukuohai@huawei.com> <6c18a27f-c983-58f3-1dc0-5192f7df232a@huawei.com> <82e7faec-7f0c-573f-4945-de7072744dcb@huawei.com> In-Reply-To: <82e7faec-7f0c-573f-4945-de7072744dcb@huawei.com> From: KP Singh Date: Wed, 20 Apr 2022 13:42:54 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 5/6] bpf, arm64: bpf trampoline for arm64 To: Xu Kuohai Cc: Andrii Nakryiko , bpf , linux-arm-kernel , open list , Networking , "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 , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Borislav Petkov , Dave Hansen , X86 ML , hpa@zytor.com, Shuah Khan , Mark Rutland , Ard Biesheuvel , Pasha Tatashin , Peter Collingbourne , Daniel Kiss , Sudeep Holla , Steven Price , Marc Zyngier , Mark Brown , Kumar Kartikeya Dwivedi , Delyan Kratunov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 20, 2022 at 9:44 AM Xu Kuohai wrote: > > On 4/16/2022 9:57 AM, Xu Kuohai wrote: > > On 4/16/2022 1:12 AM, Andrii Nakryiko wrote: > >> On Thu, Apr 14, 2022 at 9:10 AM Xu Kuohai wrote: > >>> > >>> Add bpf trampoline support for arm64. Most of the logic is the same as > >>> x86. > >>> > >>> fentry before bpf trampoline hooked: > >>> mov x9, x30 > >>> nop > >>> > >>> fentry after bpf trampoline hooked: > >>> mov x9, x30 > >>> bl > >>> > >>> Tested on qemu, result: > >>> #55 fentry_fexit:OK > >>> #56 fentry_test: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 > >>> #101 modify_return:OK > >>> > >>> Signed-off-by: Xu Kuohai > >>> Acked-by: Song Liu > >>> --- > >> > >> Can you please also take a look at [0], which is an ongoing work to > >> add support for BPF cookie to BPF trampoline-based BPF programs. It's > >> very close to being done, so it would be good if you can implement > >> that at the same time. > > > > OK, I'll take a look and try to implemnt it. > > already implemented, but there are some conflicts between these two > series, will send v3 after trampoline cookie are merged. Awesome work, Thanks for doing this! 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 0DF41C433F5 for ; Wed, 20 Apr 2022 11:44:22 +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=GE+8R52MZO4xvAlMEjuf0MYE7b9V8RVaM6u2NcVeptA=; b=jT3ZgNhXR5UfLP q8Ah+FsgExSC/HETQykJeH7PszxWXDLf3ZFIwF1V02Rxc1TjfHfkQl3cCXP7yFmBGNlFrRjo9cfI4 secDV4XiOi1XA3RUr5nkz2kGWPMQ5QaLNoDqoSzYotZgm+wDYc+JJ1icqVyvuKbgpDmFNJwD8oqY/ N+83EllOEqr/KmV+W7dAeRC/z2hewuuCXnCTHr59pZZp4swbrkRcjQhJG7W6LAEx3hKX3o/CGEoEs jX4l7WJSjROQGc32AcQsVZy+tNCfrrR47zKIHdbmaEpOwYJHwUOIGO1UUQHwVnA5Gg0Hs0CrO9IUR Y6GX0r3wxeENE6ugIbBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh8jo-008pVx-82; Wed, 20 Apr 2022 11:43:12 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh8jl-008pV9-4V for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 11:43:10 +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 dfw.source.kernel.org (Postfix) with ESMTPS id F3B3D61956 for ; Wed, 20 Apr 2022 11:43:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E05D3C385AE for ; Wed, 20 Apr 2022 11:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650454986; bh=SJX0hL833Q2ataycRYrB6BhXBqWa4plfzhGevB+mLF0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H9AtkhIaDOQCpmpniEKXzeRK/B8Auf7tvM7/FFl+cRE9DfsWQIi9uULIdw8+HXmy7 GYIhiejgF8gVm2P2hHQuOgH8HwY00k53Xqatu/F7e7kTEHmXNV6ugkboizTiMBUN2y J454630Ka8MYTwxbkxJlwYPXOdamiCcFMdoLJZMG/40aErlrsZ4vsdVuG0fzNX9TDl tPTFQsnrE/UQexew+4hac7NGpYk3QOq3yGk8hC0VrAPwNPxfat3mROCGj2tFkK4EqM ktSPggD9gZNSlIpQEooDyaKZEMbf3XVCRhUvrn4K2m0SSSDy9UV+rZm16UO5OG3m7u EdvB6FAgo9K8w== Received: by mail-ej1-f46.google.com with SMTP id bv19so2939335ejb.6 for ; Wed, 20 Apr 2022 04:43:06 -0700 (PDT) X-Gm-Message-State: AOAM5324/zpyW4iT2kRisDnzTFb+MqWN4iGAQy3J1RvHqU4QqXD3HsH+ svRIHu1l3npgfDWOY1WHa7NdBmBGMJKnVgdvNbS4sw== X-Google-Smtp-Source: ABdhPJyANcMdvA+ktghYJ4f27ywVan8fgMqIgZ69qYBtSH3bIIwYJZEjs0aaoX0yznuqG16ZBoHNgWlTZ78/VQ4KW/g= X-Received: by 2002:a17:907:6089:b0:6db:a3d7:3fa9 with SMTP id ht9-20020a170907608900b006dba3d73fa9mr18759957ejc.593.1650454985018; Wed, 20 Apr 2022 04:43:05 -0700 (PDT) MIME-Version: 1.0 References: <20220414162220.1985095-1-xukuohai@huawei.com> <20220414162220.1985095-6-xukuohai@huawei.com> <6c18a27f-c983-58f3-1dc0-5192f7df232a@huawei.com> <82e7faec-7f0c-573f-4945-de7072744dcb@huawei.com> In-Reply-To: <82e7faec-7f0c-573f-4945-de7072744dcb@huawei.com> From: KP Singh Date: Wed, 20 Apr 2022 13:42:54 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next v2 5/6] bpf, arm64: bpf trampoline for arm64 To: Xu Kuohai Cc: Andrii Nakryiko , bpf , linux-arm-kernel , open list , Networking , "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 , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Borislav Petkov , Dave Hansen , X86 ML , hpa@zytor.com, Shuah Khan , Mark Rutland , Ard Biesheuvel , Pasha Tatashin , Peter Collingbourne , Daniel Kiss , Sudeep Holla , Steven Price , Marc Zyngier , Mark Brown , Kumar Kartikeya Dwivedi , Delyan Kratunov X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_044309_286776_6F064713 X-CRM114-Status: GOOD ( 21.95 ) 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 Wed, Apr 20, 2022 at 9:44 AM Xu Kuohai wrote: > > On 4/16/2022 9:57 AM, Xu Kuohai wrote: > > On 4/16/2022 1:12 AM, Andrii Nakryiko wrote: > >> On Thu, Apr 14, 2022 at 9:10 AM Xu Kuohai wrote: > >>> > >>> Add bpf trampoline support for arm64. Most of the logic is the same as > >>> x86. > >>> > >>> fentry before bpf trampoline hooked: > >>> mov x9, x30 > >>> nop > >>> > >>> fentry after bpf trampoline hooked: > >>> mov x9, x30 > >>> bl > >>> > >>> Tested on qemu, result: > >>> #55 fentry_fexit:OK > >>> #56 fentry_test: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 > >>> #101 modify_return:OK > >>> > >>> Signed-off-by: Xu Kuohai > >>> Acked-by: Song Liu > >>> --- > >> > >> Can you please also take a look at [0], which is an ongoing work to > >> add support for BPF cookie to BPF trampoline-based BPF programs. It's > >> very close to being done, so it would be good if you can implement > >> that at the same time. > > > > OK, I'll take a look and try to implemnt it. > > already implemented, but there are some conflicts between these two > series, will send v3 after trampoline cookie are merged. Awesome work, Thanks for doing this! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel