On Tue, May 21, 2019 at 04:47:58PM +0100, Lorenz Bauer wrote:
> On Fri, 17 May 2019 at 00:38, Nitin Hande wrote:
> >
> > On Thu, May 16, 2019 at 2:57 PM Alexei Starovoitov
> > wrote:
> > >
> > > On Thu, May 16, 2019 at 09:41:34AM +0100, Lorenz Bauer wrot
Convert explored_states array into hash table and use simple hash to
reduce verifier peak memory consumption for programs with bpf2bpf calls.
More details in patch 3.
Alexei Starovoitov (3):
bpf: cleanup explored_states
bpf: split explored_states
bpf: convert explored_states to hash table
split explored_states into prune_point boolean mark
and link list of explored states.
This removes STATE_LIST_MARK hack and allows marks to be separate from states.
Signed-off-by: Alexei Starovoitov
---
include/linux/bpf_verifier.h | 1 +
kernel/bpf/verifier.c| 31
better vs this patch.
They can be improved in the future.
Hit/miss heuristic is not counting index miscompare as a miss.
Otherwise verifier stats become unstable when experimenting
with different hash functions.
Signed-off-by: Alexei Starovoitov
---
include/linux/bpf_verifier.h | 1 +
kernel/bpf
clean up explored_states to prep for introduction of hashtable
No functional changes.
Signed-off-by: Alexei Starovoitov
---
kernel/bpf/verifier.c | 30 +-
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
Patch 1 - jmp sequence limit
Patch 2 - improve existing tests
Patch 3 - add pyperf-based realistic bpf program that takes advantage
of higher limit and use it as a stress test
Alexei Starovoitov (3):
bpf: bump jmp sequence limit
selftests/bpf: adjust verifier scale test
selftests/bpf: add
in bpf_fill_scale2.
It was testing a bit shorter sequence of jumps than intended.
Signed-off-by: Alexei Starovoitov
---
tools/testing/selftests/bpf/test_verifier.c | 31 +++--
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/tools/testing/selftests/bpf
The limit of 1024 subsequent jumps was causing otherwise valid
programs to be rejected. Bump it to 8192 and make the error more verbose.
Signed-off-by: Alexei Starovoitov
---
kernel/bpf/verifier.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/verifier.c b
ned-off-by: Alexei Starovoitov
---
.../bpf/prog_tests/bpf_verif_scale.c | 31 +-
tools/testing/selftests/bpf/progs/pyperf.h| 268 ++
tools/testing/selftests/bpf/progs/pyperf100.c | 4 +
tools/testing/selftests/bpf/progs/pyperf180.c | 4 +
tools/testing/selftests
On 5/21/19 5:36 PM, Andrii Nakryiko wrote:
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/progs/pyperf.h
>> @@ -0,0 +1,268 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +// Copyright (c) 2019 Facebook
>
> Maybe let's include a link to an up-to-date real tool, that was used
> to create this
On Tue, May 21, 2019 at 05:55:06PM -0700, Andrii Nakryiko wrote:
> On Tue, May 21, 2019 at 4:08 PM Alexei Starovoitov wrote:
> >
> > All prune points inside a callee bpf function most likely will have
> > different callsites. For example, if function foo() is called from
Patch 1 - jmp sequence limit
Patch 2 - improve existing tests
Patch 3 - add pyperf-based realistic bpf program that takes advantage
of higher limit and use it as a stress test
v1->v2: fixed nit in patch 3. added Andrii's acks
Alexei Starovoitov (3):
bpf: bump jmp sequence limit
selft
The limit of 1024 subsequent jumps was causing otherwise valid
programs to be rejected. Bump it to 8192 and make the error more verbose.
Signed-off-by: Alexei Starovoitov
Acked-by: Andrii Nakryiko
---
kernel/bpf/verifier.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff
ned-off-by: Alexei Starovoitov
Acked-by: Andrii Nakryiko
---
.../bpf/prog_tests/bpf_verif_scale.c | 31 +-
tools/testing/selftests/bpf/progs/pyperf.h| 268 ++
tools/testing/selftests/bpf/progs/pyperf100.c | 4 +
tools/testing/selftests/bpf/progs/pyperf180.c | 4 +
too
in bpf_fill_scale2.
It was testing a bit shorter sequence of jumps than intended.
Signed-off-by: Alexei Starovoitov
Acked-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/test_verifier.c | 31 +++--
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/tools/testing
clean up explored_states to prep for introduction of hashtable
No functional changes.
Signed-off-by: Alexei Starovoitov
---
kernel/bpf/verifier.c | 29 -
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
Convert explored_states array into hash table and use simple hash to
reduce verifier peak memory consumption for programs with bpf2bpf calls.
More details in patch 3.
v1->v2: fixed Jakub's small nit in patch 1
Alexei Starovoitov (3):
bpf: cleanup explored_states
bpf: split explore
better vs this patch.
They can be improved in the future.
Hit/miss heuristic is not counting index miscompare as a miss.
Otherwise verifier stats become unstable when experimenting
with different hash functions.
Signed-off-by: Alexei Starovoitov
---
include/linux/bpf_verifier.h | 1 +
kernel/bpf
split explored_states into prune_point boolean mark
and link list of explored states.
This removes STATE_LIST_MARK hack and allows marks to be separate from states.
Signed-off-by: Alexei Starovoitov
---
include/linux/bpf_verifier.h | 1 +
kernel/bpf/verifier.c| 31
On 5/21/19 9:09 PM, Andrii Nakryiko wrote:
>
>> Hit/miss heuristic is not counting index miscompare as a miss.
>> Otherwise verifier stats become unstable when experimenting
>> with different hash functions.
>>
>> If insn comparison is done inside states_equal() then
>> miss > hit * 3 + 3 he
On 5/22/19 9:15 AM, Andrii Nakryiko wrote:
> It's easy to have a mismatch of "intended to be public" vs really
> exposed API functions. While Makefile does check for this mismatch, if
> it actually occurs it's not trivial to determine which functions are
> accidentally exposed. This patch dumps out
On 5/22/19 9:38 AM, Stanislav Fomichev wrote:
> On 05/21, Yonghong Song wrote:
>> This patch tries to solve the following specific use case.
>>
>> Currently, bpf program can already collect stack traces
>> through kernel function get_perf_callchain()
>> when certain events happens (e.g., cache miss
On Wed, May 22, 2019 at 01:23:27AM -0400, Kris Van Hees wrote:
>
> Userspace aside, there are various features that are not currently available
> such as retrieving the ppid of the current task, and various other data items
> that relate to the current task that triggered a probe. There are ways
On Wed, May 22, 2019 at 10:53 AM Andrii Nakryiko wrote:
>
> It's easy to have a mismatch of "intended to be public" vs really
> exposed API functions. While Makefile does check for this mismatch, if
> it actually occurs it's not trivial to determine which functions are
> accidentally exposed. This
On Wed, May 22, 2019 at 07:54:57PM +0100, Jiong Wang wrote:
> eBPF ISA specification requires high 32-bit cleared when low 32-bit
> sub-register is written. This applies to destination register of ALU32 etc.
> JIT back-ends must guarantee this semantic when doing code-gen. x86_64 and
> AArch64 ISA
On Thu, May 23, 2019 at 03:28:15PM +0100, Jiong Wang wrote:
>
> > On 23 May 2019, at 03:07, Alexei Starovoitov
> > wrote:
> >
> > On Wed, May 22, 2019 at 07:54:57PM +0100, Jiong Wang wrote:
> >> eBPF ISA specification requires high 32-bit cleared when low
On Thu, May 23, 2019 at 09:20:15PM +0100, Jiong Wang wrote:
>
> Alexei Starovoitov writes:
>
>
>
> > well, it made me realize that we're probably doing it wrong,
> > since after calling check_reg_arg() we need to re-parse insn encoding.
> > How
"poisoning" useless bits. High
> 32-bit of a definition is randomized if it is identified as not used by any
> later insn. Such randomization is only enabled under testing mode which is
> gated by the new bpf prog load flags "BPF_F_TEST_RND_HI32".
>
> Suggested-by:
On Fri, May 24, 2019 at 11:59 AM Andrii Nakryiko wrote:
>
> This patch set adds BTF-to-C dumping APIs to libbpf, allowing to output
> a subset of BTF types as a compilable C type definitions. This is useful by
> itself, as raw BTF output is not easy to inspect and comprehend. But it's also
> a big
On Fri, May 24, 2019 at 11:25:11PM +0100, Jiong Wang wrote:
> v9:
> - Split patch 5 in v8.
> make bpf uapi header file sync a separate patch. (Alexei)
9th time's a charm? ;)
Applied.
Thanks a lot for all the hard work.
It's a great milestone.
Please follow up with an optimization for bpf_p
On Fri, May 24, 2019 at 3:36 AM Quentin Monnet
wrote:
>
> libbpf was recently made aware of the log_level attribute for programs,
> used to specify the level of information expected to be dumped by the
> verifier. Function bpf_prog_load_xattr() got support for this log_level
> parameter.
>
> But s
net/ipv4/nexthop.c | 111 -
> net/ipv4/route.c | 5 +-
> net/ipv6/addrconf.c| 5 +
> net/ipv6/ip6_fib.c | 22 +-
> net/ipv6/ndisc.c
On Thu, May 30, 2019 at 8:16 AM David Ahern wrote:
>
> On 5/30/19 9:06 AM, Alexei Starovoitov wrote:
> > Huge number of core changes and zero tests.
>
> As mentioned in a past response, there are a number of tests under
> selftests that exercise the code paths affected by thi
On Thu, May 30, 2019 at 11:01 AM David Miller wrote:
>
> From: Alexei Starovoitov
> Date: Thu, 30 May 2019 08:18:10 -0700
>
> > On Thu, May 30, 2019 at 8:16 AM David Ahern wrote:
> >>
> >> On 5/30/19 9:06 AM, Alexei Starovoitov wrote:
> >>
On Thu, May 30, 2019 at 11:52 AM David Ahern wrote:
>
> On 5/30/19 12:27 PM, Alexei Starovoitov wrote:
> > On Thu, May 30, 2019 at 11:01 AM David Miller wrote:
> >>
> >> From: Alexei Starovoitov
> >> Date: Thu, 30 May 2019 08:18:10 -0700
> >>
&
On Fri, May 31, 2019 at 11:13 AM Martin Lau wrote:
>
> On Tue, May 28, 2019 at 04:59:34PM -0700, brakmo wrote:
> > This patchset adds support for propagating congestion notifications (cn)
> > to TCP from cgroup inet skb egress BPF programs.
> Acked-by: Martin KaFai Lau
Applied. Thanks
On Thu, May 30, 2019 at 1:42 PM Song Liu wrote:
>
> On Thu, May 30, 2019 at 1:23 PM Jiong Wang wrote:
> >
> > There has been quite a few progress around the two steps mentioned in the
> > answer to the following question:
> >
> > Q: BPF 32-bit subregister requirements
> >
> > This patch updates
On Fri, May 31, 2019 at 2:38 PM David Ahern wrote:
>
> On 5/31/19 3:29 PM, David Miller wrote:
> > David, can you add some supplementary information to your cover letter
> > et al. which seems to be part of what Alexei is asking for and seems
> > quite reasonable?
> >
>
> It is not clear to me wh
On Fri, May 31, 2019 at 6:37 PM Song Liu wrote:
>
>
>
> > On May 31, 2019, at 10:47 AM, Alan Maguire wrote:
> >
> > xdping allows us to get latency estimates from XDP. Output looks
> > like this:
> >
> > ./xdping -I eth4 192.168.55.8
> > Setting up XDP for eth4, please wait...
> > XDP setup disr
On Fri, May 31, 2019 at 7:59 PM David Ahern wrote:
>
> On 5/31/19 8:51 PM, Alexei Starovoitov wrote:
> > From single sentence of commit log it's not clear at all
> > whether they're related to this thread.
> > Will they fail if run w/o this set?
> >
>
flow_dissector.c
selftests/bpf: measure RTT from xdp using xdping
Alexei Starovoitov (11):
bpf: bump jmp sequence limit
selftests/bpf: adjust verifier scale test
selftests/bpf: add pyperf scale test
bpf: cleanup explored_states
bpf: split explored_states
bpf
Hi Matt,
due to this build issue I removed your commit from bpf tree.
Please fix and resubmit.
Thanks!
On Fri, May 31, 2019 at 10:48 PM kbuild test robot wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
> head: 0b21b5502f561940e0d29f7ec5f840309e4a0243
> co
On Fri, May 31, 2019 at 11:39:52PM -0700, Andrii Nakryiko wrote:
> This patch adds a new test program, based on real-world production
> application, for testing BPF verifier scalability w/ realistic
> complexity.
Thanks!
> - const char *pyperf[] = {
> + const char *tp_progs[] = {
I had v
On Fri, May 31, 2019 at 3:29 PM Martin KaFai Lau wrote:
>
> This series has fixes when running reuseport's bpf_prog for udp lookup.
> If there is reuseport's bpf_prog, the common issue is the reuseport code
> path expects skb->data pointing to the transport header (udphdr here).
> A couple of comm
On 6/3/19 6:02 PM, Stanislav Fomichev wrote:
> Do we want to lock everyone out of new libbpf features?
BTF is mandatory for _any_ new feature.
It's for introspection and debuggability in the first place.
Good debugging is not optional.
recording which shows flashing FW on a Mellanox
> Spectrum device:
> https://asciinema.org/a/247926
from api perspective it looks good to me.
Thanks!
Acked-by: Alexei Starovoitov
On Tue, Jun 4, 2019 at 4:40 AM Baruch Siach wrote:
>
> Merge commit 1c8c5a9d38f60 ("Merge
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next") undid the
> fix from commit 36f9814a494 ("bpf: fix uapi hole for 32 bit compat
> applications") by taking the gpl_compatible 1-bit field defini
On Tue, Jun 04, 2019 at 05:23:46PM +0200, Geert Uytterhoeven wrote:
> Hi Alexei,
>
> On Tue, Jun 4, 2019 at 5:17 PM Alexei Starovoitov
> wrote:
> > On Tue, Jun 4, 2019 at 4:40 AM Baruch Siach wrote:
> > > Merge commit 1c8c5a9d38f60 ("Merge
> > > git:
On Tue, Jun 4, 2019 at 7:28 PM David Miller wrote:
>
> From: David Ahern
> Date: Mon, 3 Jun 2019 20:19:48 -0700
>
> > Set 10 of 11 to improve route scalability via support for nexthops as
> > standalone objects for fib entries.
> > https://lwn.net/Articles/763950/
>
> Series applied, thanks
On Tue, Jun 4, 2019 at 9:06 PM Baruch Siach wrote:
>
> Hi Alexei,
>
> (Adding Arnd and linux-arch to Cc)
>
> On Tue, Jun 04, 2019 at 08:30:29AM -0700, Alexei Starovoitov wrote:
> > On Tue, Jun 04, 2019 at 05:23:46PM +0200, Geert Uytterhoeven wrote:
> > > On T
On Wed, Jun 5, 2019 at 5:09 PM Daniel Borkmann wrote:
>
> >> tools/bpf/bpftool/cgroup.c | 5 -
> >> tools/include/uapi/linux/bpf.h | 2 ++
> > Should the bpf.h sync to tools/ be in a separate patch?
>
> I was thinking about it, but concluded for such small change, it's not
> really worth
On Thu, Jun 6, 2019 at 8:51 AM Daniel Borkmann wrote:
>
> On 06/06/2019 03:24 PM, Toke Høiland-Jørgensen wrote:
> > From: Toke Høiland-Jørgensen
> >
> > The bpf_redirect_map() helper used by XDP programs doesn't return any
> > indication of whether it can successfully redirect to the map index it
On 6/6/19 4:02 PM, Andrii Nakryiko wrote:
>> struct {
>> int type;
>> int max_entries;
>> } my_map __attribute__((map(int,struct my_value))) = {
>> .type = BPF_MAP_TYPE_ARRAY,
>> .max_entries = 16,
>> };
>>
>> Of course this would need BPF backend support, but at
On Thu, Jun 6, 2019 at 4:49 PM Daniel Borkmann wrote:
>
> Please refer to the patch 1/6 as the main patch with the details
> on the current sendmsg hook API limitations and proposal to fix
> it in order to work with basic applications like DNS. Remaining
> patches are the usual uapi and tooling up
On 6/6/19 5:10 PM, Jakub Kicinski wrote:
> On Thu, 6 Jun 2019 23:27:36 +0000, Alexei Starovoitov wrote:
>> On 6/6/19 4:02 PM, Andrii Nakryiko wrote:
>>>> struct {
>>>> int type;
>>>> int max_entries;
>>
On 6/6/19 6:02 PM, Jakub Kicinski wrote:
> On Fri, 7 Jun 2019 00:27:52 +0000, Alexei Starovoitov wrote:
>> the solution we're discussing should solve BPF_ANNOTATE_KV_PAIR too.
>> That hack must go.
>
> I see.
>
>> If I understood your objections to Andrii
On Thu, Jul 4, 2019 at 1:53 AM Ilya Leoshkevich wrote:
>
> BPF_LDX_MEM is used to load the least significant byte of the retrieved
> test_val.index, however, on big-endian machines it ends up retrieving
> the most significant byte.
>
> Use the correct least significant byte offset on big-endian ma
On Tue, Jul 16, 2019 at 09:50:25AM +0100, Jiong Wang wrote:
>
> Let me digest a little bit and do some coding, then I will come back. Some
> issues can only shown up during in-depth coding. I kind of feel handling
> aux reference in verifier layer is the part that will still introduce some
> un-cl
On Tue, Jul 16, 2019 at 12:53:53PM +0200, Ilya Leoshkevich wrote:
> BPF_LDX_MEM is used to load the least significant byte of the retrieved
> test_val.index, however, on big-endian machines it ends up retrieving
> the most significant byte.
>
> Change the test to load the whole int in order to mak
On Tue, Jul 16, 2019 at 07:57:04AM -0700, Andrii Nakryiko wrote:
> On Tue, Jul 16, 2019 at 3:56 AM Ilya Leoshkevich wrote:
> >
> > Some setups (e.g. virtual machines) might run with hardware perf events
> > disabled. If this is the case, skip the test_send_signal_nmi test.
> >
> > Add a separate t
On Tue, Jul 16, 2019 at 10:31 AM Magnus Karlsson
wrote:
>
> On Tue, Jul 16, 2019 at 5:59 AM Andrii Nakryiko wrote:
> >
> > Similar issue was fixed in cdfc7f888c2a ("libbpf: fix GCC8 warning for
> > strncpy") already. This one was missed. Fixing now.
>
> Thanks Andrii.
>
> Acked-by: Magnus Karlsso
On Mon, Jul 15, 2019 at 3:22 PM Daniel Borkmann wrote:
>
> On 7/12/19 3:56 PM, Ilya Leoshkevich wrote:
> > When directories are used as prerequisites in Makefiles, they can cause
> > a lot of unnecessary rebuilds, because a directory is considered changed
> > whenever a file in this directory is a
On Tue, Jul 16, 2019 at 3:12 PM Jakub Kicinski
wrote:
>
> On Tue, 16 Jul 2019 09:17:03 -0700, Alexei Starovoitov wrote:
> > I don't think we have a test for such 'dead prog only due to verifier walk'
> > situation. I wonder what happens :)
>
> FWIW we do ha
On Tue, Jul 16, 2019 at 5:22 PM Andrii Nakryiko
wrote:
> > Makefile becomes hairier by the day, thx for cleaning it up a bit :-)
> >
> > > But I also don't think we need to worry about creating them, because
> > > there is always at least one test (otherwise those tests are useless
> > > anyways)
On Tue, Jul 16, 2019 at 10:42 AM Andrii Nakryiko
wrote:
>
> On Tue, Jul 16, 2019 at 5:59 AM Ilya Leoshkevich wrote:
> >
> > perf_buffer test fails for exactly the same reason test_attach_probe
> > used to fail: different nanosleep syscall kprobe name.
> >
> > Reuse the test_attach_probe fix.
> >
On Tue, Jul 16, 2019 at 09:59:26AM +0200, Eric Dumazet wrote:
>
>
> On 7/16/19 2:26 AM, Petar Penkov wrote:
> > From: Petar Penkov
> >
> > This helper function allows BPF programs to try to generate SYN
> > cookies, given a reference to a listener socket. The function works
> > from XDP and wit
On Thu, Jul 18, 2019 at 05:01:03PM +0200, Ilya Leoshkevich wrote:
> The very first check in test_pkt_md_access is failing on s390, which
> happens because loading a part of a struct __sk_buff field produces
> an incorrect result.
>
> The preprocessed code of the check is:
>
> {
> __u8 tmp =
On Thu, Jul 18, 2019 at 2:14 AM Ilya Leoshkevich wrote:
>
> This test looks up a 32-bit map element and then loads it using a 64-bit
> load. This does not work on s390, which is a big-endian machine.
>
> Since the point of this test doesn't seem to be loading a smaller value
> using a larger load,
On Wed, Jul 17, 2019 at 5:29 AM Ilya Leoshkevich wrote:
>
> test_xdp_noinline fails on s390 due to a handful of endianness issues.
> Use ntohs for parsing eth_proto.
> Replace bswaps with ntohs/htons.
>
> Signed-off-by: Ilya Leoshkevich
> Acked-by: Vasily Gorbik
Applied. Thanks
Hi David,
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) verifier precision propagation fix, from Andrii.
2) BTF size fix for typedefs, from Andrii.
3) a bunch of big endian fixes, from Ilya.
4) wide load from bpf_sock_addr fixes, from Stanislav.
On 7/19/19 12:32 PM, Andrii Nakryiko wrote:
> In case when BTF loading fails despite sanitization, but BPF object has
> .BTF.ext loaded as well, we free and null obj->btf, but not
> obj->btf_ext. This leads to an attempt to relocate .BTF.ext later on
> during bpf_object__load(), which assumes obj->
On 7/19/19 12:46 PM, Andrii Nakryiko wrote:
> If VAR in non-sanitized BTF was size less than 4, converting such VAR
> into an INT with size=4 will cause BTF validation failure due to
> violationg of STRUCT (into which DATASEC was converted) member size.
> Fix by conservatively using size=1.
>
> Si
On Tue, Jul 23, 2019 at 10:37:29AM +0100, Lorenz Bauer wrote:
> On Tue, 23 Jul 2019 at 01:20, Petar Penkov wrote:
> > +static __always_inline __s64 gen_syncookie(void *data_end, struct bpf_sock
> > *sk,
> > + void *iph, __u32 ip_size,
> > +
On Fri, Jul 19, 2019 at 2:18 AM Ilya Leoshkevich wrote:
>
> The very first check in test_pkt_md_access is failing on s390, which
> happens because loading a part of a struct __sk_buff field produces
> an incorrect result.
>
> The preprocessed code of the check is:
>
> {
> __u8 tmp = *((vol
Johnathan, Bjorn, Jakub,
Please review!
The patch set has been pending for a week.
On Tue, Jul 16, 2019 at 4:21 AM Kevin Laatz wrote:
>
> This patch set adds the ability to use unaligned chunks in the XDP umem.
>
> Currently, all chunk addresses passed to the umem are masked to be chunk
> size al
On Tue, Jul 23, 2019 at 3:15 AM Eric Dumazet wrote:
>
> First patch changes the kernel, second patch
> adds a new test.
>
> Note that other patches might be needed to take
> care of similar issues in sock_ops_convert_ctx_access()
> and SOCK_OPS_GET_FIELD()
Nice catch!
Applied to bpf tree. Thanks
On Tue, Jul 23, 2019 at 5:08 AM Ilya Maximets wrote:
>
> 'channels.max_combined' initialized only on ioctl success and
> errno is only valid on ioctl failure.
>
> The code doesn't produce any runtime issues, but makes memory
> sanitizers angry:
>
> Conditional jump or move depends on uninitialise
On 7/23/19 3:03 PM, Song Liu wrote:
>> On Jul 23, 2019, at 2:11 PM, Andrii Nakryiko wrote:
>>
>> When BPF program defines uninitialized global variable, it's put into
>> a special COMMON section. Libbpf will reject such programs, but will
>> provide very unhelpful message with garbage-looking sect
On 7/23/19 2:34 PM, Andrii Nakryiko wrote:
> There were few more tests and samples that were using custom perf buffer setup
> code from trace_helpers.h. This patch set gets rid of all the usages of those
> and removes helpers themselves. Libbpf provides nicer, but equally powerful
> set of APIs to
On Wed, Jul 24, 2019 at 10:46 PM Andrii Nakryiko wrote:
>
> Despite a proper NULL-termination after strncpy(..., ..., IFNAMSIZ - 1),
> GCC8 still complains about *expected* string truncation:
>
> xsk.c:330:2: error: 'strncpy' output may be truncated copying 15 bytes
> from a string of length 1
)
Alexei Starovoitov (1):
Merge branch 'fix-gso_segs'
Andrii Nakryiko (3):
libbpf: fix SIGSEGV when BTF loading fails, but .BTF.ext exists
libbpf: sanitize VAR to conservative 1-byte INT
libbpf: silence GCC8 warning about string truncation
Arnaldo Carvalho
On Thu, Jul 25, 2019 at 08:33:36AM -0700, Stanislav Fomichev wrote:
> C flow dissector supports input flags that tell it to customize parsing
> by either stopping early or trying to parse as deep as possible. Pass
> those flags to the BPF flow dissector so it can make the same
> decisions. In the n
On Wed, Jul 24, 2019 at 12:27:34PM -0700, Andrii Nakryiko wrote:
> This patch implements the core logic for BPF CO-RE offsets relocations.
> All the details are described in code comments.
>
> Signed-off-by: Andrii Nakryiko
> ---
> tools/lib/bpf/libbpf.c | 866 +++
On Wed, Jul 24, 2019 at 12:27:38PM -0700, Andrii Nakryiko wrote:
> Add tests for various array handling/relocation scenarios.
>
> Signed-off-by: Andrii Nakryiko
...
> +
> +#define CORE_READ(dst, src) \
> + bpf_probe_read(dst, sizeof(*src), __builtin_preserve_access_index(src))
This is the ke
On Tue, Jul 23, 2019 at 5:07 PM Allan Zhang wrote:
>
> Software event output is only enabled by a few prog types right now (TC,
> LWT out, XDP, sockops). Many other skb based prog types need
> bpf_skb_event_output to produce software event.
>
> More prog types are enabled to access bpf_skb_event_o
On Thu, Jul 25, 2019 at 3:52 PM Stanislav Fomichev wrote:
>
> C flow dissector supports input flags that tell it to customize parsing
> by either stopping early or trying to parse as deep as possible.
> BPF flow dissector always parses as deep as possible which is sub-optimal.
> Pass input flags t
On Thu, Jul 25, 2019 at 6:24 PM Brian Vazquez wrote:
>
> On Thu, Jul 25, 2019 at 4:54 PM Alexei Starovoitov
> wrote:
> >
> > On Thu, Jul 25, 2019 at 04:25:53PM -0700, Brian Vazquez wrote:
> > > > > > If prev_key is deleted before map_get_next_k
On Fri, Jul 26, 2019 at 2:25 PM Andrii Nakryiko wrote:
>
> Libbpf stores associated BTF FD per each instance of bpf_program. When
> program is unloaded, that FD is closed. This is wrong, because leads to
> a race and possibly closing of unrelated files, if application
> simultaneously opens new fi
On Fri, Jul 26, 2019 at 02:47:28PM -0700, Andrii Nakryiko wrote:
> On Fri, Jul 26, 2019 at 2:28 PM Stanislav Fomichev wrote:
> >
> > On 07/26, Andrii Nakryiko wrote:
> > > libbpf_swap_print allows to restore previously set print function.
> > > This is useful when running many independent test wit
On Fri, Jul 26, 2019 at 03:26:52PM -0700, Stanislav Fomichev wrote:
> On 07/26, Andrii Nakryiko wrote:
> > On Fri, Jul 26, 2019 at 2:31 PM Stanislav Fomichev wrote:
> > >
> > > On 07/26, Andrii Nakryiko wrote:
> > > > This patch changes how test output is printed out. By default, if test
> > > > h
On Fri, Jul 26, 2019 at 2:19 PM Sedat Dilek wrote:
>
> On Fri, Jul 26, 2019 at 11:10 PM Yonghong Song wrote:
> >
> >
> >
> > On 7/26/19 2:02 PM, Sedat Dilek wrote:
> > > On Fri, Jul 26, 2019 at 10:38 PM Sedat Dilek
> > > wrote:
> > >>
> > >> Hi Yonghong Song,
> > >>
> > >> On Fri, Jul 26, 2019
On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen wrote:
>
> This series adds a new map type, devmap_hash, that works like the existing
> devmap type, but using a hash-based indexing scheme. This is useful for the
> use
> case where a devmap is indexed by ifindex (for instance for use with t
On 7/26/19 11:25 PM, Andrii Nakryiko wrote:
>>> + } else if (class == BPF_ST && BPF_MODE(insn->code) == BPF_MEM) {
>>> + if (insn->imm != orig_off)
>>> + return -EINVAL;
>>> + insn->imm = new_off;
>>> + pr_debug("prog '%s': patched insn #%
On Sat, Jul 27, 2019 at 12:02 PM Andrii Nakryiko wrote:
>
> This patch set makes a number of changes to test_progs selftest, which is
> a collection of many other tests (and sometimes sub-tests as well), to provide
> better testing experience and allow to start convering many individual test
> pro
On Sat, Jul 27, 2019 at 8:25 PM Andrii Nakryiko wrote:
>
> This patch set makes a number of changes to test_progs selftest, which is
> a collection of many other tests (and sometimes sub-tests as well), to provide
> better testing experience and allow to start convering many individual test
> prog
Hey Folks,
August 2nd deadline to submit a proposal for BPF uconf
is quickly approaching.
If you're attending LPC in Lisbon and interested
in awesome BPF uconf you need to submit a proposal.
Some of you already submitted them to lpc-bpf@vger
per instructions that were sent back on July 12.
Some p
On Mon, Jul 29, 2019 at 09:59:12AM -0700, Petar Penkov wrote:
> From: Petar Penkov
>
> This patch series introduces a BPF helper function that allows generating SYN
> cookies from BPF. Currently, this helper is enabled at both the TC hook and
> the
> XDP hook.
>
> The first two patches in the s
On Fri, Jul 26, 2019 at 7:26 PM Alexei Starovoitov
wrote:
>
> On Fri, Jul 26, 2019 at 9:06 AM Toke Høiland-Jørgensen
> wrote:
> >
> > This series adds a new map type, devmap_hash, that works like the existing
> > devmap type, but using a hash-based indexing sch
On Tue, Jul 30, 2019 at 03:59:15PM -0700, Jakub Kicinski wrote:
> On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote:
> > Currently, bpftool net only supports dumping progs loaded on the
> > interface. To load XDP prog on interface, user must use other tool
> > (eg. iproute2). By this patch, w
On Tue, Jul 30, 2019 at 05:07:25PM -0700, Jakub Kicinski wrote:
> On Tue, 30 Jul 2019 16:17:56 -0700, Alexei Starovoitov wrote:
> > On Tue, Jul 30, 2019 at 03:59:15PM -0700, Jakub Kicinski wrote:
> > > On Wed, 31 Jul 2019 03:48:19 +0900, Daniel T. Lee wrote:
> > > &g
1 - 100 of 4471 matches
Mail list logo