selftests/bpf: Use both hrtimer enqueue helpers in vmlinux test#12030
Closed
kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf_basefrom
Closed
selftests/bpf: Use both hrtimer enqueue helpers in vmlinux test#12030kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf_basefrom
kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf_basefrom
Conversation
Author
|
Upstream branch: 0c7ae13 |
ee9631b to
010a7e6
Compare
Author
|
Upstream branch: f3b8c28 |
271e200 to
6c05107
Compare
010a7e6 to
c40937c
Compare
Author
|
Upstream branch: 18fc650 |
The vmlinux selftest triggers nanosleep and checks that both kprobe and fentry programs observe the hrtimer enqueue path. After the hrtimer_start_expires_user() conversion [1], nanosleep reaches hrtimer_start_range_ns_user() instead of hrtimer_start_range_ns(). Hard-coding either symbol makes the test fail either on bpf tree or on linux-next [2]. Keep both hook variants as optional BPF programs and enable the pair matching the running kernel before loading the object. This is also a nice example of how to modify a BPF program to work on both older and newer kernel revision. [1] https://lore.kernel.org/all/20260408114952.062400833@kernel.org/ [2] https://github.com/kernel-patches/bpf/actions/runs/25485909958/job/74782902203 Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
6c05107 to
0146cac
Compare
This file contains hidden or 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
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 request for series with
subject: selftests/bpf: Use both hrtimer enqueue helpers in vmlinux test
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1091008