tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 18 Dec 2018 10:13:19 +0000 (10:13 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 18 Dec 2018 13:47:17 +0000 (14:47 +0100)
commit33221307c3f993500a9cfc6900811058c6bfc152
treed70e6aabc236cea038bcfdba2be647dde7298764
parentbe3245e22d227ad68ab97785d506561374daa028
tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs

In order to make life easier for users, bpftool automatically attempts
to mount the BPF virtual file system, if it is not mounted already,
before trying to pin objects in it. Similarly, it attempts to mount
tracefs if necessary before trying to dump the trace pipe to the
console.

While mounting file systems on-the-fly can improve user experience, some
administrators might prefer to avoid that. Let's add an option to block
these mount attempts. Note that it does not prevent automatic mounting
of tracefs by debugfs for the "bpftool prog tracelog" command.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Documentation/bpftool-map.rst
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/Documentation/bpftool.rst
tools/bpf/bpftool/common.c
tools/bpf/bpftool/main.c
tools/bpf/bpftool/main.h
tools/bpf/bpftool/tracelog.c