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 D0D4AC433EF for ; Wed, 20 Apr 2022 07:45:58 +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:References:CC:To:From: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WuwP4Ml4TyS2La+8FHrYk8+f7vk8+GZD6RfC0aBUhbo=; b=GfbwcSvxYc8CIM BxFGn7PZbM84WPAeOEDWQh1etRMEAqMg2E9Def1YhsBkOYpfAoa19o/XEUkXhYWw06DYuACaa46vv WhAbTTlx8cKPHahtCTDCNp8E5WvYQW8klkA3Nd0VUGmYJioJepQEu+CRr9LjNYPmoai6T9TRtR9Ks aFvb4T8dbk4SEofpqW2QCrvssQS+Oj54+pg+T4a/E2/EykvDsMfgyHxkwdpX1J3fQzCqWZqUbjTu1 aeXHolYs/5wuvVbEO6boXXH4Y4idd6wOPavIpbKhKqfY2ztJdDDu2n9whPdVbzOe52HjwG65EpyUo XRU2EZd38cYvNrQpmkEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh515-007rEm-GE; Wed, 20 Apr 2022 07:44:47 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh50w-007qoA-RE for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 07:44:40 +0000 Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kjt2x1R9KzhXY4; Wed, 20 Apr 2022 15:43:53 +0800 (CST) Received: from [10.67.111.192] (10.67.111.192) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 20 Apr 2022 15:43:59 +0800 Message-ID: <82e7faec-7f0c-573f-4945-de7072744dcb@huawei.com> Date: Wed, 20 Apr 2022 15:43:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH bpf-next v2 5/6] bpf, arm64: bpf trampoline for arm64 Content-Language: en-US From: Xu Kuohai To: Andrii Nakryiko CC: 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 , KP Singh , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern , Thomas Gleixner , Borislav Petkov , Dave Hansen , X86 ML , , 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 References: <20220414162220.1985095-1-xukuohai@huawei.com> <20220414162220.1985095-6-xukuohai@huawei.com> <6c18a27f-c983-58f3-1dc0-5192f7df232a@huawei.com> In-Reply-To: <6c18a27f-c983-58f3-1dc0-5192f7df232a@huawei.com> X-Originating-IP: [10.67.111.192] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_004439_087979_8E2DD037 X-CRM114-Status: GOOD ( 10.77 ) 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 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel