[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW57u98jjvaFSZ=Suhrq9Zz-khbr4CF26Px4JY3FciiZ5g@mail.gmail.com>
Date: Wed, 29 Jul 2020 14:36:23 -0700
From: Song Liu <song@...nel.org>
To: John Fastabend <john.fastabend@...il.com>
Cc: Martin KaFai Lau <kafai@...com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [bpf PATCH v2 4/5] bpf, selftests: Add tests for sock_ops load
with r9, r8.r7 registers
On Wed, Jul 29, 2020 at 9:24 AM John Fastabend <john.fastabend@...il.com> wrote:
>
> Loads in sock_ops case when using high registers requires extra logic to
> ensure the correct temporary value is used. We need to ensure the temp
> register does not use either the src_reg or dst_reg. Lets add an asm
> test to force the logic is triggered.
>
> The xlated code is here,
>
> 30: (7b) *(u64 *)(r9 +32) = r7
> 31: (61) r7 = *(u32 *)(r9 +28)
> 32: (15) if r7 == 0x0 goto pc+2
> 33: (79) r7 = *(u64 *)(r9 +0)
> 34: (63) *(u32 *)(r7 +916) = r8
> 35: (79) r7 = *(u64 *)(r9 +32)
>
> Notice r9 and r8 are not used for temp registers and r7 is chosen.
>
> Signed-off-by: John Fastabend <john.fastabend@...il.com>
Acked-by: Song Liu <songliubraving@...com>
[...]
Powered by blists - more mailing lists