info such
that the user can get the xlated line_info back (i.e. the line_info
with its insn_off reflecting the translated prog). The jited_line_info
is available if the prog is jited. It is an array of __u64.
If the prog is not jited, jited_line_info_cnt is 0.
The verifier's verbose log with line_info
ail out.
3) BPF_PROG_LOAD a prog with line_info
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/lib/bpf/bpf.c| 86 +++--
tools/lib/bpf/bpf.h| 3 +
tools/lib/bpf/btf.c| 209 +
tools/lib/bpf/btf.h| 10 +-
too
Sync uapi bpf.h to tools/include/uapi/linux for
the new bpf_line_info.
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/include/uapi/linux/bpf.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux
n rec_size check should be < 8 instead of < 4.
Fixes: 4798c4ba3ba9 ("tools/bpf: extends test_btf to test load/retrieve
func_type info")
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/testing/selftests/bpf/test_btf.c | 211 +++--
1 file c
%rbx
74: mov0x8(%rbp),%r13
78: mov0x10(%rbp),%r14
7c: mov0x18(%rbp),%r15
80: add$0x28,%rbp
84: leaveq
85: retq
[...]
Martin KaFai Lau (7):
bpf: Add bpf_line_info support
bpf: tools: Sync uapi bpf.h
bpf: Refactor and bug fix in test_func_type in test_bt
selftests/bpf/test_btf_haskv.c
line_num:54 line_col:2]
2a: xor%eax,%eax
2c: mov0x0(%rbp),%rbx
30: mov0x8(%rbp),%r13
34: mov0x10(%rbp),%r14
38: mov0x18(%rbp),%r15
3c: add$0x28,%rbp
40: leaveq
41: retq
[...]
Signed-off-by: Martin KaFai L
raw test[12] (line_info (subprog. missing 2nd func line info)): OK
BTF prog info raw test[13] (line_info (subprog. unordered insn offset)): OK
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/testing/selftests/bpf/test_btf.c | 597 -
1 file changed, 58
func_info" from btf.h to btf.c.
There is no external usage outside btf.c.
Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections")
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/lib/bpf/bpf.c| 7 +-
tools/lib/bpf/btf.c| 191 +++
prog->aux->btf is not NULL only if prog->aux->func_info_cnt > 0.
Breaking up info.btf_id from prog->aux->func_info_cnt is needed
for the later line info patch anyway.
A similar change is made to bpf_get_prog_name().
Fixes: 838e96904ff3 ("bpf: Introduce bp
Similar to info.jited_*, info.func_info could be 0 if
bpf_dump_raw_ok() == false.
This patch makes changes to test_btf and bpftool to expect info.func_info
could be 0.
This patch also makes the needed changes for s/insn_offset/insn_off/.
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
means "offset" (e.g. name_off in "struct btf_type").
The to-be-added "struct bpf_line_info" also has another
member, "insn_off" which is the same as the "insn_offset"
in "struct bpf_func_info". Hence, this patch renames "insn_offset"
to "i
This patch sync the name changes in bpf_func_info to
the tools/.
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/include/uapi/linux/bpf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index
The patchset has a few improvements on bpf_func_info:
1. Improvements on the behaviors of info.func_info, info.func_info_cnt
and info.func_info_rec_size.
2. Name change: s/insn_offset/insn_off/
Please see individual patch for details.
Martin KaFai Lau (4):
bpf: Improve the info.func_info
The aux->func_info and aux->btf are leaked in the error out cases
during bpf_prog_load(). This patch fixes it.
Fixes: ba64e7d85252 ("bpf: btf: support proper non-jit func info")
Cc: Yonghong Song
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
kernel/bpf/syscall.
From: Yonghong Song
Add additional checks in tools/testing/selftests/bpf and
samples/bpf such that if clang/llvm compiler can generate
BTF sections, do not use pahole.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
samples/bpf/Makefile | 8
tools
):
bpf_prog_89d64e4abf0f0126_test_long_fname_2:
0: push %rbp
1: mov%rsp,%rbp
..
80: add$0x28,%rbp
84: leaveq
85: retq
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
tools/bpf/bpftool/btf_dumper.c| 136
into the
kernel, and the .BTF.ext section cannot. The loader
may need to do some relocation and merging,
similar to merging multiple code sections, before
loading into the kernel.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/bpf.c| 46 ++-
tools/lib/bpf/btf.c
KaFai Lau
---
tools/bpf/bpftool/map.c | 68 ++--
tools/lib/bpf/btf.c | 69 +
tools/lib/bpf/btf.h | 1 +
3 files changed, 72 insertions(+), 66 deletions(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool
The kernel uapi btf.h is synced to the tools directory.
Signed-off-by: Martin KaFai Lau
Signed-off-by: Yonghong Song
---
tools/include/uapi/linux/btf.h | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi
member_name length for validity test.
. Removed/changed several verifier messages.
. Modified several commit messages to remove line_off reference.
Martin KaFai Lau (4):
bpf: btf: Break up btf_type_is_void()
bpf: btf: Add BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO
tools/bpf: Sync kernel btf.
This patch adds unit tests for BTF_KIND_FUNC_PROTO and
BTF_KIND_FUNC to test_btf.
Signed-off-by: Martin KaFai Lau
Signed-off-by: Yonghong Song
---
tools/lib/bpf/btf.c| 4 +
tools/testing/selftests/bpf/test_btf.c | 474 -
2 files changed, 476
From: Yonghong Song
Change the bpf programs test_btf_haskv.c and test_btf_nokv.c to
have two sections, and enhance test_btf.c test_file feature
to test btf func_info returned by the kernel.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf
learn the function signature of
a running bpf program.
Signed-off-by: Martin KaFai Lau
Signed-off-by: Yonghong Song
---
include/uapi/linux/btf.h | 18 +-
kernel/bpf/btf.c | 389 ++-
2 files changed, 354 insertions(+), 53 deletions(-)
diff --git a/include/uapi
are also added to test loading/retriving
of func_type info.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/test_btf.c | 332 -
1 file changed, 329 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf
in bpf_prog_info, userspace can also
print out function prototypes for each jited function.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
include/linux/bpf.h | 5 +-
include/linux/bpf_verifier.h | 1 +
include/linux/btf.h | 2 +
include/uapi/linux/bpf.h | 13
From: Yonghong Song
The kernel uapi bpf.h is synced to tools directory.
Signed-off-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
tools/include/uapi/linux/bpf.h | 13 +
1 file changed, 13 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux
-by: Martin KaFai Lau
---
tools/lib/bpf/bpf.c | 4
tools/lib/bpf/bpf.h | 4
2 files changed, 8 insertions(+)
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 03f9bcc4ef50..06fc5e91ac51 100644
--- a/tools/lib/bpf/bpf.c
+++ b/tools/lib/bpf/bpf.c
@@ -196,6 +196,10 @@ int
This patch breaks up btf_type_is_void() into
btf_type_is_void() and btf_type_is_fwd().
It also adds btf_type_nosize() to better describe it is
testing a type has nosize info.
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 37 ++---
1 file changed, 22
ailure in bpf_object__pin")
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/libbpf.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index e827542ffa3a..a01eb9584e52 100644
--- a/tools/lib/bpf/libbpf.
new section would be added later.
This patch fixes it.
Fixes: f80442a4cd18 ("bpf: btf: Change how section is supported in btf_header")
Reported-by: Dmitry Vyukov
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ker
On Tue, Sep 11, 2018 at 06:40:05PM +0200, Dmitry Vyukov wrote:
> Hi Martin,
>
> I am looking at the subj commit:
>
> static int btf_add_type(struct btf_verifier_env *env, struct btf_type *t)
> @@ -1754,9 +1756,9 @@ static int btf_check_all_metas(struct
> btf_verifier_env *env)
> struct
On Fri, Aug 10, 2018 at 09:55:35AM +0200, Daniel Borkmann wrote:
> On 08/10/2018 04:13 AM, Alexei Starovoitov wrote:
> > On Fri, Aug 10, 2018 at 12:43:20AM +0200, Daniel Borkmann wrote:
> >> On 08/09/2018 11:44 PM, Alexei Starovoitov wrote:
> >>> On Thu, Aug 09, 2018 at 11:30:52PM +0200, Daniel
ray
The test depends on
commit 3eee1f75f2b9 ("bpf: fix bpf_skb_load_bytes_relative pkt length check")
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/bpf.c | 1 +
tools/lib/bpf/bpf.h | 1 +
tools/test
lected (i.e. "reuse_kern->selected_sk != NULL").
If it does , it will use the selected sk. If not, the kernel
will select one from "reuse->socks[]" (as before this patch).
The SK_DROP and SK_PASS handling logic will be in the next patch.
Signed-off-by: Martin KaFai Lau
Ac
if any of the
reuse->socks[] is added to the newly introduced
"BPF_MAP_TYPE_REUSEPORT_ARRAY" map.
If "BPF_MAP_TYPE_REUSEPORT_ARRAY" is not used, the changes in this
patch is a no-op.
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
include/net/so
This patch adds tests for the new BPF_MAP_TYPE_REUSEPORT_SOCKARRAY.
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
tools/lib/bpf/libbpf.c | 1 +
tools/testing/selftests/bpf/test_maps.c | 262 +++-
2 files changed, 262 insertions(+), 1
future.
Hence, reuseport_array supports both value_size 4 and 8, and
assuming user will usually use value_size=4. The syscall's lookup
will return ENOSPC on value_size=4. It will will only
return 64bits value from sock_gen_cookie() when user consciously
choose value_size=8 (as a signal
This patch refactors the ARRAY_SIZE macro to bpf_util.h.
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
tools/testing/selftests/bpf/bpf_util.h | 4
tools/testing/selftests/bpf/test_align.c | 5 +
tools/testing/selftests/bpf/test_btf.c | 5 +
tools
he usual "bpf_prog_charge_memlock()" during load time
instead of bounded by both bpf_prog_charge_memlock and sysctl_optmem_max.
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
include/linux/filter.h | 1 +
include/net/sock_reuseport.h | 3 +-
net/core/filter.c
This patch sync include/uapi/linux/bpf.h to
tools/include/uapi/linux/
Signed-off-by: Martin KaFai Lau
Acked-by: Alexei Starovoitov
---
tools/include/uapi/linux/bpf.h | 37 +-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
euseport_cb are tested for SO_REUSEPORT usage.
Update on "synq_overflow_ts" happens at roughly once
every second.
A synflood test was done with a 16 rx-queues and 16 reuseport sockets.
No meaningful performance change is observed. Before and
after the change is ~9Mpps in IPv4.
Cc:
;
Please see individual patch for details
Martin KaFai Lau (9):
tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket
net: Add ID (if needed) to sock_reuseport and expose reuseport_lock
bpf: Introduce BPF_MAP_TYPE_REUSEPORT_SOCKARRAY
bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT
bpf: Enabl
This patch changes the tools/lib/bpf/btf.[ch] to LGPL which
is inline with libbpf also.
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c | 2 +-
tools/lib/bpf/btf.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index
aymap")
Suggested-by: Yonghong Song
Acked-by: Yonghong Song
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/arraymap.c | 2 +-
tools/testing/selftests/bpf/test_btf.c | 86 +-
2 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/kernel/b
On Wed, Jul 25, 2018 at 12:36:45PM +, Mathieu Xhonneux wrote:
> The seg6local LWT provides the End.DT6 action, which allows to
> decapsulate an outer IPv6 header containing a Segment Routing Header
> (SRH), full specification is available here:
>
>
On Thu, Jul 26, 2018 at 12:09:50AM +0900, Taehee Yoo wrote:
> rhashtable_lookup() can return NULL. so that NULL pointer
> check routine should be added.
>
> Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY")
> Signed-off-by: Taehee Yoo
Acked-by: Martin KaFai Lau
>
On Wed, Jul 25, 2018 at 01:38:44PM -0700, Martin KaFai Lau wrote:
> On Thu, Jul 26, 2018 at 01:30:39AM +0900, Taeung Song wrote:
> > To smoothly test BTF supported binary on samples/bpf,
> > let samples/bpf/Makefile probe llc, pahole and
> > llvm-objcopy for BPF support and us
a1b6c3efc ("bpf: btf:
> Add BTF tests")
>
> Cc: Martin KaFai Lau
> Signed-off-by: Taeung Song
Thanks for the patch. LGTM.
Acked-by: Martin KaFai Lau
> ---
> samples/bpf/Makefile | 21 -
> 1 file changed, 20 insertions(+), 1 deletion(-)
&g
he future.
> > > > Currently for bpf binary that have .BTF section,
> > > > we need to use pahole from https://github.com/iamkafai/pahole/tree/btf
> > > > with the command line such as "pahole -J bpf_prog.o".
> > > > I think it is great
On Tue, Jul 24, 2018 at 02:51:42PM +0530, Naresh Kamboju wrote:
> Deadlock warning on x86 machine while testing selftests: bpf:
> test_progs and running linux next 4.18.0-rc3-next-20180705 and still
> happening on 4.18.0-rc5-next-20180720.
>
> Any one noticed this kernel warning about deadlock ?
On Tue, Jul 24, 2018 at 04:59:54PM +, Mathieu Xhonneux wrote:
> The seg6local LWT provides the End.DT6 action, which allows to
> decapsulate an outer IPv6 header containing a Segment Routing Header
> (SRH), full specification is available here:
>
>
This patch sync the uapi btf.h to tools/
Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
---
tools/include/uapi/linux/btf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
This patch replaces [u]int32_t and [u]int64_t usage with
__[su]32 and __[su]64. The same change goes for [u]int16_t
and [u]int8_t.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf
;' check on container_type
in bpf_map_find_btf_info().
- Expose the existing static btf_type_by_id() instead of
creating a new one.
Martin KaFai Lau (3):
bpf: btf: Sync uapi btf.h to tools
bpf: Replace [u]int32_t and [u]int64_t in libbpf
bpf: Introduce BPF_ANNOTATE_KV_PAIR
tools/include/ua
and
btf_value_type_id from a map's name.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Suggested-by: Daniel Borkmann
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c | 7 +-
tools/lib/bpf/btf.h | 2 +
tools/lib/bp
On Mon, Jul 23, 2018 at 11:04:34AM -0700, Yonghong Song wrote:
>
>
> On 7/21/18 11:20 AM, Martin KaFai Lau wrote:
> > This patch replaces [u]int32_t and [u]int64_t usage with
> > __[su]32 and __[su]64. The same change goes for [u]int16_t
> > and [u]int8_t.
> &g
On Mon, Jul 23, 2018 at 11:31:43AM -0700, Yonghong Song wrote:
>
>
> On 7/21/18 11:20 AM, Martin KaFai Lau wrote:
> > This patch introduces BPF_ANNOTATE_KV_PAIR to signal the
> > bpf loader about the btf key_type and value_type of a bpf map.
> > Please refer to the
ut still exists
> in the rcu grace period. Holding reference to it could cause double
> free and crash the kernel.
>
> This patch adds a new function fib6_info_hold_safe() and replace
> fib6_info_hold() in all necessary places.
Acked-by: Martin KaFai Lau
g static btf_type_by_id() instead of
creating a new one.
Martin KaFai Lau (3):
bpf: btf: Sync uapi btf.h to tools
bpf: Replace [u]int32_t and [u]int64_t in libbpf
bpf: Introduce BPF_ANNOTATE_KV_PAIR
tools/include/uapi/linux/btf.h | 2 +-
tools/lib/bpf/btf.c
This patch replaces [u]int32_t and [u]int64_t usage with
__[su]32 and __[su]64. The same change goes for [u]int16_t
and [u]int8_t.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c| 28 +---
and
btf_value_type_id from a map's name.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Suggested-by: Daniel Borkmann
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c | 7 +-
tools/lib/bpf/btf.h | 2 +
tools/lib/bp
This patch sync the uapi btf.h to tools/
Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h
Signed-off-by: Martin KaFai Lau
---
tools/include/uapi/linux/btf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi
On Fri, Jul 20, 2018 at 06:39:33PM -0700, Martin KaFai Lau wrote:
> This patch introduces BPF_ANNOTATE_KV_PAIR to signal the
> bpf loader about the btf key_type and value_type of a bpf map.
> Please refer to the changes in test_btf_haskv.c for its usage.
> Both iproute2 and l
and
btf_value_type_id from a map's name.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Suggested-by: Daniel Borkmann
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c | 8 +++
tools/lib/bpf/btf.h | 1 +
tools/lib/bp
This patch replaces [u]int32_t and [u]int64_t usage with
__[su]32 and __[su]64. The same change goes for [u]int16_t
and [u]int8_t.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Signed-off-by: Martin KaFai Lau
---
tools/lib/bpf/btf.c| 28 +---
This patch sync the uapi btf.h to tools/
Fixes: 36fc3c8c282c bpf: btf: Clean up BTF_INT_BITS() in uapi btf.h
Signed-off-by: Martin KaFai Lau
---
tools/include/uapi/linux/btf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/btf.h b/tools/include/uapi
consistent way to figure out the btf_key_type_id and
btf_value_type_id for a map.
The first two patches are some prep/cleanup works.
The last patch introduces BPF_ANNOTATE_KV_PAIR.
Martin KaFai Lau (3):
bpf: btf: Sync uapi btf.h to tools
bpf: Replace [u]int32_t and [u]int64_t in libbpf
bpf
69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Martin KaFai Lau
---
kernel/bpf/btf.c | 14 -
tools/testing/selftests/bpf/test_btf.c | 28 ++
2 files changed, 41 insertions(+), 1 deletion(-)
diff --g
On Sat, Jul 21, 2018 at 01:04:45AM +0900, Taehee Yoo wrote:
> rhashtable_lookup() can return NULL. so that NULL pointer
> check routine should be added.
>
> Fixes: 02b55e5657c3 ("xdp: add MEM_TYPE_ZERO_COPY")
> Signed-off-by: Taehee Yoo
> ---
> net/core/xdp.c | 3 ++-
> 1 file changed, 2
n the future.
Fixes: c0fa1b6c3efc ("bpf: btf: Add BTF tests")
Signed-off-by: Martin KaFai Lau
---
tools/testing/selftests/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
index 7a6
())
path stays as is to deal with invalid BTF situation.
Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Martin KaFai Lau
---
include/uapi/linux/btf.h | 2 +-
kernel/bpf/btf.c | 16 ++--
2 files changed, 11 insertions(+), 7 deletions(-)
On Thu, Jul 19, 2018 at 05:43:11PM +0200, Daniel Borkmann wrote:
> On 07/19/2018 02:11 AM, Martin KaFai Lau wrote:
> > On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote:
> >> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote:
> >>> On 07/18/2018 1
On Wed, Jul 18, 2018 at 11:13:37AM -0700, Jakub Kicinski wrote:
> On Wed, 18 Jul 2018 11:33:22 +0200, Daniel Borkmann wrote:
> > On 07/18/2018 10:42 AM, Daniel Borkmann wrote:
> > > On 07/18/2018 02:27 AM, Jakub Kicinski wrote:
> > >> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote:
On Tue, Jul 17, 2018 at 05:27:43PM -0700, Jakub Kicinski wrote:
> On Wed, 18 Jul 2018 01:31:22 +0200, Daniel Borkmann wrote:
> > # bpftool map dump id 386
> >[{
> > "key": 0,
> > "value": {
> > "": {
> > "value": 0,
> > "ifindex":
t;: 4,
> "bytes_value": 20,
> "max_entries": 40,
> "bytes_memlock": 4096
> }
> ]
>
> Signed-off-by: Daniel Borkmann
Acked-by: Martin KaFai Lau
l map/hash references to a
> sock when the sock is closed)
>
> Reported-by: syzbot+0ce137753c78f7b6a...@syzkaller.appspotmail.com
> Fixes: 81110384441a ("bpf: sockmap, add hash map support")
> Signed-off-by: John Fastabend
Acked-by: Martin KaFai Lau
On Fri, Jun 22, 2018 at 08:21:44AM -0700, John Fastabend wrote:
> First in tcp_close, reduce scope of sk_callback_lock() the lock is
> only needed for protecting maps list the ingress and cork
> lists are protected by sock lock. Having the lock in wider scope is
> harmless but may confuse the
t;
> To fix this create two list handlers one for sockmap and one for
> sockhash.
>
> Reported-by: syzbot+0ce137753c78f7b6a...@syzkaller.appspotmail.com
> Fixes: 81110384441a ("bpf: sockmap, add hash map support")
> Signed-off-by: John Fastabend
One nit. Other tha
rt")
> Reported-by: syzbot+5c063698bdbfac19f...@syzkaller.appspotmail.com
> Signed-off-by: John Fastabend
> Signed-off-by: Wei Wang
Acked-by: Martin KaFai Lau
> ---
> kernel/bpf/sockmap.c | 58
> +-
> 1 file changed, 48 insertions(+), 10 dele
e fib result for unicast routes must have an egress device, so remove
> the check that it is non-NULL.
Acked-by: Martin KaFai Lau
>
> Signed-off-by: David Ahern
> ---
> v2
> - drop BPF_FIB_LKUP_RET_NO_NHDEV; check in dev in fib result not needed
> - enhance documentation
On Tue, Jun 19, 2018 at 02:16:53PM -0600, David Ahern wrote:
> On 6/19/18 10:36 AM, Martin KaFai Lau wrote:
> > On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote:
> >> On 6/19/18 9:25 AM, Martin KaFai Lau wrote:
> >>> On Mon, Jun 18, 2018 at 03:35
On Tue, Jun 19, 2018 at 09:34:28AM -0600, David Ahern wrote:
> On 6/19/18 9:25 AM, Martin KaFai Lau wrote:
> > On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote:
> >> On 6/18/18 2:55 PM, Martin KaFai Lau wrote:
> >>>> /* rc > 0 case
On Mon, Jun 18, 2018 at 03:35:25PM -0600, David Ahern wrote:
> On 6/18/18 2:55 PM, Martin KaFai Lau wrote:
> >>/* rc > 0 case */
> >>switch(rc) {
> >>case BPF_FIB_LKUP_RET_BLACKHOLE:
> >>case BPF_FIB_LKUP_RET_UNREACHAB
On Mon, Jun 18, 2018 at 07:50:19AM -0700, John Fastabend wrote:
> On 06/14/2018 05:18 PM, Martin KaFai Lau wrote:
> > On Thu, Jun 14, 2018 at 09:44:52AM -0700, John Fastabend wrote:
> >> Per the note in the TLS ULP (which is actually a generic statement
> >> regarding
On Mon, Jun 18, 2018 at 12:27:07PM -0600, David Ahern wrote:
> On 6/18/18 12:11 PM, Martin KaFai Lau wrote:
> > On Sun, Jun 17, 2018 at 08:18:19AM -0700, dsah...@kernel.org wrote:
> >> From: David Ahern
> >>
> >> For ACLs implemented using either FIB rules
On Sun, Jun 17, 2018 at 08:18:19AM -0700, dsah...@kernel.org wrote:
> From: David Ahern
>
> For ACLs implemented using either FIB rules or FIB entries, the BPF
> program needs the FIB lookup status to be able to drop the packet.
Except BPF_FIB_LKUP_RET_SUCCESS and BPF_FIB_LKUP_RET_NO_NEIGH, can
in the
> destructor we call bpf_prog_free_deferred() on the main prog where we
> try to bpf_prog_unlock_free() the program, and since we go via
> bpf_prog_select_runtime() do that as well.
>
> Reported-by: syzbot+3b889862e65a98317...@syzkaller.appspotmail.com
> Reported-by: syzbot+
; done under jit_subprogs(). Add proper API to make BPF kallsyms deletion
> more clear and fix that.
>
> Fixes: 1c2a088a6626 ("bpf: x64: add JIT support for multi-function programs")
> Signed-off-by: Daniel Borkmann
Acked-by: Martin KaFai Lau
> ---
> include/linu
On Fri, Jun 15, 2018 at 08:23:14AM -0700, John Fastabend wrote:
> On 06/14/2018 10:41 PM, Martin KaFai Lau wrote:
> > On Thu, Jun 14, 2018 at 09:44:57AM -0700, John Fastabend wrote:
> >> First in tcp_close, reduce scope of sk_callback_lock() the lock is
> >>
ror now. Fix the test to avoid adding sockets in listening state.
>
> Signed-off-by: John Fastabend
Acked-by: Martin KaFai Lau
> ---
> 0 files changed
>
> diff --git a/tools/testing/selftests/bpf/test_maps.c
> b/tools/testing/selftests/bpf/test_maps.c
> index 6c25334..
t;)
> Signed-off-by: John Fastabend
Acked-by: Martin KaFai Lau
> ---
> 0 files changed
>
> diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
> index ffc5152..77fe204 100644
> --- a/kernel/bpf/sockmap.c
> +++ b/kernel/bpf/sockmap.c
> @@ -2518,6 +2518,7 @@ struct s
ing the sock.
>
> To do this add unhash hook and remove sock from map there.
>
> Reported-by: Eric Dumazet
> Fixes: 81110384441a ("bpf: sockmap, add hash map support")
> Signed-off-by: John Fastabend
LGTM. One nit.
Acked-by: Martin KaFai Lau
> ---
> 0 files ch
On Thu, Jun 14, 2018 at 09:44:57AM -0700, John Fastabend wrote:
> First in tcp_close, reduce scope of sk_callback_lock() the lock is
> only needed for protecting smap_release_sock() the ingress and cork
> lists are protected by sock lock. Having the lock in wider scope is
> harmless but may
On Thu, Jun 14, 2018 at 09:44:52AM -0700, John Fastabend wrote:
> Per the note in the TLS ULP (which is actually a generic statement
> regarding ULPs)
>
> /* The TLS ulp is currently supported only for TCP sockets
> * in ESTABLISHED state.
> * Supporting sockets in LISTEN state will require
On Thu, Jun 14, 2018 at 09:44:46AM -0700, John Fastabend wrote:
> This fixes a crash where we assign tcp_prot to IPv6 sockets instead
> of tcpv6_prot.
>
> Previously we overwrote the sk->prot field with tcp_prot even in the
> AF_INET6 case. This patch ensures the correct tcp_prot and tcpv6_prot
>
On Thu, Jun 14, 2018 at 05:01:06AM -0700, William Tu wrote:
> Make the printting of bpf xfrm tunnel better and
> cleanup xfrm state and policy when xfrm test finishes.
LGTM. The subject tag actually meant s/bpf-net/bpf-next/?
It makes sense to be in bpf-next but I think bpf-next is still closed.
On Thu, Jun 14, 2018 at 12:03:34PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > > 1. The tools/testing/selftests/bpf/Makefile has the CLANG_FLAGS and
> > > > >LLC_FLAGS needed to compile the bpf prog. It requires a new
> > > > >"-mattr=dwarf" llc option which was added to the future
>
On Wed, Jun 13, 2018 at 10:50:14AM -0700, John Fastabend wrote:
> After adding checks to ensure TCP is in ESTABLISHED state when a
> sock is added we need to also ensure that user does not transition
> through tcp_disconnect() and back into ESTABLISHED state without
> sockmap removing the sock.
>
On Tue, Jun 12, 2018 at 05:41:26PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jun 12, 2018 at 05:31:24PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu:
> > > On Thu, Jun 07, 2018 at 04:30:29PM -0300, Arnald
On Mon, Jun 11, 2018 at 02:02:54AM +0300, Julian Anastasov wrote:
> IPVS setups with local client and remote tunnel server need
> to create exception for the local virtual IP. What we do is to
> change PMTU from 64KB (on "lo") to 1460 in the common case.
>
> Sugge
1 - 100 of 724 matches
Mail list logo