OSDN Git Service

bpf, x86: Fix extable offset calculation
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Tue, 22 Jun 2021 11:00:26 +0000 (16:30 +0530)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 28 Jun 2021 13:11:43 +0000 (15:11 +0200)
commit328aac5ecd119ede3633f7d17969b1ff34ccc784
treeb927e9dcc360dc260d50e1b5797a55563ee18070
parenta196fa78a26571359740f701cf30d774eb8a72cb
bpf, x86: Fix extable offset calculation

Commit 4c5de127598e1 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX
instructions.") is emitting a couple of instructions before the actual load.
Consider those additional instructions while calculating extable offset.

Fixes: 4c5de127598e1 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.")
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210622110026.1157847-1-ravi.bangoria@linux.ibm.com
arch/x86/net/bpf_jit_comp.c