remarkable-linux/tools
Quentin Monnet 3fc27b71b8 tools: bpftool: try to mount bpffs if required for pinning objects
One possible cause of failure for `bpftool {prog|map} pin * file FILE`
is the FILE not being in an eBPF virtual file system (bpffs). In this
case, make bpftool attempt to mount bpffs on the parent directory of the
FILE. Then, if this operation is successful, try again to pin the
object.

The code for mnt_bpffs() is a copy of function bpf_mnt_fs() from
iproute2 package (under lib/bpf.c, taken at commit 4b73d52f8a81), with
modifications regarding handling of error messages.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-26 17:52:59 +09:00
..
accounting tools: move accounting tool from Documentation 2016-09-23 13:07:15 -06:00
arch tools include: Sync kernel ABI headers with tooling headers 2017-09-25 10:39:44 -03:00
bpf tools: bpftool: try to mount bpffs if required for pinning objects 2017-10-26 17:52:59 +09:00
build tools build tests: Don't hardcode gcc name 2017-08-28 16:44:44 -03:00
cgroup
firewire
gpio gpio-hammer: fix make consumer_label suitable to work on gpio-nails 2017-01-26 16:29:09 +01:00
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
iio iio: tools: add install section 2017-08-09 14:31:58 +01:00
include selftests/bpf: fix broken build of test_maps 2017-10-23 01:06:31 +01:00
kvm/kvm_stat tools/kvm_stat: add '-f help' to get the available event list 2017-07-26 19:04:53 +02:00
laptop tools: move laptops dslm tool from Documentation 2016-09-23 13:07:21 -06:00
leds tools/leds: Add led_hw_brightness_mon program 2017-02-14 22:20:23 +01:00
lib libbpf: use map_flags when creating maps 2017-10-05 21:42:28 -07:00
nfsd
objtool objtool: Support unoptimized frame pointer setup 2017-09-28 07:25:54 +02:00
pci tools: PCI: Add a missing option help line 2017-08-29 16:03:34 -05:00
pcmcia tools: move pcmcia crc32hash tool from Documentation 2016-09-23 13:07:27 -06:00
perf perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU 2017-10-09 15:48:46 -03:00
power Revert "tools/power turbostat: stop migrating, unless '-m'" 2017-10-18 03:17:45 +02:00
scripts Kbuild updates for v4.14 2017-09-14 13:46:33 -07:00
spi spi: tools: add install section 2017-07-26 12:25:28 +01:00
testing selftests/bpf: fix broken build of test_maps 2017-10-23 01:06:31 +01:00
thermal/tmon
time
usb usbip: auto retry for concurrent attach 2017-08-31 18:08:45 +02:00
virtio tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" 2017-05-09 16:43:24 +03:00
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile tools: rename tools/net directory to tools/bpf 2017-10-04 21:45:05 -07:00