-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bpftool sync 2024-10-14 #168
Merged
qmonnet
merged 6 commits into
libbpf:main
from
qmonnet:bpftool-sync-2024-10-14T08-49-25.865Z
Oct 14, 2024
Merged
Bpftool sync 2024-10-14 #168
qmonnet
merged 6 commits into
libbpf:main
from
qmonnet:bpftool-sync-2024-10-14T08-49-25.865Z
Oct 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generate __attribute__((bpf_fastcall)) for kfuncs marked with "bpf_fastcall" decl tag. E.g. for the following BTF: $ bpftool btf dump file vmlinux ... [A] FUNC 'bpf_rdonly_cast' type_id=... ... [B] DECL_TAG 'bpf_kfunc' type_id=A component_idx=-1 [C] DECL_TAG 'bpf_fastcall' type_id=A component_idx=-1 Generate the following vmlinux.h: #ifndef __VMLINUX_H__ #define __VMLINUX_H__ ... #ifndef __bpf_fastcall #if __has_attribute(bpf_fastcall) #define __bpf_fastcall __attribute__((bpf_fastcall)) #else #define __bpf_fastcall #endif #endif ... __bpf_fastcall extern void *bpf_rdonly_cast(...) ...; The "bpf_fastcall" / "bpf_kfunc" tags pair would generated by pahole when constructing vmlinux BTF. While at it, sort printed kfuncs by name for better vmlinux.h stability. Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240916091712.2929279-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
The `index` argument to bpf_loop() is threaded as an u64. This lead in a subtle verifier denial where clang cloned the argument in another register[1]. [1] systemd/systemd#34650 (comment) Signed-off-by: Matteo Croce <teknoraver@meta.com> Link: https://lore.kernel.org/r/20241010035652.17830-1-technoboy85@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
The documentation says CONFIG_FUNCTION_ERROR_INJECTION is supported only on x86. This was presumably true at the time of writing, but it's now supported on many other architectures too. Drop this statement, since it's not correct anymore and it fits better in other documentation anyway. Signed-off-by: Martin Kelly <martin.kelly@crowdstrike.com> Link: https://lore.kernel.org/r/20241010193301.995909-1-martin.kelly@crowdstrike.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Pull latest libbpf from mirror. Libbpf version: 1.5.0 Libbpf commit: fc064eb41e9de925beaeaf5b656ecf0f5ff83c08 Signed-off-by: Quentin Monnet <qmo@kernel.org>
Since [1] kernel supports __bpf_fastcall attribute for helper function bpf_get_smp_processor_id(). Update uapi definition for this helper in order to have this attribute in the generated bpf_helper_defs.h [1] commit 91b7fbf3936f ("bpf, x86, riscv, arm: no_caller_saved_registers for bpf_get_smp_processor_id()") Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240916091712.2929279-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Syncing latest bpftool commits from kernel repository. Baseline bpf-next commit: b24d7f0da6ef5a23456a301eaf51b170f961d4ae Checkpoint bpf-next commit: 989a29cfed9b5092c3e18be14e9032c51bb1c9f6 Baseline bpf commit: b24d7f0da6ef5a23456a301eaf51b170f961d4ae Checkpoint bpf commit: b836cbdf3b81a4a22b3452186efa2e5105a77e10 Eduard Zingerman (2): bpf: __bpf_fastcall for bpf_get_smp_processor_id in uapi bpftool: __bpf_fastcall for kfuncs marked with special decl_tag Martin Kelly (1): bpf: Update bpf_override_return() comment Matteo Croce (1): bpf: fix argument type in bpf_loop documentation include/uapi/linux/bpf.h | 8 ++-- src/btf.c | 98 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 91 insertions(+), 15 deletions(-) Signed-off-by: Quentin Monnet <qmo@kernel.org>
qmonnet
changed the title
Bpftool sync 2024 10 14 t08 49 25.865 z
Bpftool sync 2024-10-14
Oct 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull latest libbpf from mirror and sync bpftool repo with kernel, up to the commits used for libbpf sync. This is an automatic update performed by calling the sync script from this repo:
Although there's only one patch affecting bpftool directly, we're also interesting in pulling the changes from libbpf, with support for cross-compiling with BPF skeletons.
Fixes: #81