From: Pu Lehui <pulehui@huawei.com> Date: 2021-12-23 04:56:14
When cross compiling arm64 bpf selftests in x86_64 host, the following
error occur:
progs/loop2.c:20:7: error: incomplete definition of type 'struct
user_pt_regs'
Some archs, like arm64 and riscv, use userspace pt_regs in bpf_tracing.h.
When arm64 bpf selftests cross compiling in x86_64 host, clang cannot
find the arch specific uapi ptrace.h. We can add arch specific header
file directory to fix this issue.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
v1->v2:
- use vmlinux.h directly might lead to verifier fail.
- use source arch header file directory suggested by Andrii Nakryiko.
tools/testing/selftests/bpf/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
On Wed, Dec 22, 2021 at 8:56 PM Pu Lehui [off-list ref] wrote:
quoted hunk
When cross compiling arm64 bpf selftests in x86_64 host, the following
error occur:
progs/loop2.c:20:7: error: incomplete definition of type 'struct
user_pt_regs'
Some archs, like arm64 and riscv, use userspace pt_regs in bpf_tracing.h.
When arm64 bpf selftests cross compiling in x86_64 host, clang cannot
find the arch specific uapi ptrace.h. We can add arch specific header
file directory to fix this issue.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
v1->v2:
- use vmlinux.h directly might lead to verifier fail.
- use source arch header file directory suggested by Andrii Nakryiko.
tools/testing/selftests/bpf/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Pu Lehui <pulehui@huawei.com> Date: 2021-12-24 02:58:01
On 2021/12/24 2:21, Andrii Nakryiko wrote:
On Wed, Dec 22, 2021 at 8:56 PM Pu Lehui [off-list ref] wrote:
quoted
When cross compiling arm64 bpf selftests in x86_64 host, the following
error occur:
progs/loop2.c:20:7: error: incomplete definition of type 'struct
user_pt_regs'
Some archs, like arm64 and riscv, use userspace pt_regs in bpf_tracing.h.
When arm64 bpf selftests cross compiling in x86_64 host, clang cannot
find the arch specific uapi ptrace.h. We can add arch specific header
file directory to fix this issue.
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
v1->v2:
- use vmlinux.h directly might lead to verifier fail.
- use source arch header file directory suggested by Andrii Nakryiko.
tools/testing/selftests/bpf/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)