summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/relo_core.h
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2022-06-07 09:26:05 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-06-07 20:20:42 +0300
commit776281652ddcd98bb292335ea3634da341c849b4 (patch)
tree89da9e183429634e21c4c2af64acc683d6c9172d /tools/lib/bpf/relo_core.h
parent6089fb325cf737eeb2c4d236c94697112ca860da (diff)
downloadlinux-776281652ddcd98bb292335ea3634da341c849b4.tar.xz
libbpf: Permit 64bit relocation value
Currently, the libbpf limits the relocation value to be 32bit since all current relocations have such a limit. But with BTF_KIND_ENUM64 support, the enum value could be 64bit. So let us permit 64bit relocation value in libbpf. Acked-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20220607062605.3716779-1-yhs@fb.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/relo_core.h')
-rw-r--r--tools/lib/bpf/relo_core.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bpf/relo_core.h b/tools/lib/bpf/relo_core.h
index 073039d8ca4f..7df0da082f2c 100644
--- a/tools/lib/bpf/relo_core.h
+++ b/tools/lib/bpf/relo_core.h
@@ -46,9 +46,9 @@ struct bpf_core_spec {
struct bpf_core_relo_res {
/* expected value in the instruction, unless validate == false */
- __u32 orig_val;
+ __u64 orig_val;
/* new value that needs to be patched up to */
- __u32 new_val;
+ __u64 new_val;
/* relocation unsuccessful, poison instruction, but don't fail load */
bool poison;
/* some relocations can't be validated against orig_val */