Skip to content

Conversation

mykyta5
Copy link
Contributor

@mykyta5 mykyta5 commented Sep 24, 2025

No description provided.

Problem:
bpf_cookie selftest fails if it runs after task_work selftest:
perf_event_open fails with errno=EINVAL.
EINVAL indicates incorrect/invalid input argument, which in case of
bpf_cookie can only point to sample_freq attribute.

Possible root cause:
When running task_work test, we can see that perf subsystem lowers
kernel.perf_event_max_sample_rate which probably is the side-effect of
the test that make bpf_cookie fail.

Solution:
Set perf_event_open sampling rate attribute for bpf_cookie the same as
task_work - this is the most reliable solution for this, changing
task_work sampling rate resulted in task_work test becoming flaky.

Signed-off-by: Mykyta Yatsenko <[email protected]>
task_work selftest does not properly handle cleanup during failures:
 * destroy bpf_link
 * perf event fd is passed to bpf_link, no need to close it if link was
 created successfully
 * goto cleanup if fork() failed, close pipe.

Signed-off-by: Mykyta Yatsenko <[email protected]>
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot force-pushed the bpf-next_base branch 17 times, most recently from c199778 to b0c73f0 Compare September 28, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant