Skip to content
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

[v2 bpf-next rebased] bpf: use canonical ftrace path #4672

Closed

Conversation

rzwisler
Copy link
Contributor

@rzwisler rzwisler commented Feb 24, 2023

Previous PR: #4648
Resbumitting this PR after rebasing to the current bpf-next_base.

v1: https://lore.kernel.org/bpf/Y+u1lL49CB86VSuE@google.com/T/

Changes since v1:

Rebased onto bpf-next
Added fallback paths so that both tracefs and debugfs will be tried in all selftests.
Ran and passed all bpf selftests locally using both tracefs and debugfs.

Kernel Patches Daemon and others added 3 commits February 23, 2023 08:44
The canonical location for the tracefs filesystem is at /sys/kernel/tracing.

But, from Documentation/trace/ftrace.rst:

  Before 4.1, all ftrace tracing control files were within the debugfs
  file system, which is typically located at /sys/kernel/debug/tracing.
  For backward compatibility, when mounting the debugfs file system,
  the tracefs file system will be automatically mounted at:

  /sys/kernel/debug/tracing

Many comments and samples in the bpf code still refer to this older
debugfs path, so let's update them to avoid confusion.  There are a few
spots where the bpf code explicitly checks both tracefs and debugfs
(tools/bpf/bpftool/tracelog.c and tools/lib/api/fs/fs.c) and I've left
those alone so that the tools can continue to work with both paths.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
The canonical location for the tracefs filesystem is at /sys/kernel/tracing.

But, from Documentation/trace/ftrace.rst:

  Before 4.1, all ftrace tracing control files were within the debugfs
  file system, which is typically located at /sys/kernel/debug/tracing.
  For backward compatibility, when mounting the debugfs file system,
  the tracefs file system will be automatically mounted at:

  /sys/kernel/debug/tracing

Many tests in the bpf selftest code still refer to this older debugfs
path, so let's update them to avoid confusion.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
@kernel-patches-bot kernel-patches-bot force-pushed the bpf-next_base branch 8 times, most recently from c3b7bfa to 79367ef Compare February 28, 2023 13:56
@rzwisler
Copy link
Contributor Author

Hello! I just noticed that it doesn't look like the CI jobs for this pull request have been kicked off. Do you need anything else from my side?

Also, was there a better way to re-submit this PR to the CI infra (previously at #4648) or was creating a new PR that was rebased the correct thing? I'm really curious if the failures were from some other CL or were just flake - I can't repo them locally, and don't immediately see how they could be due to my changes.

Thanks!

@kernel-patches-bot kernel-patches-bot force-pushed the bpf-next_base branch 8 times, most recently from 6a992f8 to 55d99d5 Compare March 2, 2023 05:45
@kernel-patches-bot
Copy link

Automatically cleaning up stale PR; feel free to reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants