[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2194026a-c958-039e-7b26-b84cfa30a3d0@huawei.com>
Date: Wed, 6 Jul 2022 09:43:32 +0800
From: Xu Kuohai <xukuohai@...wei.com>
To: Will Deacon <will@...nel.org>
CC: <bpf@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Zi Shen Lim <zlim.lnx@...il.com>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>,
Russell King <rmk+kernel@...linux.org.uk>,
James Morse <james.morse@....com>,
Hou Tao <houtao1@...wei.com>,
Jason Wang <wangborong@...rlc.com>
Subject: Re: [PATCH bpf-next v6 2/4] arm64: Add LDR (literal) instruction
On 7/6/2022 12:39 AM, Will Deacon wrote:
> On Sat, Jun 25, 2022 at 12:12:53PM -0400, Xu Kuohai wrote:
>> Add LDR (literal) instruction to load data from address relative to PC.
>> This instruction will be used to implement long jump from bpf prog to
>> bpf rampoline in the follow-up patch.
>
> typo: trampoline
>
will fix
>>
>> The instruction encoding:
>>
>> 3 2 2 2 0 0
>> 0 7 6 4 5 0
>> +-----+-------+---+-----+-------------------------------------+--------+
>> | 0 x | 0 1 1 | 0 | 0 0 | imm19 | Rt |
>> +-----+-------+---+-----+-------------------------------------+--------+
>>
>> for 32-bit, variant x == 0; for 64-bit, x == 1.
>>
>> branch_imm_common() is used to check the distance between pc and target
>> address, since it's reused by this patch and LDR (literal) is not a branch
>> instruction, rename it to aarch64_imm_common().
>
> nit, but I think "label_imm_common()" would be a better name.
>
will rename
> Anyway, I checked the encodings and the code looks good, so:
>
> Acked-by: Will Deacon <will@...nel.org>
>
> Will
> .
Powered by blists - more mailing lists