mbox series

[v3,bpf-next,0/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390

Message ID 20190709151809.37539-1-iii@linux.ibm.com
Headers show
Series selftests/bpf: fix compiling loop{1,2,3}.c on s390 | expand

Message

Ilya Leoshkevich July 9, 2019, 3:18 p.m. UTC
Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390.

This patch series consists of three preparatory commits, which make it
possible to use PT_REGS_RC in BPF selftests, followed by the actual fix.

Since the last time, I've tested it with x86_64-linux-gnu-,
aarch64-linux-gnu-, arm-linux-gnueabihf-, mips64el-linux-gnuabi64-,
powerpc64le-linux-gnu-, s390x-linux-gnu- and sparc64-linux-gnu-
compilers, and found that I also need to add arm64 support.

Like s390, arm64 exports user_pt_regs instead of struct pt_regs to
userspace.

I've also made fixes for a few unrelated build problems, which I will
post separately.

v1->v2: Split into multiple patches.
v2->v3: Added arm64 support.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>

Comments

Stanislav Fomichev July 9, 2019, 4:07 p.m. UTC | #1
On 07/09, Ilya Leoshkevich wrote:
> Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390.
> 
> This patch series consists of three preparatory commits, which make it
> possible to use PT_REGS_RC in BPF selftests, followed by the actual fix.
> 
> Since the last time, I've tested it with x86_64-linux-gnu-,
> aarch64-linux-gnu-, arm-linux-gnueabihf-, mips64el-linux-gnuabi64-,
> powerpc64le-linux-gnu-, s390x-linux-gnu- and sparc64-linux-gnu-
> compilers, and found that I also need to add arm64 support.
> 
> Like s390, arm64 exports user_pt_regs instead of struct pt_regs to
> userspace.
> 
> I've also made fixes for a few unrelated build problems, which I will
> post separately.
> 
> v1->v2: Split into multiple patches.
> v2->v3: Added arm64 support.
For the whole series:

Reviewed-by: Stanislav Fomichev <sdf@google.com>

This should probably go to bpf, not bpf-next since it fixes the
existing compilation problem.

> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> 
>
Andrii Nakryiko July 9, 2019, 5:50 p.m. UTC | #2
On Tue, Jul 9, 2019 at 8:18 AM Ilya Leoshkevich <iii@linux.ibm.com> wrote:
>
> Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390.
>
> This patch series consists of three preparatory commits, which make it
> possible to use PT_REGS_RC in BPF selftests, followed by the actual fix.
>
> Since the last time, I've tested it with x86_64-linux-gnu-,
> aarch64-linux-gnu-, arm-linux-gnueabihf-, mips64el-linux-gnuabi64-,
> powerpc64le-linux-gnu-, s390x-linux-gnu- and sparc64-linux-gnu-
> compilers, and found that I also need to add arm64 support.
>
> Like s390, arm64 exports user_pt_regs instead of struct pt_regs to
> userspace.
>
> I've also made fixes for a few unrelated build problems, which I will
> post separately.
>
> v1->v2: Split into multiple patches.
> v2->v3: Added arm64 support.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
>
>

Acked-by: Andrii Nakryiko <andriin@fb.com>