bpf, arm64: Call build_prologue() first in first JIT pass
authorHou Tao <houtao1@huawei.com>
Sat, 26 Feb 2022 12:19:05 +0000 (20:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:18 +0000 (14:40 +0200)
commit694398af5fea0f99b721aa9877d5f52b3f7f2790
treecd40539a7cdffa2f7d11ca4def9ab349342f4e66
parent06a0001366ac0d31f3d5ae61b611173d26f22be8
bpf, arm64: Call build_prologue() first in first JIT pass

[ Upstream commit 68e4f238b0e9d3670a1612ad900a6e98b2b3f7dd ]

BPF line info needs ctx->offset to be the instruction offset in the whole JITed
image instead of the body itself, so also call build_prologue() first in first
JIT pass.

Fixes: 37ab566c178d ("bpf: arm64: Enable arm64 jit to provide bpf_line_info")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220226121906.5709-2-houtao1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/net/bpf_jit_comp.c