Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: selftests/bpf: fix flaky bpf_cookie selftest
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1005633

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-rc
Copy link
Author

Upstream branch: d4680a1
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1005633
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1005633 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants