On Wed, Mar 31, 2021 at 02:03:08PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 416dacb819f59180e4d86a5550052033ebb6d72c
> Author: Alan Stern
> Date: Wed Aug 21 17:27:12 2019 +
>
> HID: hidraw: Fix invalid read in hidraw_ioctl
>
Add a description section to the rdma man page with basic info about the
command for users unfamiliar with it.
Signed-off-by: Alan Perry
Acked-by: Leon Romanovsky
---
Changelog
Removed man page date change. Reworked description change into several lines
instead of one long line.
---
man/man8
Signed-off-by: Alan Perry
Acked-by: Leon Romanovsky
---
man/man8/rdma.8 | 6 ++
1 file changed, 6 insertions(+)
diff --git a/man/man8/rdma.8 b/man/man8/rdma.8
index c9e5d50d..9c016687 100644
--- a/man/man8/rdma.8
+++ b/man/man8/rdma.8
@@ -29,6 +29,12 @@ rdma \- RDMA tool
\fB\-j\fR[\fIson
Add a description section with basic info about the rdma command for users
unfamiliar with it.
Signed-off-by: Alan Perry
Acked-by: Leon Romanovsky
---
man/man8/rdma.8 | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/man/man8/rdma.8 b/man/man8/rdma.8
index c9e5d50d
Add a description section with basic info about the rdma command for users
unfamiliar with it.
Signed-off-by: Alan Perry
---
man/man8/rdma.8 | 9 -
1 file changed, 8 insertion(+), 1 deletion(-)
diff --git a/man/man8/rdma.8 b/man/man8/rdma.8
index c9e5d50d..66ef9902 100644
--- a/man
On Thu, 21 Jan 2021, Andrii Nakryiko wrote:
> On Wed, Jan 20, 2021 at 10:56 PM Andrii Nakryiko
> wrote:
> >
> > On Sun, Jan 17, 2021 at 2:22 PM Alan Maguire
> > wrote:
> > >
> > > Add a BTF dumper for typed data, so that the user can dump
On 12/23/20 12:19 AM, Leon Romanovsky wrote:
On Tue, Dec 22, 2020 at 08:47:51PM -0800, Alan Perry wrote:
Add a description section with basic info about the rdma command for users
unfamiliar with it.
Signed-off-by: Alan Perry
---
man/man8/rdma.8 | 6 +-
1 file changed, 5 insertion
BTF type data dumping will use them in later patches, and they
are useful generally when handling BTF data.
Signed-off-by: Alan Maguire
---
tools/lib/bpf/btf.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h
index 1237bcd
6744073709551615,
},
},
...
Signed-off-by: Alan Maguire
---
tools/lib/bpf/btf.h | 17 +
tools/lib/bpf/btf_dump.c | 974 +++
tools/lib/bpf/libbpf.map | 5 +
3 files changed, 996 insertions(+)
diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/b
Test various type data dumping operations by comparing expected
format with the dumped string; an snprintf-style printf function
is used to record the string dumped.
Signed-off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/btf_dump.c | 233 ++
1 file changed
btf_dump.c will need it for type-based data display.
Signed-off-by: Alan Maguire
---
tools/lib/bpf/libbpf.c | 4 +---
tools/lib/bpf/libbpf_internal.h | 2 ++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2abbc38
ound in it should be fixed there or vice versa;
mirroring the tests should help with this also
(Andrii)
[1]
https://lore.kernel.org/bpf/1610386373-24162-1-git-send-email-alan.magu...@oracle.com/T/#t
Alan Maguire (4):
libbpf: add btf_has_size() and btf_int() inlines
libbpf: make skip_mods_an
On Mon, 11 Jan 2021, Andrii Nakryiko wrote:
> On Mon, Jan 11, 2021 at 9:34 AM Alan Maguire wrote:
> > Currently the only "show" function for userspace is to write the
> > representation of the typed data to a string via
> >
> > LIBBPF_API int
> > btf__s
d\n", skb_id);
else
btf__snprintf(btf, buf, sizeof(buf), skb_id, skb, 0);
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
include/linux/btf.h | 121 +---
include/linux/btf_common.h | 286 +
kernel/bpf/Makefile |2 +
Test btf__snprintf with various base/kernel types and ensure
display is as expected; tests are identical to those in snprintf_btf
test save for the fact these run in userspace rather than BPF program
context.
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/snprintf_btf_user.c
format. The test closely mirrors
the BPF program associated with the snprintf_btf.c; in this case
however the string representations are verified in userspace rather
than in BPF program context.
Alan Maguire (2):
bpf: share BTF "show" implementation between kernel and libbpf
selftests
needed for compilation anyhow.
[1]
https://lore.kernel.org/netdev/1461512707-23058-1-git-send-email-mikko.rapeli__34748.27880641$1462831734$gmane$o...@iki.fi/
Fixes: f6f3bac08ff9 ("tools/bpf: bpftool: add net support")
Signed-off-by: Alan Maguire
---
tools/bpf/bpftool/net.c | 1
On Tue, 5 Jan 2021, Cong Wang wrote:
> On Mon, Jan 4, 2021 at 7:29 AM Alan Maguire wrote:
> >
> > BPF Type Format (BTF) provides a description of kernel data structures
> > and of the types kernel functions utilize as arguments and return values.
> >
>
edicate, e.g.
ksnoop "ip_send_skb(skb->dev == 0, skb)"
...as this will be evaluated before the skb is stringified,
and we potentially avoid that operation if the predicate fails.
The same is _not_ true however in the stash case; for
ksnoop "ip_send_skb(skb, return!=0)"
On 12/23/20 12:19 AM, Leon Romanovsky wrote:
On Tue, Dec 22, 2020 at 08:47:51PM -0800, Alan Perry wrote:
Add a description section with basic info about the rdma command for users
unfamiliar with it.
Signed-off-by: Alan Perry
---
man/man8/rdma.8 | 6 +-
1 file changed, 5 insertion
Add a description section with basic info about the rdma command for
users unfamiliar with it.
Signed-off-by: Alan Perry
---
man/man8/rdma.8 | 6 +-
1 file changed, 5 insertion(+), 1 deletion(-)
diff --git a/man/man8/rdma.8 b/man/man8/rdma.8
index c9e5d50d..d68d0cf6 100644
--- a/man/man8
> > > and use it in bpf_snprintf_btf() along with the referenced type. Only a
> > > single simple reference like the above is supported currently, but
> > > multiple levels of reference could be made to work too.
>
> Alan,
>
> I'm not sure why the las
On Tue, 15 Dec 2020, Alexei Starovoitov wrote:
> On Wed, Dec 09, 2020 at 11:21:43PM +0000, Alan Maguire wrote:
> > Right, that's exactly it. A pair of generic tracing BPF programs are
> > used, and they attach to kprobe/kretprobes, and when they run they
> > use
On Tue, 8 Dec 2020, Alexei Starovoitov wrote:
> On Tue, Dec 08, 2020 at 10:13:35PM +0000, Alan Maguire wrote:
> >
> > Does this approach prevent more complex run-time specification of BTF
> > object fd though? For example, I've been working on a simple tracer
>
->v2:
> - fix crash on failing to resolve target spec (Alan).
>
> Cc: Alan Maguire
> Signed-off-by: Andrii Nakryiko
Thanks for this!
Can confirm the segmentation fault has gone away. I tested with the
veth_stats_rx program (though will switch to btf_test module later),
and
On Mon, 7 Dec 2020, Andrii Nakryiko wrote:
> On Mon, Dec 7, 2020 at 7:12 PM Alexei Starovoitov
> wrote:
> >
> > On Mon, Dec 07, 2020 at 04:38:16PM +, Alan Maguire wrote:
> > > Sorry about this Andrii, but I'm a bit stuck here.
> > >
> > > I&
On Mon, 7 Dec 2020, Andrii Nakryiko wrote:
> On Sat, Dec 5, 2020 at 4:38 PM Alan Maguire wrote:
> > Thanks so much for doing this Andrii! When I tested, I ran into a problem;
> > it turns out when a module struct such as "veth_stats" is used, it's
> > classif
t; selftests. Manual testing was performed with debug log messages sprinkled
> across selftests and libbpf, confirming expected values are substituted.
> Better testing will be performed as part of the work adding module BTF types
> support to bpf_snprintf_btf() helpers.
>
> Cc: Al
s sense as not everyone will
have llvm12). Does that seem reasonable?
With the additional few minor changes on top of Andrii's patch,
the use of __builtin_btf_type_id() worked perfectly. Thanks!
Alan
t; selftests. Manual testing was performed with debug log messages sprinkled
> across selftests and libbpf, confirming expected values are substituted.
> Better testing will be performed as part of the work adding module BTF types
> support to bpf_snprintf_btf() helpers.
>
> Cc: Al
auditing example in
Documentation/RCU/listRCU.rst ; and as such we can eliminate
the lock and use list_del_rcu()/call_rcu() on module removal,
and list_add_rcu() for module addition.
Signed-off-by: Alan Maguire
---
kernel/bpf/btf.c | 31 +--
1 file changed, 17 insertions
t net_device".
Currently the tests take the messy approach of determining object
and type ids for the relevant module/function; __builtin_btf_type_id()
supports object ids by returning a 64-bit value, but need to find a good
way to determine if that support is present.
Signed-off-by: Alan M
the object id
specifies the module the type is in, or if no such id is
found in the module list, we fall back to vmlinux.
Signed-off-by: Alan Maguire
---
include/linux/btf.h| 12
include/uapi/linux/bpf.h | 13 +++--
kernel/bpf/btf.c
likely be supported
directly in the BPF program via __builtin_btf_type_id(); but
I need to determine a good test to determine if that builtin
supports object ids.
Changes since RFC
- add patch to remove module mutex
- modify to use obj_id instead of module name as identifier
in "struct btf_ptr&
ine]
> port100_probe+0xd4f/0x1600 drivers/nfc/port100.c:1567
I don't understand this driver very well. It looks like the problem
stems from the fact that port100_send_frame_async() submits two URBs,
but port100_send_cmd_sync() only waits for one of them to complete. The
other URB may then still be active when the driver tries to reuse it.
Maybe someone who's more familiar with the port100 driver can fix the
problem.
Alan Stern
On Sat, 14 Nov 2020, Yonghong Song wrote:
>
>
> On 11/14/20 8:04 AM, Alexei Starovoitov wrote:
> > On Fri, Nov 13, 2020 at 10:59 PM Andrii Nakryiko
> > wrote:
> >>
> >> On Fri, Nov 13, 2020 at 10:11 AM Alan Maguire
> >> wrote:
> >>>
lly
for vmlinux + module BTF, where the latter is much smaller.
Use btf__get_nr_types() instead.
Fixes: ba451366bf44 ("libbpf: Implement basic split BTF support")
Signed-off-by: Alan Maguire
---
tools/lib/bpf/btf.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --gi
of a module-specific type id will fail
in patch 3.
Patch 3 is a selftest that uses veth (when built as a
module) and a kprobe to display both a module-specific
and kernel-specific type; both are arguments to veth_stats_rx().
Alan Maguire (3):
bpf: add module support to btf disp
bpf_snprintf_btf and bpf_seq_printf_btf use a "struct btf_ptr *"
argument that specifies type information about the type to
be displayed. Augment this information to include a module
name, allowing such display to support module types.
Signed-off-by: Alan Maguire
---
include/l
t_device".
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/snprintf_btf_mod.c| 96 ++
tools/testing/selftests/bpf/progs/btf_ptr.h| 1 +
tools/testing/selftests/bpf/progs/veth_stats_rx.c | 73
3 files changed, 170 insertions(+)
cr
lly
for vmlinux + module BTF, where the latter is much smaller.
Use btf__get_nr_types() instead.
Signed-off-by: Alan Maguire
---
tools/lib/bpf/btf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 2d0d064..0fccf4b 100644
--
to the latest changes etc and BTF generation seemed to work
fine for modules during kernel build).
For the "bpftool btf show" functionality, feel free to add
Tested-by: Alan Maguire
Thanks!
Alan
larly will __builtin_btf_type_id()
work across both vmlinux and modules? I'm thinking of the case where we
potentially don't know which module a type is defined in.
I realize in some cases type names may refer to different types in
different modules (not sure how frequent this is in practice?) but
I'm curious how the split model for modules will interact with existing
APIs and helpers.
In some cases it's likely that modules may share types with
each other that they do not share with vmlinux; in such cases
will those types get deduplicated also, or is deduplication just
between kernel/module, and not module/module?
Sorry I know these questions aren't about this patchset in
particular, but I'm just trying to get a sense of the bigger
picture. Thanks!
Alan
ee you used for building did not include
the declarations of usb_control_msg_{send|recv}().
It's hard to tell exactly what that tree does contain, because the
github.com links embedded in the web page you mention above don't work.
Alan Stern
; still fail. Fix this by also skipping the rest of the parent test if the
> skip condition was reached.
>
> Fixes: b72091bd4ee4 ("selftests/bpf: Add test for bpf_seq_printf_btf helper")
> Signed-off-by: Toke Høiland-Jørgensen
Reviewed-by: Alan Maguire
Thanks for fixing
Resolve issues in bpf selftests introduced with BTF-based kernel data
display selftests; these are
- a warning introduced in snprintf_btf.c; and
- compilation failures with old kernels vmlinux.h
Alan Maguire (2):
selftests/bpf: fix unused-result warning in snprintf_btf.c
selftests/bpf
lftests/bpf: Add test for bpf_seq_printf_btf helper")
Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests")
Reported-by: Andrii Nakryiko
Signed-off-by: Alan Maguire
---
tools/testing/selftests/bpf/progs/bpf_iter.h | 23 ++
tools/testing/s
declared with attribute
warn_unused_result [-Wunused-result]
system("ping -c 1 127.0.0.1 > /dev/null");
^
[...]
Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests")
Reported-by: Daniel Borkmann
Signed-off-
__user
> *buf, size_t size,
> mutex_lock(&seq->lock);
>
> if (!seq->buf) {
> - seq->size = PAGE_SIZE;
> - seq->buf = kmalloc(seq->size, GFP_KERNEL);
> + seq->size = PAGE_SIZE << 3;
> + seq->buf = kvmalloc(seq->size, GFP_KERNEL);
>
> So users can print task_struct by default.
> Hopefully we will figure out how to deal with spam later.
>
Thanks for all the help and suggestions! I didn't want to
attribute the patch bumping seq size in v7 to you without your
permission, but it's all your work so if I need to respin let me
know if you'd like me to fix that. Thanks again!
Alan
Add a test verifying iterating over tasks and displaying BTF
representation of task_struct succeeds.
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 74 ++
.../selftests/bpf/progs/bpf_iter_task_btf.c
Tests verifying snprintf()ing of various data structures,
flags combinations using a tp_btf program. Tests are skipped
if __builtin_btf_type_id is not available to retrieve BTF
type ids.
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/snprintf_btf.c| 60
BPF iter size is limited to PAGE_SIZE; if we wish to display BTF-based
representations of larger kernel data structures such as task_struct,
this will be insufficient.
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
kernel/bpf/bpf_iter.c | 4 ++--
1 file changed, 2 insertions
bpf_snprintf_btf helper, and the helper returns 0 on success
or a negative error value.
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
include/linux/btf.h| 2 ++
include/uapi/linux/bpf.h | 9 +
kernel/bpf/btf.c | 4 ++--
kernel/bpf/core.c
bpf iter size increase to PAGE_SIZE << 3 means overflow tests assuming
page size need to be bumped also.
Signed-off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/testing/sel
BPF for using the %pT format specifier in
bpf_trace_printk()
- added BPF tests which ensure %pT format specifier use works (Alexei).
Alan Maguire (8):
bpf: provide function to get vmlinux BTF information
bpf: move to generic BTF show support, apply it to seq files/strings
bpf: add bpf_snprint
te pointer values.
BTF_SHOW_UNSAFE - do not copy data to safe buffer before display.
BTF_SHOW_ZERO - show zeroed values (by default they are not shown).
Signed-off-by: Alan Maguire
---
include/linux/btf.h | 36 ++
kernel/bpf/btf.c| 1007 +-
ruct/union member names/types
- BTF_F_PTR_RAW:show raw (unobfuscated) pointer values;
equivalent to %px.
- BTF_F_ZERO: show zero-valued struct/union members;
they are not displayed by default
Signed-off-by: Alan Maguire
---
include/l
It will be used later for BPF structure display support
Signed-off-by: Alan Maguire
---
include/linux/bpf.h | 2 ++
kernel/bpf/verifier.c | 18 --
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 7990232..2eae3f3
off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 66 ++
.../selftests/bpf/progs/bpf_iter_task_btf.c| 49
2 files changed, 115 insertions(+)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_task_btf.c
diff --gi
bpf_snprintf_btf helper, and the helper returns 0 on success
or a negative error value.
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
include/linux/btf.h| 2 ++
include/uapi/linux/bpf.h | 10 ++
kernel/bpf/btf.c | 4 ++--
kernel/bpf/core.c
It will be used later for BPF structure display support
Signed-off-by: Alan Maguire
---
include/linux/bpf.h | 2 ++
kernel/bpf/verifier.c | 18 --
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index fc5c901..049e50f
te pointer values.
BTF_SHOW_UNSAFE - do not copy data to safe buffer before display.
BTF_SHOW_ZERO - show zeroed values (by default they are not shown).
Signed-off-by: Alan Maguire
---
include/linux/btf.h | 36 ++
kernel/bpf/btf.c| 980 ++-
sing the %pT format specifier in
bpf_trace_printk()
- added BPF tests which ensure %pT format specifier use works (Alexei).
Alan Maguire (6):
bpf: provide function to get vmlinux BTF information
bpf: move to generic BTF show support, apply it to seq files/strings
bpf: add bpf_snprintf_btf h
Tests verifying snprintf()ing of various data structures,
flags combinations using a tp_btf program.
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/snprintf_btf.c| 54 +
.../selftests/bpf/progs/netif_receive_skb.c| 260 +
2 files changed
/union members;
they are not displayed by default
Signed-off-by: Alan Maguire
---
include/linux/bpf.h| 1 +
include/linux/btf.h| 9 ++--
include/uapi/linux/bpf.h | 68 +++
kernel/bpf/core.c | 1 +
kernel/bpf/helpers.c
te pointer values.
BTF_SHOW_UNSAFE - do not copy data to safe buffer before display.
BTF_SHOW_ZERO - show zeroed values (by default they are not shown).
Signed-off-by: Alan Maguire
---
include/linux/btf.h | 36 ++
kernel/bpf/btf.c| 971 ++-
Tests verifying snprintf()ing of various data structures,
flags combinations using a tp_btf program.
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/btf_snprintf.c| 55 +
.../selftests/bpf/progs/netif_receive_skb.c| 260 +
2 files changed
/union members;
they are not displayed by default
Signed-off-by: Alan Maguire
---
include/linux/bpf.h| 1 +
include/linux/btf.h| 9 +++--
include/uapi/linux/bpf.h | 68
kernel/bpf/helpers.c | 4 ++
kernel/tra
bpf_btf_snprintf helper, and the helper returns 0 on success
or a negative error value.
Suggested-by: Alexei Starovoitov
Signed-off-by: Alan Maguire
---
include/linux/btf.h| 3 ++
include/uapi/linux/bpf.h | 10 ++
kernel/bpf/btf.c | 17 +++---
kernel/trace
off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 66 ++
.../selftests/bpf/progs/bpf_iter_task_btf.c| 49
2 files changed, 115 insertions(+)
create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_task_btf.c
diff --gi
- added support in BPF for using the %pT format specifier in
bpf_trace_printk()
- added BPF tests which ensure %pT format specifier use works (Alexei).
Alan Maguire (6):
bpf: provide function to get vmlinux BTF information
bpf: move to generic BTF show support, apply it to seq files/string
It will be used later for BPF structure display support
Signed-off-by: Alan Maguire
---
include/linux/bpf.h | 2 ++
kernel/bpf/verifier.c | 18 --
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index c6d9f2c..c0ad5d8
> -Original Message-
> From: Brady, Alan
> Sent: Thursday, August 27, 2020 10:16 AM
> To: Jakub Kicinski ; Nguyen, Anthony L
>
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T
> -Original Message-
> From: Michal Kubecek
> Sent: Monday, August 24, 2020 2:45 PM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Monday, August 24, 2020 1:42 PM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Monday, August 24, 2020 1:41 PM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Monday, August 24, 2020 1:41 PM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Monday, August 24, 2020 12:43 PM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
>
verting everything
> over to a sane, and checkable, api and remove a bunch of wrapper
> functions as well.
Suggestion: _read and _send are not a natural pair. Consider instead
_read and _write. _recv and _send don't feel right either, because it
both cases the host sends the control message -- the difference lies
in who sends the data.
Alan Stern
> -Original Message-
> From: Tony Nguyen
> Sent: Monday, August 24, 2020 10:33 AM
> To: da...@davemloft.net
> Cc: Michael, Alice ; netdev@vger.kernel.org;
> nhor...@redhat.com; sassm...@redhat.com; Kirsher, Jeffrey T
> ; Nguyen, Anthony L
> ; Brady, Alan ; Burra,
&
am I missing something?
> Also exercise and check new APIs in perf_buffer selftest.
>
> Signed-off-by: Andrii Nakryiko
A few question around the test below, but
Reviewed-by: Alan Maguire
> ---
> tools/lib/bpf/libbpf.c| 51 ++-
>
On Fri, 14 Aug 2020, Alexei Starovoitov wrote:
> On Fri, Aug 14, 2020 at 02:06:37PM +0100, Alan Maguire wrote:
> > On Wed, 12 Aug 2020, Alexei Starovoitov wrote:
> >
> > > On Thu, Aug 06, 2020 at 03:42:23PM +0100, Alan Maguire wrote:
> > > >
> &
On Wed, 12 Aug 2020, Alexei Starovoitov wrote:
> On Thu, Aug 06, 2020 at 03:42:23PM +0100, Alan Maguire wrote:
> >
> > The bpf_trace_printk tracepoint is augmented with a "trace_id"
> > field; it is used to allow tracepoint filtering as typed display
> > i
ad of
trace_printk()")
Signed-off-by: Alan Maguire
---
Documentation/bpf/bpf_design_QA.rst | 11 ---
1 file changed, 11 deletions(-)
diff --git a/Documentation/bpf/bpf_design_QA.rst
b/Documentation/bpf/bpf_design_QA.rst
index 12a246f..2df7b06 100644
--- a/Documentation/bpf/bpf_design_QA
Basic tests verifying various flag combinations for bpf_trace_btf()
using a tp_btf program to trace skb data.
Signed-off-by: Alan Maguire
---
tools/testing/selftests/bpf/prog_tests/trace_btf.c | 45 ++
.../selftests/bpf/progs/netif_receive_skb.c| 43
/union members;
they are not displayed by default
Signed-off-by: Alan Maguire
---
include/linux/bpf.h| 1 +
include/linux/btf.h| 9 ++--
include/uapi/linux/bpf.h | 63 +
kernel/bpf/core.c | 5 ++
kernel
on of the target dummy
value which is either all zeros or all 0xff values; the idea is this
exercises the "skip if zero" and "print everything" cases.
- added support in BPF for using the %pT format specifier in
bpf_trace_printk()
- added BPF tests which ensure %pT format spe
t;
field; it is used to allow tracepoint filtering as typed display
information can easily be interspersed with other tracing data,
making it hard to read. Specifying a trace_id will allow users
to selectively trace data, eliminating noise.
Signed-off-by: Alan Maguire
---
include/linux/bpf.h
It will be used later for BPF structure display support
Signed-off-by: Alan Maguire
---
include/linux/bpf.h | 2 ++
kernel/bpf/verifier.c | 18 --
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index cef4ef0..55eb67d
> -Original Message-
> From: Jakub Kicinski
> Sent: Tuesday, July 21, 2020 11:01 AM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Tuesday, July 21, 2020 11:05 AM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Tuesday, July 21, 2020 11:32 AM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
> -Original Message-
> From: Jakub Kicinski
> Sent: Tuesday, July 21, 2020 11:28 AM
> To: Nguyen, Anthony L
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Kirsher, Jeffrey T ; Brady, Alan
> ; Burra,
it in-kernel when/if we encounter a program using the
bpf_trace_printk() helper. With this approach, trace_printk()
is not used directly and no warning message appears.
This work was started by Steven (see Link) and finished by Alan; added
Steven's Signed-off-by with his permission.
Link:
Simple selftests that verifies bpf_trace_printk() returns a sensible
value and tracing messages appear.
Signed-off-by: Alan Maguire
Acked-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/trace_printk.c| 75 ++
tools/testing/selftests/bpf/progs/trace_printk.c
l not prevent tracing output from being logged
(Steven, patch 1)
- use "tp/raw_syscalls/sys_enter" and a usleep(1) to trigger events
in the selftest ensuring test runs faster (Andrii, patch 2)
[1] https://lore.kernel.org/r/20200628194334.6238b...@oasis.local.home
Alan Maguire (2):
bpf
> -Original Message-
> From: Jakub Kicinski
> Sent: Friday, June 26, 2020 12:30 PM
> To: Kirsher, Jeffrey T
> Cc: da...@davemloft.net; Michael, Alice ;
> netdev@vger.kernel.org; nhor...@redhat.com; sassm...@redhat.com;
> Brady, Alan ; Burra, Phani R ;
> Hay, J
it in-kernel when/if we encounter a program using the
bpf_trace_printk() helper. With this approach, trace_printk()
is not used directly and no warning message appears.
This work was started by Steven (see Link) and finished by Alan; added
Steven's Signed-off-by with his permission.
Link:
Simple selftests that verifies bpf_trace_printk() returns a sensible
value and tracing messages appear.
Signed-off-by: Alan Maguire
---
.../selftests/bpf/prog_tests/trace_printk.c| 74 ++
tools/testing/selftests/bpf/progs/trace_printk.c | 21 ++
2 files changed
, patch 1)
- use "tp/raw_syscalls/sys_enter" and a usleep(1) to trigger events
in the selftest ensuring test runs faster (Andrii, patch 2)
[1] https://lore.kernel.org/r/20200628194334.6238b...@oasis.local.home
Alan Maguire (2):
bpf: use dedicated bpf_trace_printk event instead of tr
1 - 100 of 474 matches
Mail list logo