2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann
> On 4/15/21 11:32 AM, Jianlin Lv wrote:
>> For debugging JITs, dumping the JITed image to kernel log is discouraged,
>> "bpftool prog dump jited" is much better way to examine JITed dumps.
>> This patch get rid of the code related to bpf_jit_enable=2 mo
- "$cur" ) )
+COMPREPLY=( $( compgen -W 'object skeleton help' --
"$cur" ) )
;;
esac
;;
--
Looks good otherwise. Thanks for the documentation, it's great to
have the example in the man page.
Pending the two nits above are fixed:
Reviewed-by: Quentin Monnet
Quentin
On Sat, 13 Mar 2021 at 18:37, Andrii Nakryiko wrote:
>
> On Fri, Mar 12, 2021 at 10:07 AM Quentin Monnet wrote:
> >
> > 2021-03-11 10:45 UTC-0800 ~ Andrii Nakryiko
> > > On Thu, Mar 11, 2021 at 3:31 AM Quentin Monnet
> > > wrote:
> > >>
&g
2021-03-11 10:45 UTC-0800 ~ Andrii Nakryiko
> On Thu, Mar 11, 2021 at 3:31 AM Quentin Monnet wrote:
>>
>> 2021-03-09 20:04 UTC-0800 ~ Andrii Nakryiko
>>> Add `bpftool gen bpfo ...` command to statically
>>> link multiple BPF object files into a single output B
2021-03-09 20:04 UTC-0800 ~ Andrii Nakryiko
> Add `bpftool gen bpfo ...` command to statically
> link multiple BPF object files into a single output BPF object file.
>
> Similarly to existing '*.o' convention, bpftool is establishing a '*.bpfo'
> convention for statically-linked BPF object files
2021-02-24 10:59 UTC-0800 ~ Andrii Nakryiko
> On Wed, Feb 24, 2021 at 7:55 AM Daniel Borkmann wrote:
>>
>> On 2/23/21 3:43 PM, Jesper Dangaard Brouer wrote:
>>> On Tue, 23 Feb 2021 20:45:54 +0800
>>> Hangbin Liu wrote:
>>>
Commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking") lost a
ALWAYS_ON", },
> + /* Kernel BTF debug information available */
> + { "CONFIG_DEBUG_INFO_BTF", },
>
> /* cgroups */
> { "CONFIG_CGROUPS", },
>
Thanks for the change!
Reviewed-by: Quentin Monnet
(Note: the dat
y that Makefile.
David Gow previously posted a slightly different version of this patch
as a RFC [0], two months ago or so.
[0]
https://lore.kernel.org/bpf/20201119085022.3606135-1-david...@google.com/t/#u
v2: Use $(LIBBPF_OUT) instead of $(abspath .), and improve commit log
Cc: Andrii Nakryiko
Cc:
2021-01-26 11:24 UTC+ ~ Quentin Monnet
> 2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko
>> On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote:
>>>
>>> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative
>>> path for the output director
2021-01-25 16:32 UTC-0800 ~ Andrii Nakryiko
> On Mon, Jan 25, 2021 at 7:49 AM Quentin Monnet wrote:
>>
>> Building the kernel with CONFIG_BPF_PRELOAD, and by providing a relative
>> path for the output directory, may fail with the following error:
>>
>
19085022.3606135-1-david...@google.com/t/#u
Cc: Andrii Nakryiko
Cc: Brendan Higgins
Cc: David Gow
Reported-by: David Gow
Signed-off-by: Quentin Monnet
---
kernel/bpf/preload/Makefile | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/preload/Makefile b/kernel/b
2020-11-21 17:48 UTC+0800 ~ David Gow
> On Sat, Nov 21, 2020 at 3:38 PM Andrii Nakryiko
> wrote:
>>
>> On Thu, Nov 19, 2020 at 12:51 AM David Gow wrote:
>>>
>>> If BPF_PRELOAD is enabled, and an out-of-tree build is requested with
>>> make O=, compilation seems to fail with:
>>>
>>> tools/script
On 09/11/2020 07:04, Wang Hai wrote:
> progfd is created by prog_parse_fd(), before 'bpftool net attach' exit,
> it should be closed.
>
> Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on
> interface")
> Signed-off-by: Wang Hai
arget in the top-level makefile, which would otherwise pull in several
> other includes from outside the tools tree.
>
> Signed-off-by: Tony Ambardar
Acked-by: Quentin Monnet
On 14/09/2020 17:54, Yonghong Song wrote:
>
>
> On 9/14/20 9:46 AM, Yonghong Song wrote:
>>
>>
>> On 9/14/20 1:16 AM, Quentin Monnet wrote:
>>> On 14/09/2020 07:12, Yonghong Song wrote:
>>>> When building bpf selftests like
>>>>
using:
> -bash-4.4$ rst2man --version
> rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2)
> -bash-4.4$
>
> Looks like that particular version of rst2man prefers to have a blank line
> after literal blocks. This patch added block lines in related .rst files
> and
all other pages are
available in the same directory.
v3:
- Fix conflict with a previous patchset that introduced RST2MAN_OPTS
variable passed to rst2man.
v2:
- Use "echo -n" instead of "printf" in Makefile, to avoid any risk of
passing a format string directly to the command
On Thu, 10 Sep 2020 at 19:18, Alexei Starovoitov
wrote:
>
> On Wed, Sep 9, 2020 at 9:25 AM Quentin Monnet wrote:
> >
> > The "SEE ALSO" sections of bpftool's manual pages refer to bpf(2),
> > bpf-helpers(7), then all existing bpftool man pages (save the
On 10/09/2020 17:42, Andrii Nakryiko wrote:
> On Thu, Sep 10, 2020 at 3:27 AM Quentin Monnet wrote:
>>
>> When dumping outer maps or prog_array maps, and on lookup failure,
>> bpftool simply skips the entry with no error message. This is because
>> the kernel return
. No functional change.
v2:
- v1 was erroneously removing the check on fd maps in an attempt to get
support for outer map dumps. This is already working. Instead, v2
focuses on cleaning up the dump_map_elem() function, to avoid
similar confusion in the future.
Signed-off-by: Quentin Monnet
occurs, errno is set to ENOENT. It seems unlikely we
could receive other error codes at this stage (we successfully retrieved
map info just before), but to be on the safe side, let's skip the entry
only if errno was ENOENT, and not for the other errors.
v3: New patch
Signed-off-by: Quentin M
check on errno being ENOENT before skipping outer map entry in
dumps.
v2:
- v1 was wrongly expected to allow bpftool to dump the content of outer
maps (already supported). v2 skipped that patch, and instead replaced it
with a clean-up for the dump_map_elem() function.
Quentin Monnet (3
ame my_inner_map [TAB]
Fixing that specific case seems too convoluted. Completion will work as
expected, however, if the outer map name comes first and the "inner_map
name ..." is passed second.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
---
.../bpf/bpftool/Documentat
On 09/09/2020 17:46, Andrii Nakryiko wrote:
> On Wed, Sep 9, 2020 at 9:38 AM Quentin Monnet wrote:
>>
>> On 09/09/2020 17:30, Andrii Nakryiko wrote:
>>> On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote:
>>>>
>>>> On 09/09/2020 04:25, Andrii Nakr
On 09/09/2020 17:45, Andrii Nakryiko wrote:
> On Wed, Sep 9, 2020 at 9:22 AM Quentin Monnet wrote:
>>
>> eBPF selftests include a script to check that bpftool builds correctly
>> with different command lines. Let's add one build for bpftool's
>> documentat
k of
passing and evaluating formatting strings.
Quentin Monnet (3):
tools: bpftool: print optional built-in features along with version
tools: bpftool: include common options from separate file
tools: bpftool: automate generation for "SEE ALSO" sections in man
pages
d on the version
number, and are therefore not reported either. Note that they are
already available, albeit without JSON, via bpftool's help messages.
v3:
- Use a simple list instead of boolean values for plain output.
v2:
- Fix JSON (object instead or array for the features).
Signed
On 09/09/2020 17:30, Andrii Nakryiko wrote:
> On Wed, Sep 9, 2020 at 1:19 AM Quentin Monnet wrote:
>>
>> On 09/09/2020 04:25, Andrii Nakryiko wrote:
>>> On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote:
>>>>
>>>> The function used to d
all other pages are
available in the same directory.
v2:
- Use "echo -n" instead of "printf" in Makefile, to avoid any risk of
passing a format string directly to the command.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
---
tools/bpf/bpftool/Documentation/Ma
options are not "common" and should not be copied when creating
new manual pages.
Let's move the description for those common options to a separate file,
which is included with a RST directive when generating the man pages.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
tests.
Quentin Monnet (2):
tools: bpftool: log info-level messages when building bpftool man
pages
selftests, bpftool: add bpftool (and eBPF helpers) documentation build
tools/bpf/bpftool/Documentation/Makefile | 3 ++-
.../bpf/bpftool/Documentation/bpftool-btf.rst | 3 +++
.../bpf/bp
ils").
v2:
- Use "--exit-status=1" option for rst2man instead of counting lines
from stderr.
- Also build bpftool as part as the selftests build (and not only when
the tests are actually run).
Signed-off-by: Quentin Monnet
---
tools/testing/selftests/bpf/Makefil
Let's add the
necessary blank lines.
v2:
- Use "--verbose" instead of "-r 1" (same behaviour but more readable).
- Pass it through a RST2MAN_OPTS variable so we can easily pass other
options too.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
---
tools/bpf/
On 09/09/2020 00:20, Andrii Nakryiko wrote:
> On Mon, Sep 7, 2020 at 7:50 AM Quentin Monnet wrote:
>>
>> On 04/09/2020 22:45, Andrii Nakryiko wrote:
>>> On Fri, Sep 4, 2020 at 1:57 PM Quentin Monnet wrote:
>>>>
>>>> Bpftool has a number of feature
On 09/09/2020 04:25, Andrii Nakryiko wrote:
> On Mon, Sep 7, 2020 at 9:36 AM Quentin Monnet wrote:
>>
>> The function used to dump a map entry in bpftool is a bit difficult to
>> follow, as a consequence to earlier refactorings. There is a variable
>> ("num_ele
On 09/09/2020 04:48, Andrii Nakryiko wrote:
> On Mon, Sep 7, 2020 at 9:40 AM Quentin Monnet wrote:
>>
>> This set aims at improving the checks for building bpftool's documentation
>> (including the man page for eBPF helper functions). The first patch lowers
>> th
options are not "common" and should not be copied when creating
new manual pages.
Let's move the description for those common options to a separate file,
which is included with a RST directive when generating the man pages.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
. No functional change.
v2:
- v1 was erroneously removing the check on fd maps in an attempt to get
support for outer map dumps. This is already working. Instead, v2
focuses on cleaning up the dump_map_elem() function, to avoid
similar confusion in the future.
Signed-off-by: Quentin Monnet
y are
already available, albeit without JSON, via bpftool's help messages.
v2:
- Fix JSON (object instead or array for the features).
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documentation/bpftool.rst | 8 ++-
tools/bpf/bpftool/main.c| 26 +
Let's add the
necessary blank lines.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documentation/Makefile| 2 +-
tools/bpf/bpftool/Documentation/bpftool-btf.rst | 3 +++
tools/bpf/bpftool/Documentation/bpftool-gen.rst | 4
tools/bpf/bpftool/Documentation/bpftool-map.rst
e for eBPF helpers,
which is built along bpftool's documentation.
Signed-off-by: Quentin Monnet
---
.../selftests/bpf/test_bpftool_build.sh | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_bpftool_build.sh
b/tools/testin
eBPF selftests,
so that we also check a documentation build.
This is after a suggestion from Andrii Nakryiko.
Quentin Monnet (2):
tools: bpftool: log info-level messages when building bpftool man
pages
selftests, bpftool: add bpftool (and eBPF helpers) documentation build
tools/bpf/bp
o reduce the risk of
omissions when adding the documentation for new commands.
v2:
- Fix incorrect JSON output.
- Use "echo -n" instead of "printf" in Makefile to avoid the risk of
passing and evaluating formatting strings.
Quentin Monnet (3):
tools: bpftool: print optional buil
all other pages are
available in the same directory.
v2:
- Use "echo -n" instead of "printf" in Makefile, to avoid any risk of
passing a format string directly to the command.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
---
tools/bpf/bpftool/Documentation/Ma
ame my_inner_map [TAB]
Fixing that specific case seems too convoluted. Completion will work as
expected, however, if the outer map name comes first and the "inner_map
name ..." is passed second.
Signed-off-by: Quentin Monnet
Acked-by: Andrii Nakryiko
---
.../bpf/bpftool/Documentat
expected to allow bpftool to dump the content of outer
maps (already supported). v2 skipped that patch, and instead replaced it
with a clean-up for the dump_map_elem() function.
Quentin Monnet (2):
tools: bpftool: clean up function to dump map entry
tools: bpftool: add "inner_ma
On 04/09/2020 22:40, Andrii Nakryiko wrote:
> On Fri, Sep 4, 2020 at 9:15 AM Quentin Monnet wrote:
>>
>> This series contains minor fixes (or harmonisation edits) for the
>> bpftool-link documentation (first patch) and BPF helpers documentation
>> (last two patches), so
On 04/09/2020 23:03, Andrii Nakryiko wrote:
> On Fri, Sep 4, 2020 at 9:14 AM Quentin Monnet wrote:
>>
>> Although user space can lookup and dump the content of an outer map
>> (hash-of-maps or array-of-maps), bpftool does not allow to do so.
>>
>> It seems
On 04/09/2020 22:45, Andrii Nakryiko wrote:
> On Fri, Sep 4, 2020 at 1:57 PM Quentin Monnet wrote:
>>
>> Bpftool has a number of features that can be included or left aside
>> during compilation. This includes:
>>
>> - Support for libbfd, providing the disassembl
On 04/09/2020 22:51, Andrii Nakryiko wrote:
> On Fri, Sep 4, 2020 at 1:58 PM Quentin Monnet wrote:
>>
>> The "SEE ALSO" sections of bpftool's manual pages refer to bpf(2),
>> bpf-helpers(7), then all existing bpftool man pages (save the current
>> one).
options are not "common" and should not be copied when creating
new manual pages.
Let's move the description for those common options to a separate file,
which is included with a RST directive when generating the man pages.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documen
ey are
already available, albeit without JSON, via bpftool's help messages.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documentation/bpftool.rst | 8 +++-
tools/bpf/bpftool/main.c| 22 +
2 files changed, 29 insertions(+), 1 deletion(
all other pages are
available in the same directory.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documentation/Makefile| 12 +++-
tools/bpf/bpftool/Documentation/bpftool-btf.rst | 17 -
.../bpftool/Documentation/bpftool-cgroup.rst| 16 -
o reduce the risk of
omissions when adding the documentation for new commands.
Quentin Monnet (3):
tools: bpftool: print optional built-in features along with version
tools: bpftool: include common options from separate file
tools: bpftool: automate generation for "SEE ALSO" sections in man
Synchronise the bpf.h header under tools, to report the fixes recently
brought to the documentation for the BPF helpers.
Signed-off-by: Quentin Monnet
---
tools/include/uapi/linux/bpf.h | 87 ++
1 file changed, 45 insertions(+), 42 deletions(-)
diff --git a
This series contains minor fixes (or harmonisation edits) for the
bpftool-link documentation (first patch) and BPF helpers documentation
(last two patches), so that all related man pages can build without errors.
Quentin Monnet (3):
tools: bpftool: fix formatting in bpftool-link documentation
Fix a formatting error in the description of bpf_load_hdr_opt() (rst2man
complains about a wrong indentation, but what is missing is actually a
blank line before the bullet list).
Fix and harmonise the formatting for other helpers.
Signed-off-by: Quentin Monnet
---
include/uapi/linux/bpf.h
Fix a formatting error in the documentation for bpftool-link, so that
the man page can build correctly.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/Documentation/bpftool-link.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/Documentation/bpftool
ame my_inner_map [TAB]
Fixing that specific case seems too convoluted. Completion will work as
expected, however, if the outer map name comes first and the "inner_map
name ..." is passed second.
Signed-off-by: Quentin Monnet
---
.../bpf/bpftool/Documentation/bpftool-map.rst | 10 +++-
t
evant
inner_map_fd, which we do through a new command-line keyword.
Quentin Monnet (2):
tools: bpftool: dump outer maps content
tools: bpftool: add "inner_map" to "bpftool map create" outer maps
.../bpf/bpftool/Documentation/bpftool-map.rst | 10 +++-
tools/bpf/bpftool/bash-co
tis
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/map.c | 4
1 file changed, 4 deletions(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index bc0071228f88..cb3a75eb5531 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -739,10 +739,6 @@ static in
it by skipping probes for "unknown" program and map types,
with an informational message giving the numeral value in that case.
Fixes: 93a3545d812a ("tools/bpftool: Add name mappings for SK_LOOKUP prog and
attach type")
Reported-by: Paul Chaignon
Signed-off-by: Quentin Monnet
-
Assign "lsm" as a printed name for BPF_PROG_TYPE_LSM in bpftool, so that
it can use it when listing programs loaded on the system or when probing
features.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/prog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftoo
ich skipped
the "lsm" in the list.
Let's update the list, and let's make sure it does not crash bpftool again
if we omit other types again in the future.
Quentin Monnet (2):
tools: bpftool: skip type probe if name is not found
tools: bpftool: add LSM type to array of prog
On 22/07/2020 05:38, Andrii Nakryiko wrote:
> Strip away DWARF info from .bpf.o files, before generating BPF skeletons.
> This reduces bpftool binary size from 3.43MB to 2.58MB.
>
> Signed-off-by: Andrii Nakryiko
Acked-by: Quentin Monnet
ar
All good for me this time, thank you!
Reviewed-by: Quentin Monnet
On 17/07/2020 23:55, Tony Ambardar wrote:
> The bpftool sources include code to walk file trees, but use multiple
> frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and
> is widely available, fts is not conformant and less common, especially on
> non-glibc systems. The inconsis
2020-07-16 10:42 UTC-0700 ~ Yonghong Song
>
>
> On 7/16/20 9:39 AM, Quentin Monnet wrote:
>> 2020-07-13 09:17 UTC-0700 ~ Yonghong Song
[...]
>> Could you please also update the bash completion?
>
> This is always my hardest part! In this case it is
> bpftool
2020-07-13 09:17 UTC-0700 ~ Yonghong Song
> The optional parameter "map MAP" can be added to "bpftool iter"
> command to create a bpf iterator for map elements. For example,
> bpftool iter pin ./prog.o /sys/fs/bpf/p1 map id 333
>
> For map element bpf iterator "map MAP" parameter is required.
>
2020-07-15 22:29 UTC-0700 ~ Tony Ambardar
> The bpftool sources include code to walk file trees, but use multiple
> frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and
> is widely available, fts is not conformant and less common, especially on
> non-glibc systems. The inconsi
2020-07-14 22:12 UTC-0700 ~ Tony Ambardar
> The bpftool sources include code to walk file trees, but use multiple
> frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and
> is widely available, fts is not conformant and less common, especially on
> non-glibc systems. The inconsi
2020-07-15 11:13 UTC+0800 ~ YueHaibing
> The error return code should be PTR_ERR(obj) other than
> PTR_ERR(NULL).
>
> Fixes: 5dc7a8b21144 ("bpftool, selftests/bpf: Embed object file inside
> skeleton")
> Signed-off-by: YueHaibing
Reviewed-by: Quentin Monnet
Thanks!
3,
> "bytes_memlock": 4096,
> "map_ids": [2,3
> Segmentation fault (core dumped)
>
> The same happens for ./bpftool -p map, as well as ./bpftool -j prog/map.
>
> Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF
> map/prog/link/btf FDs")
> Signed-off-by: Louis Peens
> Reviewed-by: Simon Horman
Reviewed-by: Quentin Monnet
Thanks Louis.
2020-06-23 18:02 UTC-0700 ~ Alexei Starovoitov
> On Tue, Jun 23, 2020 at 8:39 AM Quentin Monnet wrote:
>>
>> When producing the bpf-helpers.7 man page from the documentation from
>> the BPF user space header file, rst2man complains:
>>
>> :2636: (ERROR/3) Une
x27;s rename the variable.
v2:
- Rename the variable instead of calling the global json_wtr directly.
Signed-off-by: Quentin Monnet
---
v1 was "tools: bpftool: do not pass json_wtr to emit_obj_refs_json()"
---
tools/bpf/bpftool/pids.c | 17 +
1 file changed, 9 insertio
On Tue, 23 Jun 2020 at 19:27, Andrii Nakryiko wrote:
>
> On Tue, Jun 23, 2020 at 8:54 AM Quentin Monnet wrote:
> >
> > Building bpftool yields the following complaint:
> >
> > pids.c: In function ‘emit_obj_refs_json’:
> > pids.c:175:80: warning: declar
main.h (included in pids.c) as an extern, it
is directly available and there is no need to pass it through the
function. Let's simply use the global variable.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/btf.c | 2 +-
tools/bpf/bpftool/link.c | 2 +-
tools/bpf/bpftool/main.
chunk (item list in
bpf_ringbuf_query()'s description), and for a couple other functions.
Signed-off-by: Quentin Monnet
---
include/uapi/linux/bpf.h | 41
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/
2020-06-19 16:17 UTC-0700 ~ Andrii Nakryiko
> Add statements about bpftool being able to discover process info, holding
> reference to BPF map, prog, link, or BTF. Show example output as well.
>
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
Thanks!
; 62: cgroup prog 2908
> cgroup_id 375344 attach_type egress
> pids test_progs(2238417), test_progs(2238445)
>
> $ sudo ./bpftool btf show
> 1202: size 1527B prog_ids 2908,2907 map_ids 2436
> pids test_progs(2238417), test_progs(2238445)
> 1242: size 34684B
> pids bpftool(2258892)
>
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
2020-06-17 23:01 UTC-0700 ~ Andrii Nakryiko
> On Wed, Jun 17, 2020 at 5:24 PM Quentin Monnet wrote:
>>
>> 2020-06-17 09:18 UTC-0700 ~ Andrii Nakryiko
>>> Add bpf_iter-based way to find all the processes that hold open FDs against
>>> BPF object (map, prog, link,
ed to care about bootstrap mode for those new parts of bpftool.
>
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
re decoupled from the rest of bpftool files and facilitates more
> lightweight bootstrap bpftool variant.
>
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
> check for support of preserve_access_index attribute, which, together with BTF
> for global variables, is the minimum requirement for modern BPF programs.
>
> Signed-off-by: Andrii Nakryiko
Reviewed-by: Quentin Monnet
2020-06-17 09:18 UTC-0700 ~ Andrii Nakryiko
> Add statements about bpftool being able to discover process info, holding
> reference to BPF map, prog, link, or BTF. Show example output as well.
>
> Signed-off-by: Andrii Nakryiko
> ---
> tools/bpf/bpftool/Documentation/bpftool-btf.rst | 5 +
2020-06-17 09:18 UTC-0700 ~ Andrii Nakryiko
> Add bpf_iter-based way to find all the processes that hold open FDs against
> BPF object (map, prog, link, btf). bpftool always attempts to discover this,
> but will silently give up if kernel doesn't yet support bpf_iter BPF programs.
> Process name a
2020-06-15 11:04 UTC+0200 ~ Toke Høiland-Jørgensen
> Arnaldo Carvalho de Melo writes:
>
>> Em Fri, Jun 12, 2020 at 10:57:59PM -0700, Andrii Nakryiko escreveu:
>>> On Fri, Jun 12, 2020 at 8:45 PM Alexei Starovoitov
>>> wrote:
On Fri, Jun 12, 2020 at 03:31:50PM -0700, Andrii Nakryiko wr
and "bpftool link". Let's reuse this for all other help
functions. We can remove up to thirty arguments for the "bpftool map"
help message.
- Harmonise all functions, e.g. use ending quotes-comma on a separate
line.
Signed-off-by: Quentin Monnet
---
hem in that case).
- Keep track of what capabilities we have, print the names of the
missing ones for privileged probing.
- Attempt to drop only the capabilities we actually have.
- Rename a couple variables.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/feature.c | 85 +++
2020-05-18 17:07 UTC-0700 ~ Andrii Nakryiko
> On Fri, May 15, 2020 at 5:52 PM Quentin Monnet wrote:
>>
>> Following the introduction of CAP_BPF, and the switch from CAP_SYS_ADMIN
>> to other capabilities for various BPF features, update the capability
>> checks
The checks when compiling without libcap (i.e. root versus non-root) are
unchanged.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/feature.c | 85 +
1 file changed, 67 insertions(+), 18 deletions(-)
diff --git a/tools/bpf/bpftool/feature.c b/tools/b
IG_* can still be added to C
macro output at a later time if someone needs them anyway.
Regarding a fallback for the jiffies, not sure what would be best. I
agree with you for the "full" keyword, so we would need another word I
suppose. But adding new keyword for fallbacks for probing features not
directly related to BPF might be going a bit beyond bpftool's scope? I
don't know. Anyway, for the current patch:
Reviewed-by: Quentin Monnet
Synchronise the bpf.h header under tools, to report the fixes recently
brought to the documentation for the BPF helpers.
Signed-off-by: Quentin Monnet
---
tools/include/uapi/linux/bpf.h | 109 ++---
1 file changed, 59 insertions(+), 50 deletions(-)
diff --git a
plete/harmonise/sort the list of related bpftool man pages in
footers.
v2:
- Remove (instead of changing) mark-up on "value" in bpftool-map.rst,
when it does not refer to something passed on the command line.
- Fix an additional typo ("hexadeximal") in the same file.
Sig
.
Then come the documentation fixes: bpftool, and BPF helpers, with the usual
sync up for the BPF header under tools/. Please refer to individual commit
logs for details.
Quentin Monnet (4):
tools: bpftool: poison and replace kernel integer typedefs
tools: bpftool: minor fixes for documentation
ure
probe", including for listing features available to unprivileged
users, and add a reference to bpftool man page.
Thanks to Florian for reporting two typos (duplicated words).
Cc: Florian Weimer
Cc: Richard Palethorpe
Cc: Michael Kerrisk
Signed-off-by: Quentin Monne
Replace the use of kernel-only integer typedefs (u8, u32, etc.) by their
user space counterpart (__u8, __u32, etc.).
Similarly to what libbpf does, poison the typedefs to avoid introducing
them again in the future.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/btf_dumper.c| 4
2020-05-11 17:25 UTC+0200 ~ Daniel Borkmann
> On 5/11/20 3:38 PM, Quentin Monnet wrote:
>> Bring minor improvements to bpftool documentation. Fix or harmonise
>> formatting, update map types (including in interactive help), improve
>> description for "map create"
Replace the use of kernel-only integer typedefs (u8, u32, etc.) by their
user space counterpart (__u8, __u32, etc.).
Similarly to what libbpf does, poison the typedefs to avoid introducing
them again in the future.
Signed-off-by: Quentin Monnet
---
tools/bpf/bpftool/btf_dumper.c| 4
ure
probe", including for listing features available to unprivileged
users, and add a reference to bpftool man page.
Thanks to Florian for reporting two typos (duplicated words).
Cc: Florian Weimer
Cc: Richard Palethorpe
Cc: Michael Kerrisk
Signed-off-by: Quentin Monne
1 - 100 of 573 matches
Mail list logo