-
Notifications
You must be signed in to change notification settings - Fork 149
bpftool: Mount bpffs on provided dir instead of parent dir #6614
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
Conversation
Upstream branch: 4c2a26f |
afd5f24
to
bb08139
Compare
Upstream branch: af8d27b |
e8a89f3
to
8ebabf2
Compare
bb08139
to
d9a2513
Compare
Upstream branch: af8d27b |
8ebabf2
to
fafc322
Compare
d9a2513
to
12747d1
Compare
Upstream branch: 61df575 |
fafc322
to
c0588cb
Compare
12747d1
to
f0f6efd
Compare
Upstream branch: 476a5e9 |
c0588cb
to
505bf72
Compare
f0f6efd
to
a8f0c14
Compare
Upstream branch: a849750 |
505bf72
to
50cfc4b
Compare
a8f0c14
to
283e9c4
Compare
Upstream branch: 770546a |
50cfc4b
to
ee2f095
Compare
283e9c4
to
a4e5017
Compare
Upstream branch: 14bb1e8 |
ee2f095
to
67c336a
Compare
a4e5017
to
388b228
Compare
Upstream branch: e0754c1 |
67c336a
to
f70b495
Compare
388b228
to
367dff7
Compare
Upstream branch: 14bb1e8 |
f70b495
to
1bbb63f
Compare
367dff7
to
73732be
Compare
Upstream branch: 2a702c2 |
1bbb63f
to
e9b855c
Compare
73732be
to
8d01f9b
Compare
When pinning programs/objects under PATH (eg: during "bpftool prog loadall") the bpffs is mounted on the parent dir of PATH in the following situations: - the given dir exists but it is not bpffs. - the given dir doesn't exist and the parent dir is not bpffs. Mounting on the parent dir can also have the unintentional side- effect of hiding other files located under the parent dir. If the given dir exists but is not bpffs, then the bpffs should be mounted on the given dir and not its parent dir. Similarly, if the given dir doesn't exist and its parent dir is not bpffs, then the given dir should be created and the bpffs should be mounted on this new dir. Link: https://lore.kernel.org/bpf/2da44d24-74ae-a564-1764-afccf395eeec@isovalent.com/T/#t Closes: libbpf/bpftool#100 Fixes: 2a36c26 ("bpftool: Support bpffs mountpoint as pin path for prog loadall") Changes since v1: - Split "mount_bpffs_for_pin" into two functions. This is done to improve maintainability and readability. Changes since v2: - mount_bpffs_for_pin: rename to "create_and_mount_bpffs_dir". - mount_bpffs_given_file: rename to "mount_bpffs_given_file". - create_and_mount_bpffs_dir: - introduce "dir_exists" boolean. - remove new dir if "mnt_fs" fails. - improve error handling and error messages. Signed-off-by: Sahil Siddiq <icegambit91@gmail.com>
Upstream branch: 2a720cc |
e9b855c
to
0e1301f
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=837147 expired. Closing PR. |
Pull request for series with
subject: bpftool: Mount bpffs on provided dir instead of parent dir
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=837147