On Wed, Aug 15, 2018 at 8:47 AM, Y Song wrote:
> On Wed, Aug 15, 2018 at 7:57 AM, Jesper Dangaard Brouer
> wrote:
>> It is common XDP practice to unload/deattach the XDP bpf program,
>> when the XDP sample program is Ctrl-C interrupted (SIGINT) or
>> killed (SIGTERM
ple program
> xdp_redirect_cpu")
> Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to
> xdp_rxq_info")
> Reported-by: Jean-Tsung Hsiao
> Signed-off-by: Jesper Dangaard Brouer
Acked-by: Yonghong Song
> ---
> samples/bpf/xdp_redirect_cpu_u
e72317008eef84a2...@syzkaller.appspotmail.com
Fixes: 394e40a29788 ("bpf: extend bpf_prog_array to store pointers to the
cgroup storage")
Cc: Roman Gushchin
Signed-off-by: Yonghong Song
---
kernel/bpf/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/core.c
On 8/10/18 10:35 PM, Andrey Ignatov wrote:
Add selftests for bpf_skb_ancestor_cgroup_id helper.
test_skb_cgroup_id.sh prepares testing interface and adds tc qdisc and
filter for it using BPF object compiled from test_skb_cgroup_id_kern.c
program.
BPF program in test_skb_cgroup_id_kern.c
s and lpm.
>
> Signed-off-by: Daniel Borkmann
> Acked-by: Alexei Starovoitov
Thanks for the fix. Looks good to me.
For bpftool, BTF pretty print support is missing
for per-cpu maps. bpffs print for per-cpu hash/array maps
need to be added as well. Will add them later.
Acked-by: Yonghong Song
"flags": 0,
"vip_num": 0
}
}
]
Signed-off-by: Daniel Borkmann
Cc: Yonghong Song
LGTM. Thanks!
Acked-by: Yonghong Song
On 8/9/18 10:02 AM, Daniel Borkmann wrote:
On 08/09/2018 06:55 PM, Yonghong Song wrote:
On 8/9/18 8:59 AM, Daniel Borkmann wrote:
On 08/09/2018 05:15 PM, Yonghong Song wrote:
On 8/9/18 7:24 AM, Daniel Borkmann wrote:
On 08/09/2018 05:55 AM, Yonghong Song wrote:
On 8/8/18 7:25 PM, Alexei
On 8/9/18 8:59 AM, Daniel Borkmann wrote:
On 08/09/2018 05:15 PM, Yonghong Song wrote:
On 8/9/18 7:24 AM, Daniel Borkmann wrote:
On 08/09/2018 05:55 AM, Yonghong Song wrote:
On 8/8/18 7:25 PM, Alexei Starovoitov wrote:
On Wed, Aug 08, 2018 at 06:25:19PM -0700, Yonghong Song wrote
6ca7c982cb5 ("bpf: btf: Add pretty print support to the basic
arraymap")
Acked-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
kernel/bpf/inode.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index 76efe9a1
int count_a;
int count_b;
};
cat /sys/fs/bpf/pinned_hash_map:
87907: {87907,87908}
57354: {37354,57355}
76625: {76625,76626}
...
Signed-off-by: Yonghong Song
---
kernel/bpf/hashtab.c | 44
1 file changed, 44
l elements in the hash table will be traversed.
Patch #2 implemented map_seq_show_elem() and map_check_btf()
callback functions for hash and lru hash maps.
Patch #3 enhanced tools/testing/selftests/bpf/test_btf.c to
test bpffs hash and lru hash map pretty print.
Yonghong Song (3):
bpf: fix bpffs non
..OK
PASS:3 SKIP:0 FAIL:0
Signed-off-by: Yonghong Song
---
tools/testing/selftests/bpf/test_btf.c | 87 --
1 file changed, 72 insertions(+), 15 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_btf.c
b/tools/testing/selftests/bpf/test_btf.c
index
On 8/9/18 7:24 AM, Daniel Borkmann wrote:
On 08/09/2018 05:55 AM, Yonghong Song wrote:
On 8/8/18 7:25 PM, Alexei Starovoitov wrote:
On Wed, Aug 08, 2018 at 06:25:19PM -0700, Yonghong Song wrote:
In function map_seq_next() of kernel/bpf/inode.c,
the first key will be the "0"
On 8/8/18 7:25 PM, Alexei Starovoitov wrote:
On Wed, Aug 08, 2018 at 06:25:19PM -0700, Yonghong Song wrote:
In function map_seq_next() of kernel/bpf/inode.c,
the first key will be the "0" regardless of the map type.
This works for array. But for hash type, if it happens
key "0
6ca7c982cb5 ("bpf: btf: Add pretty print support to the basic
arraymap")
Signed-off-by: Yonghong Song
---
kernel/bpf/inode.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index 76efe9a183f5..794d06186e93 100644
. This patch updates test_lwt_seg6local.sh to the definitive
> iproute2 syntax
>
> Signed-off-by: Mathieu Xhonneux
Acked-by: Yonghong Song
since it's the same
socket, and updated.
Finally the test verifies the value in the map.
Signed-off-by: Andrey Ignatov
Acked-by: Yonghong Song
On 7/30/18 9:04 AM, Andrey Ignatov wrote:
Add test to use get_socket_cookie() from BPF programs of types
BPF_PROG_TYPE_SOCK_OPS and BPF_PROG_TYPE_CGROUP_SOCK_ADDR.
The test attaches two programs to cgroup, runs TCP server and client in
the cgroup and checks that two operations are done
On 7/30/18 9:04 AM, Andrey Ignatov wrote:
Add missing helper to bpf_helpers.h that is used in tests and samples.
Signed-off-by: Andrey Ignatov
Acked-by: Yonghong Song
On 7/30/18 9:04 AM, Andrey Ignatov wrote:
Sync bpf_get_socket_cookie() related bpf UAPI changes to tools/.
Signed-off-by: Andrey Ignatov
Acked-by: Yonghong Song
-by: Yonghong Song
t rcu_read_lock in the run_lwt_bpf is unnecessary.
>
> Signed-off-by: Taehee Yoo
Acked-by: Yonghong Song
and stepping through
percpu map value array properly in bpftool.
Fixes: 71bb428fe2c19 ("tools: bpf: add bpftool")
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/map.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
Changelogs:
v2 -> v3:
. apply on top of
and stepping through
percpu map value array properly in bpftool.
Fixes: 71bb428fe2c19 ("tools: bpf: add bpftool")
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/map.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
Changelogs:
v1 -> v2:
. Added missin
On 7/28/18 12:14 PM, Daniel Borkmann wrote:
On 07/28/2018 01:11 AM, Yonghong Song wrote:
I hit the following problem when I tried to use bpftool
to dump a percpu array.
$ sudo ./bpftool map show
61: percpu_array name stub flags 0x0
key 4B value 4B max_entries 1 memlock
and stepping through
percpu map value array properly in bpftool.
Fixes: 71bb428fe2c19 ("tools: bpf: add bpftool")
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/map.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftoo
gt; Jakub Kicinski (4):
> tools: libbpf: handle NULL program gracefully in bpf_program__nth_fd()
> tools: libbpf: add bpf_object__find_program_by_title()
> samples: bpf: convert xdp_fwd_user.c to libbpf
> samples: bpf: convert xdpsock_user.c to libbpf
LGTM. Ack for the whol
On Thu, Jul 26, 2018 at 9:52 AM, Arthur Fabre wrote:
> Oops, gmail seems to have mangled everything. Will resend using git
> send-email.
>
> I've added the test cases for mov64, but I'm not sure of the expected mov32
> behavior.
The interpreter has below:
ALU_MOV_X:
DST
On 07/26/2018 10:16 AM, Jakub Kicinski wrote:
On Thu, 26 Jul 2018 01:30:39 +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 use them
like tools/testing/selftests/bpf/Makefile
On 07/26/2018 03:27 AM, Taeung Song wrote:
Hi Arnaldo,
On 07/26/2018 02:52 AM, Arnaldo Carvalho de Melo wrote:
Em Thu, Jul 26, 2018 at 02:23:32AM +0900, Taeung Song escreveu:
Hi,
Building bpf programs with .BTF section,
I thought it'd be better to convert dwarf info to .BTF by
a new tool
Hi Arnaldo,
On 07/26/2018 02:52 AM, Arnaldo Carvalho de Melo wrote:
Em Thu, Jul 26, 2018 at 02:23:32AM +0900, Taeung Song escreveu:
Hi,
Building bpf programs with .BTF section,
I thought it'd be better to convert dwarf info to .BTF by
a new tool such as 'tools/bpf/bpf_dwarf2btf' instead
Hi,
Building bpf programs with .BTF section,
I thought it'd be better to convert dwarf info to .BTF by
a new tool such as 'tools/bpf/bpf_dwarf2btf' instead of pahole
in the future.
Currently for bpf binary that have .BTF section,
we need to use pahole from
by: Taeung Song
---
samples/bpf/Makefile | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 1303af10e54d..e079266360a3 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -191,6 +191,8 @@ HOSTLOADLIB
For untracked things of tools/bpf, add this.
Reviewed-by: Jakub Kicinski
Signed-off-by: Taeung Song
---
tools/bpf/.gitignore | 5 +
tools/bpf/bpftool/.gitignore | 2 ++
2 files changed, 7 insertions(+)
create mode 100644 tools/bpf/.gitignore
diff --git a/tools/bpf/.gitignore b
For untracked things of tools/bpf, add this.
Reviewed-by: Quentin Monnet
Signed-off-by: Taeung Song
---
tools/bpf/.gitignore | 5 +
tools/bpf/bpftool/.gitignore | 2 ++
2 files changed, 7 insertions(+)
create mode 100644 tools/bpf/.gitignore
diff --git a/tools/bpf/.gitignore b
On 7/24/18 5:49 PM, Prashant Bhole wrote:
On 7/25/2018 8:02 AM, Yonghong Song wrote:
On 7/24/18 3:40 PM, John Fastabend wrote:
On 07/24/2018 08:45 AM, Yonghong Song wrote:
In one of our production machines, tools/testing/selftests/bpf
test_sockmap failed randomly like below:
...
[TEST
On 7/20/18 1:37 AM, Daniel Borkmann wrote:
On 07/20/2018 07:34 AM, Martin KaFai Lau wrote:
I noticed the "--version" option of the llvm-objcopy command has recently
disappeared from the master llvm branch. It is currently used as a BTF
support test in tools/testing/selftests/bpf/Makefile.
On 7/24/18 3:40 PM, John Fastabend wrote:
On 07/24/2018 08:45 AM, Yonghong Song wrote:
In one of our production machines, tools/testing/selftests/bpf
test_sockmap failed randomly like below:
...
[TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx thread exited with
err 1. FAILED
to find out the map's btf_key_type_id 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
Acked-by: Yonghong Song
: Yonghong Song
In one of our production machines, tools/testing/selftests/bpf
test_sockmap failed randomly like below:
...
[TEST 78]: (512, 1, 1, sendmsg, pass,apply 1,): rx thread exited with
err 1. FAILED
...
...
[TEST 80]: (2, 1024, 256, sendmsg, pass,apply 1,): rx thread exited with
err 1. FAILED
...
ensure future encoder
will not violate this.
Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)")
Signed-off-by: Martin KaFai Lau
Acked-by: Yonghong Song
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 changes in test_btf_haskv.c for its usage.
Both iproute2 and libbpf loader will then have the same
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.
Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf")
Signed-off-by: Martin KaFai Lau
---
On 7/21/18 11:20 AM, Martin KaFai Lau wrote:
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
-off-by: Taeung Song
---
samples/bpf/trace_event_user.c | 27 ---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/trace_event_user.c b/samples/bpf/trace_event_user.c
index 1fa1becfa641..d08046ab81f0 100644
--- a/samples/bpf/trace_event_user.c
For untracked executables of samples/bpf, add this.
Untracked files:
(use "git add ..." to include in what will be committed)
samples/bpf/cpustat
samples/bpf/fds_example
samples/bpf/lathist
samples/bpf/load_sock_ops
...
Signed-off-by: T
e tests pass in that case.
>
> Signed-off-by: Kleber Sacilotto de Souza
Acked-by: Song Liu
> ---
> lib/test_bpf.c | 20
> 1 file changed, 20 insertions(+)
>
> diff --git a/lib/test_bpf.c b/lib/test_bpf.c
> index 60aedc879361..08d3d59dca17 100644
> ---
d under some circumstances lead to a WARN_ON_ONCE
> being triggered and the completion message to user space being lost.
>
> Fixes: 35fcde7f8deb ("xsk: support for Tx")
> Signed-off-by: Magnus Karlsson
> Reported-by: Pavel Odintsov
Acked-by: Song Liu
> ---
> net/xdp/xsk
: sample application and documentation for
> AF_XDP sockets")
> Signed-off-by: Magnus Karlsson
> Reported-by: Pavel Odintsov
Acked-by: Song Liu
> ---
> samples/bpf/xdpsock_user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/bpf/xd
>
> Fixes: 35fcde7f8deb ("xsk: support for Tx")
> Signed-off-by: Magnus Karlsson
> Reported-by: Pavel Odintsov
Acked-by: Song Liu
> ---
> net/xdp/xsk.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/xdp/xsk.c b/net/xdp/xs
On Wed, Jun 27, 2018 at 4:23 AM, Jesper Dangaard Brouer
wrote:
> On Tue, 26 Jun 2018 16:53:15 -0700
> Song Liu wrote:
>
>> > +static char* options2str(enum cfg_options_flags flag)
>> > +{
>> > + if (flag == NO_TOUCH)
>> > + return
On Wed, Jun 27, 2018 at 4:20 AM, Jesper Dangaard Brouer
wrote:
> On Tue, 26 Jun 2018 17:09:01 -0700
> Song Liu wrote:
>
>> On Mon, Jun 25, 2018 at 7:27 AM, Jesper Dangaard Brouer
>> wrote:
>> > XDP_TX requires also changing the MAC-addrs, else some hardware
>
t; @@ -119,6 +121,8 @@ static char* options2str(enum cfg_options_flags flag)
> {
> if (flag == NO_TOUCH)
> return "no_touch";
> + if (flag & SWAP_MAC)
> + return "swapmac";
> if (flag & READ_MEM
M = 0x1U,
> };
> #define XDP_ACTION_MAX (XDP_TX + 1)
> #define XDP_ACTION_MAX_STRLEN 11
> @@ -109,6 +115,16 @@ static void list_xdp_actions(void)
> printf("\n");
> }
>
> +static char* options2str(enum cfg_options_flags flag)
> +{
> + i
i
> Signed-off-by: Toke Høiland-Jørgensen
Acked-by: Song Liu
> ---
> samples/bpf/Makefile |4 +
> samples/bpf/xdp_sample_pkts_kern.c | 66 ++
> samples/bpf/xdp_sample_pkts_user.c | 169
>
> 3 files chang
;
> Reviewed-by: Jakub Kicinski
> Signed-off-by: Toke Høiland-Jørgensen
Acked-by: Song Liu
> ---
> tools/testing/selftests/bpf/trace_helpers.c | 48
> ++-
> tools/testing/selftests/bpf/trace_helpers.h |4 ++
> 2 files changed, 50 insertions(
level by failing compilation. However LLVM assembler hasn't enforced this,
> so it is possible for negative constant to leak in as a BPF_K operand
> through assembly code, we reject such cases as well.
>
> Signed-off-by: Jiong Wang
> Reviewed-by: Jakub Kicinski
Acked-by: Song Liu
&g
e is no difference on the low halve
> of result for signed/unsigned mul, so we will get correct result.
>
> Signed-off-by: Jiong Wang
> Reviewed-by: Jakub Kicinski
Acked-by: Song Liu
> ---
> drivers/net/ethernet/netronome/nfp/bpf/jit.c | 137 ++
> driver
On Tue, Jun 26, 2018 at 12:08 AM, Jakub Kicinski
wrote:
> On Mon, Jun 25, 2018 at 10:50 PM, Song Liu wrote:
>> On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski
>> wrote:
>>> From: Jiong Wang
>>>
>>> Map read has been supported on NFP, this patch en
example, to decide whether
> multiplication and divide are supported on the given range.
>
> This patch simply let NFP verifier hook to copy range info for all operands
> of all ALU operands.
>
> Signed-off-by: Jiong Wang
> Reviewed-by: Jakub Kicinski
Acked-by: Song Liu
>
2 d)
> return R;
> }
> EXPORT_SYMBOL(reciprocal_value);
> +
> +struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec)
> +{
> + struct reciprocal_value_adv R;
> + u32 l, post_shift;
> + u64 mhigh, mlow;
> +
> + l = fls(d
On Sun, Jun 24, 2018 at 8:54 PM, Jakub Kicinski
wrote:
> From: Jiong Wang
>
> The two fields are a copy of umin and umax info of bpf_insn->src_reg
> generated by verifier.
>
> Rename to make their meaning clear.
>
> Signed-off-by: Jiong Wang
> Reviewed-by: Jakub
;insn.src_reg * 2, off,
> _base,
> );
Did this break other cases before this patch?
I am sorry if this is a dumb question. I don't think I fully
understand addr40_offset().
Song
>
> /* Setup PREV_ALU fields to override memory read length. */
nd v4.14.x do need to
> stop offload if it was transparent/opportunistic, i.e. if
> XDP_FLAGS_HW_MODE was not set on running program.
>
> Fixes: cafa92ac2553 ("nfp: bpf: add support for XDP_FLAGS_HW_MODE")
> Signed-off-by: Jakub Kicinski
> Reviewed-by: Quentin Mon
max rlimit to RLIM_INFINITY. Let us just use it.
Signed-off-by: Yonghong Song
---
tools/testing/selftests/bpf/test_sockmap.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_sockmap.c
b/tools/testing/selftests/bpf/test_sockmap.c
index 05c8cb7..9e78df2 100644
-
load closes the libbpf object (which unloads and frees
> it).
>
> Fixes: 49a086c201a9 ("bpftool: implement prog load command")
> Signed-off-by: Jakub Kicinski
> Reviewed-by: Quentin Monnet
Acked-by: Song Liu
> ---
> tools/bpf/bpftool/prog.c | 8 +++-
> 1 file ch
_kern.o /sys/fs/bpf/a
> {
> "error": "can't pin the object (/sys/fs/bpf/a): File exists"
> },{
> "error": "failed to pin program"
> }
>
> Fixes: 49a086c201a9 ("bpftool: implement prog load command")
> Signed-off-by
On 6/15/18 7:24 AM, Arnaldo Carvalho de Melo wrote:
Em Thu, Jun 14, 2018 at 09:56:43PM -0700, Yonghong Song escreveu:
I really want to get rid of this option as well. To make pahole work
with the default default format, I need to add bpf support to
libdwfl in elfutils repo. I will work
On 6/14/18 11:00 AM, Arnaldo Carvalho de Melo wrote:
Em Thu, Jun 14, 2018 at 02:47:59PM -0300, Arnaldo Carvalho de Melo escreveu:
Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu:
On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote:
Just out of curiosity, is there any
On Wed, Jun 13, 2018 at 8:40 PM, Toshiaki Makita
wrote:
> On 2018/06/14 11:56, Y Song wrote:
> ...
>>> @@ -586,6 +589,15 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst,
>>> struct xdp_buff *xdp,
>>> return 0;
>>> }
>>>
On Wed, Jun 13, 2018 at 7:07 PM, Toshiaki Makita
wrote:
> Commit 67f29e07e131 ("bpf: devmap introduce dev_map_enqueue") changed
> the return value type of __devmap_lookup_elem() from struct net_device *
> to struct bpf_dtab_netdev * but forgot to modify generic XDP code
> accordingly.
> Thus
On Wed, Jun 13, 2018 at 5:03 AM, Wang Jian wrote:
> Grep tunnel type directly to make sure 'ip' command supports it.
>
> Signed-off-by: Jian Wang
Acked-by: Yonghong Song
c302 ("tools/bpftool: add perf subcommand")
Reported-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/perf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Changelogs:
v2 -> v3:
. fix a stupid error (flippingg the condition) I introduced
On 6/11/18 7:42 PM, Jakub Kicinski wrote:
On Mon, 11 Jun 2018 19:01:08 -0700, Yonghong Song wrote:
Commit b04df400c302 ("tools/bpftool: add perf subcommand")
introduced bpftool subcommand perf to query bpf program
kuprobe and tracepoint attachments.
The perf subcommand will
c302 ("tools/bpftool: add perf subcommand")
Reported-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/perf.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
Changelogs:
v1 -> v2:
. remove '\n' in the p_err format string in order to
ha
On 6/11/18 6:49 PM, Jakub Kicinski wrote:
On Mon, 11 Jun 2018 18:15:16 -0700, Yonghong Song wrote:
Commit b04df400c302 ("tools/bpftool: add perf subcommand")
introduced bpftool subcommand perf to query bpf program
kuprobe and tracepoint attachments.
The perf subcommand will
c302 ("tools/bpftool: add perf subcommand")
Reported-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
tools/bpf/bpftool/perf.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/bpf/bpftool/perf.c b/tools/bpf/bpftool/perf.c
index ac6b1a12c9b7..f1e4c
On Mon, Jun 11, 2018 at 11:47 AM, John Fastabend
wrote:
> In selftest test_maps the sockmap test case attempts to add a socket
> in listening state to the sockmap. This is no longer a valid operation
> so it fails as expected. However, the test wrongly reports this as an
> error now. Fix the test
free to deny its allocation. In
> this patch, the failed allocation attempt is silenced with
> __GFP_NOWARN.
>
> Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt")
> Reported-by: syzbot+4abadc5d69117b346...@syzkaller.appspotmail.com
> Signed-off-by: Björn Töpel
Acked-by: Yonghong Song
zkaller.appspotmail.com
> Signed-off-by: Daniel Borkmann
> Acked-by: Alexei Starovoitov
Tested with bcc for the above ctx + unknown_offset usage for bpf_probe_read.
No breakage.
Acked-by: Yonghong Song
> ---
> kernel/bpf/verifier.c | 48 +++
as
passed-in pid. This ensures that the recorded cgroup_id
is for the cgroup within which the test program resides.
Fixes: f269099a7e7a ("tools/bpf: add a selftest for bpf_get_current_cgroup_id()
helper")
Signed-off-by: Yonghong Song
---
tools/testing/selftests/bpf/get_c
rrent_cgroup_id() helper")
Suggested-by: Daniel Borkmann
Signed-off-by: Yonghong Song
---
kernel/trace/bpf_trace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index e2ab5b7..0ae6829 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kern
On 6/4/18 7:58 AM, Alexei Starovoitov wrote:
On Mon, Jun 04, 2018 at 11:08:35AM +0200, Daniel Borkmann wrote:
On 06/04/2018 12:59 AM, Yonghong Song wrote:
bpf has been used extensively for tracing. For example, bcc
contains an almost full set of bpf-based tools to trace kernel
and user
On 6/3/18 1:00 PM, Alexei Starovoitov wrote:
On Sun, Jun 03, 2018 at 12:36:51AM -0700, Yonghong Song wrote:
bpf has been used extensively for tracing. For example, bcc
contains an almost full set of bpf-based tools to trace kernel
and user functions/events. Most tracing tools are currently
Syscall name_to_handle_at() can be used to get cgroup id
for a particular cgroup path in user space. The selftest
got cgroup id from both user and kernel, and compare to
ensure they are equal to each other.
Acked-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
tools/testing/selftests
or policy could be configgured in the bpf program
based on current task cgroup.
Changelog:
v1 -> v2:
. rebase to resolve merge conflict with latest bpf-next.
Yonghong Song (3):
bpf: implement bpf_get_current_cgroup_id() helper
tools/bpf: sync uapi bpf.h for bpf_get_current_cgroup
is currently implemented for tracing. It can
be added to other program types as well when needed.
Acked-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 8 +++-
kernel/bpf/core.c| 1 +
kernel/bpf/helpers.c | 15
Sync kernel uapi/linux/bpf.h with tools uapi/linux/bpf.h.
Also add the necessary helper define in bpf_helpers.h.
Acked-by: Alexei Starovoitov
Signed-off-by: Yonghong Song
---
tools/include/uapi/linux/bpf.h| 8 +++-
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files
Sync kernel uapi/linux/bpf.h with tools uapi/linux/bpf.h.
Also add the necessary helper define in bpf_helpers.h.
Signed-off-by: Yonghong Song
---
tools/include/uapi/linux/bpf.h| 9 -
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 10 insertions(+), 1
or policy could be configgured in the bpf program
based on current task cgroup.
Yonghong Song (3):
bpf: implement bpf_get_current_cgroup_id() helper
tools/bpf: sync uapi bpf.h for bpf_get_current_cgroup_id() helper
tools/bpf: add a selftest for bpf_get_current_cgroup_id() helper
include/linux
Syscall name_to_handle_at() can be used to get cgroup id
for a particular cgroup path in user space. The selftest
got cgroup id from both user and kernel, and compare to
ensure they are equal to each other.
Signed-off-by: Yonghong Song
---
tools/testing/selftests/bpf/.gitignore | 1
is currently implemented for tracing. It can
be added to other program types as well when needed.
Signed-off-by: Yonghong Song
---
include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 9 -
kernel/bpf/core.c| 1 +
kernel/bpf/helpers.c | 15 +++
kernel/trace
it to flush via XDP_XMIT_FLUSH flag.
>
> Signed-off-by: Jesper Dangaard Brouer
Acked-by: Song Liu
> ---
> net/core/filter.c |3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 6a21dbcad350..6981b460
Brouer
Acked-by: Song Liu
> ---
> include/net/xdp.h |1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/net/xdp.h b/include/net/xdp.h
> index 0c45f0f943ed..a3b71a4dd71d 100644
> --- a/include/net/xdp.h
> +++ b/include/net/xdp.h
> @@ -41,7 +41,6 @@ e
On Thu, May 31, 2018 at 2:00 AM, Jesper Dangaard Brouer
wrote:
> When passed the XDP_XMIT_FLUSH flag virtnet_xdp_xmit now performs the
> same virtqueue_kick as virtnet_xdp_flush.
>
> Signed-off-by: Jesper Dangaard Brouer
Acked-by: Song Liu
> ---
> drivers/net/virtio_net.c
-off-by: Jesper Dangaard Brouer
Acked-by: Song Liu
> ---
> drivers/net/tun.c | 19 +--
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index b182b8cdd219..d82a05fb0594 100644
> --- a/drivers
> Signed-off-by: Jesper Dangaard Brouer
Acked-by: Song Liu
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 20 ++--
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> b/drivers/net/
e ndo_xdp_flush
> completely, as this is the last user of ndo_xdp_flush. This is left
> for later patches, to keep driver changes separate.
>
> Signed-off-by: Jesper Dangaard Brouer
Acked-by: Song Liu
> ---
> kernel/bpf/devmap.c | 19 ++-
> 1 file changed, 6 ins
ssary to change it after starting the example userspace program.
Why does this only works when everything runs on CPU0? Is this something
we can improve?
Thanks,
Song
>
> Signed-off-by: Toke Høiland-Jørgensen
> ---
> samples/bpf/Makefile | 4 +
> samples/bpf/xdp_
301 - 400 of 1050 matches
Mail list logo