aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv4/tcp_fastopen.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-08-19 12:45:18 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-08-19 14:19:39 -0700
commiteacaaed784e2c9da69dea3030c81062c1fd66a37 (patch)
treeb720446ede6b0e701fc5543c3aca6e69c7c6d6a9 /net/ipv4/tcp_fastopen.c
parentselftests/bpf: Add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET (diff)
downloadwireguard-linux-eacaaed784e2c9da69dea3030c81062c1fd66a37.tar.xz
wireguard-linux-eacaaed784e2c9da69dea3030c81062c1fd66a37.zip
libbpf: Implement enum value-based CO-RE relocations
Implement two relocations of a new enumerator value-based CO-RE relocation kind: ENUMVAL_EXISTS and ENUMVAL_VALUE. First, ENUMVAL_EXISTS, allows to detect the presence of a named enumerator value in the target (kernel) BTF. This is useful to do BPF helper/map/program type support detection from BPF program side. bpf_core_enum_value_exists() macro helper is provided to simplify built-in usage. Second, ENUMVAL_VALUE, allows to capture enumerator integer value and relocate it according to the target BTF, if it changes. This is useful to have a guarantee against intentional or accidental re-ordering/re-numbering of some of the internal (non-UAPI) enumerations, where kernel developers don't care about UAPI backwards compatiblity concerns. bpf_core_enum_value() allows to capture this succinctly and use correct enum values in code. LLVM uses ldimm64 instruction to capture enumerator value-based relocations, so add support for ldimm64 instruction patching as well. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200819194519.3375898-5-andriin@fb.com
Diffstat (limited to 'net/ipv4/tcp_fastopen.c')
0 files changed, 0 insertions, 0 deletions