uot;)
Signed-off-by: Samuel Mendoza-Jonas
Reviewed-by: Frank van der Linden
Reviewed-by: Ethan Chen
Just to be clear, the patch is for 4.14 stable branch.
Acked-by: Yonghong Song
-by: Liwei Song
---
drivers/net/ethernet/intel/ice/ice_type.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h
b/drivers/net/ethernet/intel/ice/ice_type.h
index 266036b7a49a..8a90c47e337d 100644
--- a/drivers/net/ethernet/intel/ice
M although I see some tools Makefile directly added
".DELETE_ON_ERROR:" in their Makefile.
Acked-by: Yonghong Song
On 4/15/21 11:18 AM, Steven Rostedt wrote:
On Thu, 15 Apr 2021 19:39:45 +0200
Jiri Olsa wrote:
I don't know how the BPF code does it, but if you are tracing the exit
of a function, I'm assuming that you hijack the return pointer and replace
it with a call to a trampoline that has access to
On 4/9/21 2:20 PM, Sergei Trofimovich wrote:
On Tue, 23 Feb 2021 18:53:21 +
Sergei Trofimovich wrote:
The crash seems to be related to sock_filter-v test from strace:
https://github.com/strace/strace/blob/master/tests/seccomp-filter-v.c
Here is an OOps:
[ 818.089904] BUG: Bad pa
> On Apr 6, 2021, at 9:48 AM, Cong Wang wrote:
>
> On Mon, Apr 5, 2021 at 11:18 PM Song Liu wrote:
>>
>>
>>
>>> On Apr 5, 2021, at 6:24 PM, Cong Wang wrote:
>>>
>>> On Mon, Apr 5, 2021 at 6:08 PM Song Liu wrote:
>>>&g
> On Apr 5, 2021, at 6:24 PM, Cong Wang wrote:
>
> On Mon, Apr 5, 2021 at 6:08 PM Song Liu wrote:
>>
>>
>>
>>> On Apr 5, 2021, at 4:49 PM, Cong Wang wrote:
>>>
>>> On Fri, Apr 2, 2021 at 4:31 PM Song Liu wrote:
>>>&g
> On Apr 5, 2021, at 4:49 PM, Cong Wang wrote:
>
> On Fri, Apr 2, 2021 at 4:31 PM Song Liu wrote:
>>
>>
>>
>>> On Apr 2, 2021, at 1:57 PM, Cong Wang wrote:
>>>
>>> Ideally I even prefer to create timers in kernel-space too, but a
> On Apr 2, 2021, at 1:57 PM, Cong Wang wrote:
>
> On Fri, Apr 2, 2021 at 12:45 PM Song Liu wrote:
>>
>>
>>
>>> On Apr 2, 2021, at 12:08 PM, Cong Wang wrote:
>>>
>>> On Fri, Apr 2, 2021 at 10:57 AM Song Liu wrote:
>>>>
> On Apr 2, 2021, at 12:08 PM, Cong Wang wrote:
>
> On Fri, Apr 2, 2021 at 10:57 AM Song Liu wrote:
>>
>>
>>
>>> On Apr 2, 2021, at 10:34 AM, Cong Wang wrote:
>>>
>>> On Thu, Apr 1, 2021 at 1:17 PM Song Liu wrote:
>>>>
> On Apr 2, 2021, at 10:34 AM, Cong Wang wrote:
>
> On Thu, Apr 1, 2021 at 1:17 PM Song Liu wrote:
>>
>>
>>
>>> On Apr 1, 2021, at 10:28 AM, Cong Wang wrote:
>>>
>>> On Wed, Mar 31, 2021 at 11:38 PM Song Liu wrote:
>>>>
On 4/1/21 3:05 PM, Yonghong Song wrote:
On 4/1/21 4:29 AM, syzbot wrote:
Hello,
syzbot found the following issue on:
HEAD commit: 36e79851 libbpf: Preserve empty DATASEC BTFs during
static..
git tree: bpf-next
console output:
https://syzkaller.appspot.com/x/log.txt?x
On Thu, Apr 1, 2021 at 10:58 AM Yang Yingliang wrote:
>
> Signed-off-by: Yang Yingliang
Please add a short commit log.
Thanks,
Song
> ---
> tools/lib/bpf/linker.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/lib/bpf/linker.c b/tools/lib
On Thu, Apr 1, 2021 at 12:22 AM Wan Jiabing wrote:
>
> struct btf_type is declared twice. One is declared at 35th line.
> The blew one is not needed. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing
Acked-by: Song Liu
On 4/1/21 4:29 AM, syzbot wrote:
Hello,
syzbot found the following issue on:
HEAD commit:36e79851 libbpf: Preserve empty DATASEC BTFs during static..
git tree: bpf-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1569bb06d0
kernel config: https://syzkaller.appspo
b_core(skb);
> > > - if (ret == NET_RX_DROP)
> > > - drops++;
> >
> > I guess we stop tracking "drops" with this patch?
> >
> > Thanks,
> > Song
>
> Hi Song,
>
> we do not report th
> On Apr 1, 2021, at 10:28 AM, Cong Wang wrote:
>
> On Wed, Mar 31, 2021 at 11:38 PM Song Liu wrote:
>>
>>
>>
>>> On Mar 31, 2021, at 9:26 PM, Cong Wang wrote:
>>>
>>> From: Cong Wang
>>>
>>> (This patch is still
_run(void *data)
> continue;
> }
>
> - /* Inject into network stack */
> - ret = netif_receive_skb_core(skb);
> - if (ret == NET_RX_DROP)
> -
tes from 169.254.1.11: icmp_seq=10 ttl=64 time=0.870 ms
--- 169.254.1.11 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 909ms
rtt min/avg/max/mdev = 0.829/1.020/1.136/0.101 ms
LP:~# ping 169.254.1.11 -s 500 -i 0.1 -c 10
PING 169.254.1.11 (169.254.1.11) 500(528) bytes of data.
From 169.254.1.11 icmp_seq=7 Frag needed and DF set (mtu = 386)
From 169.254.1.11 icmp_seq=9 Frag needed and DF set (mtu = 386)
--- 169.254.1.11 ping statistics ---
10 packets transmitted, 0 received, +2 errors, 100% packet loss, time 930ms
Regards
Song, Yoong Siang
> On Mar 31, 2021, at 11:46 PM, Wan Jiabing wrote:
>
> struct bpf_prog is declared twice. There is one declaration
> which is independent on the MACRO at 18th line.
> So the below one is not needed though. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing
e don't have to address "creating a timer but not adding it to a map"
problem in the kernel. If the user forgot it, the user should debug it.
Thanks,
Song
[...]
On Wed, Mar 31, 2021 at 12:14 AM He Fengqing wrote:
>
> 'stack' parameter is not used in ___bpf_prog_run,
> the base address have been set to FP reg. So consequently remove it.
>
> Signed-off-by: He Fengqing
Acked-by: Song Liu
> On Mar 30, 2021, at 3:37 PM, Pedro Tammela wrote:
>
> The current code only checks flags in 'bpf_ringbuf_output()'.
>
> Signed-off-by: Pedro Tammela
Acked-by: Song Liu
> On Mar 30, 2021, at 7:22 AM, Pedro Tammela wrote:
>
> Em seg., 29 de mar. de 2021 às 13:10, Song Liu
> escreveu:
>>
>>
>>
>>> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>>>
>>> The current code only checks flags in
On Mon, Mar 29, 2021 at 7:11 PM He Fengqing wrote:
>
> Remove unused bpf_load_pointer function in filter.h
>
> Signed-off-by: He Fengqing
Acked-by: Song Liu
[...]
> On Mar 29, 2021, at 10:41 PM, Martin KaFai Lau wrote:
>
> This patch updates the README.rst to specify the clang requirement
> to compile the bpf selftests that call kernel function.
>
> Signed-off-by: Martin KaFai Lau
Acked-by: Song Liu
> On Mar 29, 2021, at 10:41 PM, Martin KaFai Lau wrote:
>
> This patch updates bpf_design_QA.rst to clarify that the kernel
> function callable by bpf program is not an ABI.
>
> Signed-off-by: Martin KaFai Lau
Acked-by: Song Liu
> On Mar 28, 2021, at 4:26 AM, Jiri Olsa wrote:
>
> Adding test to verify that once we attach module's trampoline,
> the module can't be unloaded.
>
> Signed-off-by: Jiri Olsa
Acked-by: Song Liu
[...]
ch(fentry_skel);
> + if (CHECK(err, "fentry_attach", "fentry re-attach failed: %d\n", err))
> + goto cleanup;
> +
> + link = bpf_program__attach(fentry_skel->progs.test1);
> + if (CHECK(!IS_ERR(link), "attach_fentry re-attach without de
ernel program.
>
> Signed-off-by: Jiri Olsa
LGTM.
Acked-by: Song Liu
[...]
On Mon, Mar 29, 2021 at 3:35 PM Stanislav Fomichev wrote:
>
> * make eprintf static, used only in main.c
> * initialize ret in eprintf
> * remove unused *tmp
>
> v3:
> * remove another err (Song Liu)
>
> v2:
> * remove unused 'int err = -1'
>
> Cc:
On Mon, Mar 29, 2021 at 11:13 AM Jisheng Zhang
wrote:
>
> From: Jisheng Zhang
>
> This is useful for cross compile process to point linker to the
> correct libelf, libcap, libz path.
LGTM:
Acked-by: Song Liu
btw: Do we also need LDFLAGS for some other binaries, like test_cpp,
On Mon, Mar 29, 2021 at 9:46 AM Stanislav Fomichev wrote:
>
> * make eprintf static, used only in main.c
> * initialize ret in eprintf
> * remove unused *tmp
> * remove unused 'int err = -1'
>
> Signed-off-by: Stanislav Fomichev
> ---
> tools/bpf/resolve_btfids/main.c | 7 +++
> 1 file chang
I think we don't need ring_buffer__poll_wait() as ring_buffer__poll() already
means "wait for timeout_ms".
Actually, I think ring_buffer__poll() is enough. ring_buffer__poll_nowait()
is not that useful either.
Thanks,
Song
c
> @@ -397,26 +397,35 @@ static void bpf_ringbuf_commit(void *sample, u64 flags,
> bool discard)
>
> BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags)
> {
> + if (unlikely(flags & ~(BPF_RB_NO_WAKEUP | BPF_RB_FORCE_WAKEUP)))
> + return -EINVAL;
We can move this check to bpf_ringbuf_commit().
Thanks,
Song
[...]
e might notify the consumer if it already caught up in processing,
> so let's provide a more descriptive notation for this value.
>
> Signed-off-by: Pedro Tammela
Acked-by: Song Liu
support")
> Signed-off-by: Andrii Nakryiko
Acked-by: Song Liu
> ---
> tools/lib/bpf/linker.c | 24
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
> index a29d62ff8041..46b16cb
On Fri, Mar 26, 2021 at 12:45 PM Colin King wrote:
>
> From: Colin Ian King
>
> The variable id is being assigned a value that is never
> read, the assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin I
*pathname, int
> flags)
> return PTR_ERR(raw);
For both patches, shall we do the check before bpf_obj_do_get(), which is a few
lines above?
Thanks,
Song
>
> if (type == BPF_TYPE_PROG)
> - ret = bpf_prog_new_fd(raw);
> + ret = (f_
support")
Signed-off-by: Andrii Nakryiko
Ack with a nit below.
Acked-by: Yonghong Song
---
tools/lib/bpf/linker.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c
index 5e0aa2f2c0ca..2c43943da30c 100644
--- a
On 3/19/21 12:21 AM, Daniel Borkmann wrote:
On 3/19/21 3:11 AM, Piotr Krysiuk wrote:
Hi Daniel,
On Fri, Mar 19, 2021 at 12:16 AM Stephen Rothwell
wrote:
diff --cc kernel/bpf/verifier.c
index 44e4ec1640f1,f9096b049cd6..
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@
On 3/15/21 6:29 AM, Pedro Tammela wrote:
This seems to be a reminiscent from the hashmap tests.
Signed-off-by: Pedro Tammela
Acked-by: Yonghong Song
atic?
>
> This symbol is not used outside of bpf_task_storage.c, so this
> commit marks it static.
>
> Fixes: bc235cdb423a ("bpf: Prevent deadlock from recursive
> bpf_task_storage_[get|delete]")
> Reported-by: Hulk Robot
> Signed-off-by: Wei Yongjun
Acked-b
On 3/9/21 10:21 AM, Roman Gushchin wrote:
On Mon, Mar 08, 2021 at 09:44:08PM -0800, Yonghong Song wrote:
On 3/5/21 1:10 PM, Yonghong Song wrote:
On 3/5/21 12:38 PM, Roman Gushchin wrote:
On Thu, Mar 04, 2021 at 08:03:33PM +0100, Jiri Olsa wrote:
hi,
I'm getting attached BUG/crash
On 3/5/21 1:10 PM, Yonghong Song wrote:
On 3/5/21 12:38 PM, Roman Gushchin wrote:
On Thu, Mar 04, 2021 at 08:03:33PM +0100, Jiri Olsa wrote:
hi,
I'm getting attached BUG/crash when running in parralel selftests, like:
while :; do ./test_progs -t spinlock; done
while
ed, struct scatterlist **sgs,
^
1 warning generated.
Fixes: 86a35af628e5 ("selftests/bpf: Add a verifier scale test with unknown bounded
loop")
Signed-off-by: Andrii Nakryiko
Oh, my bad. Thanks for fixing it!
Acked-by: Yonghong Song
On 3/5/21 12:38 PM, Roman Gushchin wrote:
On Thu, Mar 04, 2021 at 08:03:33PM +0100, Jiri Olsa wrote:
hi,
I'm getting attached BUG/crash when running in parralel selftests, like:
while :; do ./test_progs -t spinlock; done
while :; do ./test_progs ; done
it's the latest bpf-next/master,
On 3/4/21 11:03 AM, Jiri Olsa wrote:
hi,
I'm getting attached BUG/crash when running in parralel selftests, like:
while :; do ./test_progs -t spinlock; done
while :; do ./test_progs ; done
it's the latest bpf-next/master, I can send the .config if needed,
but I don't think there's anyt
On 3/3/21 10:02 AM, Cong Wang wrote:
On Tue, Mar 2, 2021 at 10:37 PM Yonghong Song wrote:
On 3/1/21 6:37 PM, Cong Wang wrote:
From: Cong Wang
Now UDP supports sockmap and redirection, we can safely update
the sock type checks for it accordingly.
Cc: John Fastabend
Cc: Daniel
On 3/2/21 11:52 PM, Jiapeng Chong wrote:
Fix the following coccicheck warnings:
./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A
&& B is equivalent to !A || B.
Reported-by: Abaci Robot
Signed-off-by: Jiapeng Chong
Acked-by: Yonghong Song
On 3/2/21 11:20 PM, Jiapeng Chong wrote:
Fix the following coccicheck warnings:
./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to
!A || B.
Reported-by: Abaci Robot
Signed-off-by: Jiapeng Chong
Acked-by: Yonghong Song
On 3/1/21 6:37 PM, Cong Wang wrote:
From: Cong Wang
Now UDP supports sockmap and redirection, we can safely update
the sock type checks for it accordingly.
Cc: John Fastabend
Cc: Daniel Borkmann
Cc: Jakub Sitnicki
Cc: Lorenz Bauer
Signed-off-by: Cong Wang
---
net/core/sock_map.c | 5
On 3/1/21 6:37 PM, Cong Wang wrote:
From: Cong Wang
Some even simple commit message here will be preferred
compared to empty commit message.
Cc: John Fastabend
Cc: Daniel Borkmann
Cc: Jakub Sitnicki
Cc: Lorenz Bauer
Signed-off-by: Cong Wang
---
include/net/udp.h | 2 ++
net/ipv
allow to provide pre-generated vmlinux.h for runqslower build.
Cc: Martin Lau
Signed-off-by: Andrii Nakryiko
Acked-by: Yonghong Song
On 3/2/21 3:14 AM, Jiri Olsa wrote:
On Mon, Mar 01, 2021 at 04:34:24PM -0800, Andrii Nakryiko wrote:
On Mon, Mar 1, 2021 at 11:11 AM Jiri Olsa wrote:
When testing uprobes we the test gets GEP (Global Entry Point)
address from kallsyms, but then the function is called locally
so the uprobe
On Tue, Mar 2, 2021 at 9:15 AM Roman Gushchin wrote:
>
> On Mon, Mar 01, 2021 at 02:22:26PM +0800, Muchun Song wrote:
> > The remote memcg charing APIs is a mechanism to charge kernel memory
> > to a given memcg. So we can move the infrastructure to the scope of
> &g
On Tue, Mar 2, 2021 at 11:36 AM Shakeel Butt wrote:
>
> On Mon, Mar 1, 2021 at 7:03 PM Muchun Song wrote:
> >
> > On Tue, Mar 2, 2021 at 2:11 AM Shakeel Butt wrote:
> > >
> > > On Sun, Feb 28, 2021 at 10:25 PM Muchun Song
> > > wrote:
> >
st. I will reduce the CC list in the next version.
Thanks.
>
> On Mon, Mar 01, 2021 at 10:11:45AM -0800, Shakeel Butt wrote:
> > On Sun, Feb 28, 2021 at 10:25 PM Muchun Song
> > wrote:
> > >
> > > We want to reuse the obj_cgroup APIs to reparent the kmem p
On Tue, Mar 2, 2021 at 2:11 AM Shakeel Butt wrote:
>
> On Sun, Feb 28, 2021 at 10:25 PM Muchun Song wrote:
> >
> > We want to reuse the obj_cgroup APIs to reparent the kmem pages when
> > the memcg offlined. If we do this, we should store an object cgroup
> > point
On Tue, Mar 2, 2021 at 9:12 AM Roman Gushchin wrote:
>
> Hi Muchun!
>
> On Mon, Mar 01, 2021 at 02:22:22PM +0800, Muchun Song wrote:
> > Since Roman series "The new cgroup slab memory controller" applied. All
> > slab objects are changed via the new APIs of obj_c
On 3/1/21 11:04 AM, Jiri Olsa wrote:
When testing uprobes we the test gets GEP (Global Entry Point)
address from kallsyms, but then the function is called locally
so the uprobe is not triggered.
Fixing this by adjusting the address to LEP (Local Entry Point)
for powerpc arch.
Signed-off-by:
. Actually,
the slab core use obj_cgroup APIs for memory cgroup charing, so we can
hold a refcount to obj_cgroup instead of memory cgroup. In this case,
the infrastructure of remote meory charging also do not hold a refcount
to memory cgroup.
Signed-off-by: Muchun Song
---
fs/buffer.c
The remote memcg charing APIs is a mechanism to charge kernel memory
to a given memcg. So we can move the infrastructure to the scope of
the CONFIG_MEMCG_KMEM.
As a bonus, on !CONFIG_MEMCG_KMEM build some functions and variables
can be compiled out.
Signed-off-by: Muchun Song
---
include/linux
mem page.
Signed-off-by: Muchun Song
---
include/linux/memcontrol.h | 66 +++
mm/memcontrol.c| 155 -
2 files changed, 124 insertions(+), 97 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol
movement without any functional
change.
Signed-off-by: Muchun Song
---
mm/memcontrol.c | 46 +++---
1 file changed, 31 insertions(+), 15 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2db2aeac8a9e..2eafbae504ac 100644
--- a/mm/memcontrol.c
age_memcg_check in
the later patch.
Signed-off-by: Muchun Song
---
include/linux/memcontrol.h | 56 +++---
mm/memcontrol.c| 23 ++-
mm/page_alloc.c| 4 ++--
3 files changed, 63 insertions(+), 20 deletions(-)
cgroup. So I also make it use the APIs of obj_cgroup.
Patch 4-5 are doing this.
Muchun Song (5):
mm: memcontrol: introduce obj_cgroup_{un}charge_page
mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem
page
mm: memcontrol: reparent the kmem pages on cgroup removal
m
Update the Makefile to prefer using $(O)/vmlinux, $(KBUILD_OUTPUT)/vmlinux
(for selftests) or ../../../vmlinux. These two files should have latest
definitions for vmlinux.h.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/Makefile | 5 -
1 file changed, 4
, as those in
handle__sched_wakeup, are much faster with task local storage. If we
disable hashtab prealloc, task local storage is much faster for all 3
functions.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/runqslower.bpf.c | 33 +--
1 file
Add a test with recursive bpf_task_storage_[get|delete] from fentry
programs on bpf_local_storage_lookup and bpf_local_storage_update. Without
proper deadlock prevent mechanism, this test would cause deadlock.
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 23
should not).
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 69 +++
.../selftests/bpf/progs/task_local_storage.c | 64 +
.../bpf/progs/task_local_storage_exit_creds.c | 32 +
3 files changed, 165 insertions(+)
create mode 100644
le, if bpf_local_storage_map
owns the counters, it cannot prevent deadlock on bpf_local_storage->lock
when two maps are used.
Signed-off-by: Song Liu
---
include/linux/bpf_local_storage.h | 3 +-
kernel/bpf/bpf_inode_storage.c| 2 +-
kernel/bpf/bpf_local_storage.c| 11 +-
kernel/bpf/bpf_task_
allocate
new storage when the task is not refcounted (task->usage == 0).
Acked-by: KP Singh
Acked-by: Martin KaFai Lau
Signed-off-by: Song Liu
---
include/linux/bpf.h| 7 ++
include/linux/bpf_lsm.h| 22 -
include/linux/bpf_types.h | 2 +-
incl
or a task being freed.
3. Minor changes in runqslower.
Song Liu (6):
bpf: enable task local storage for tracing programs
bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]
selftests/bpf: add non-BPF_LSM test for task local storage
selftests/bpf: test deadlock
On 2/23/21 2:28 PM, Song Liu wrote:
To access per-task data, BPF programs usually creates a hash table with
pid as the key. This is not ideal because:
1. The user need to estimate the proper size of the hash table, which may
be inaccurate;
2. Big hash tables are slow;
3. To clean
, as those in
handle__sched_wakeup, are much faster with task local storage. If we
disable hashtab prealloc, task local storage is much faster for all 3
functions.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/runqslower.bpf.c | 33 +--
1 file
should not).
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 69 +++
.../selftests/bpf/progs/task_local_storage.c | 64 +
.../bpf/progs/task_local_storage_exit_creds.c | 32 +
3 files changed, 165 insertions(+)
create mode 100644
Update the Makefile to prefer using $(O)/vmlinux, $(KBUILD_OUTPUT)/vmlinux
(for selftests) or ../../../vmlinux. These two files should have latest
definitions for vmlinux.h.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/Makefile | 5 -
1 file changed, 4
Add a test with recursive bpf_task_storage_[get|delete] from fentry
programs on bpf_local_storage_lookup and bpf_local_storage_update. Without
proper deadlock prevent mechanism, this test would cause deadlock.
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 23
nges with runqslower. (Andrii)
3. Shortern CC list to make it easy for vger.
Changes v1 => v2:
1. Do not allocate task local storage when the task is being freed.
2. Revise the selftest and added a new test for a task being freed.
3. Minor changes in runqslower.
Song Liu (6):
bpf: enable task local
allocate
new storage when the task is not refcounted (task->usage == 0).
Reported-by: kernel test robot
Acked-by: KP Singh
Signed-off-by: Song Liu
---
include/linux/bpf.h| 7 ++
include/linux/bpf_lsm.h| 22 -
include/linux/bpf_types.h |
le, if bpf_local_storage_map
owns the counters, it cannot prevent deadlock on bpf_local_storage->lock
when two maps are used.
Signed-off-by: Song Liu
---
kernel/bpf/bpf_task_storage.c | 57 ++-
1 file changed, 50 insertions(+), 7 deletions(-)
diff --git a/kernel/bpf/bpf_task_
> On Feb 23, 2021, at 11:23 AM, Martin Lau wrote:
>
> On Mon, Feb 22, 2021 at 05:20:09PM -0800, Song Liu wrote:
> [ ... ]
>
>> diff --git a/kernel/bpf/bpf_task_storage.c b/kernel/bpf/bpf_task_storage.c
>> index e0da0258b732d..2034019966d44 100644
>> --
> On Feb 23, 2021, at 3:06 AM, Peter Zijlstra wrote:
>
> On Mon, Feb 22, 2021 at 05:20:10PM -0800, Song Liu wrote:
>> BPF helpers bpf_task_storage_[get|delete] could hold two locks:
>> bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling
>>
> On Feb 22, 2021, at 10:21 PM, Andrii Nakryiko
> wrote:
>
> On Mon, Feb 22, 2021 at 5:23 PM Song Liu wrote:
>>
>> BPF helpers bpf_task_storage_[get|delete] could hold two locks:
>> bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Callin
should not).
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 69 +++
.../selftests/bpf/progs/task_local_storage.c | 64 +
.../bpf/progs/task_local_storage_exit_creds.c | 32 +
3 files changed, 165 insertions(+)
create mode 100644
Add a test with recursive bpf_task_storage_[get|delete] from fentry
programs on bpf_local_storage_lookup and bpf_local_storage_update. Without
proper deadlock prevent mechanism, this test would cause deadlock.
Signed-off-by: Song Liu
---
.../bpf/prog_tests/task_local_storage.c | 23
, as those in
handle__sched_wakeup, are much faster with task local storage. If we
disable hashtab prealloc, task local storage is much faster for all 3
functions.
Acked-by: Andrii Nakryiko
Signed-off-by: Song Liu
---
tools/bpf/runqslower/runqslower.bpf.c | 33 +--
1 file
Update the Makefile to prefer using $(O)/mvlinux, $(KBUILD_OUTPUT)/vmlinux
(for selftests) or ../../../vmlinux. These two files should have latest
definitions for vmlinux.h.
Signed-off-by: Song Liu
---
tools/bpf/runqslower/Makefile | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
other lock. For example,
if bpf_local_storage_map owns the counters, it cannot prevent deadlock
on bpf_local_storage->lock when two maps are used.
Signed-off-by: Song Liu
---
kernel/bpf/bpf_task_storage.c | 57 ++-
1 file changed, 50 insertions(+), 7 deletions
allocate
new storage when the task is not refcounted (task->usage == 0).
Acked-by: KP Singh
Signed-off-by: Song Liu
---
include/linux/bpf.h| 7 +++
include/linux/bpf_lsm.h| 22 --
include/linux/bpf_types.h | 2 +-
include/linux/sche
evise the selftest and added a new test for a task being freed.
3. Minor changes in runqslower.
Song Liu (6):
bpf: enable task local storage for tracing programs
bpf: prevent deadlock from recursive bpf_task_storage_[get|delete]
selftests/bpf: add non-BPF_LSM test for task local storage
self
From: "Song, Yoong Siang"
When link speed is not 100 Mbps, port transmit rate and speed divider
are set to 8 and 100 respectively. These values are incorrect for
CBS idleslope and sendslope HW values calculation if the link speed is
not 1 Gbps.
This patch adds switch statement
p().
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
kernel/bpf/task_iter.c | 267 -
1 file changed, 266 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index 175b7b42bfc46..b68cb5d6d6ebc 100644
--- a
The test dumps information similar to /proc/pid/maps. The first line of
the output is compared against the /proc file to make sure they match.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
.../selftests/bpf/prog_tests/bpf_iter.c | 118 --
tools/testing/selftests/bpf
mmap_lock while calling BPF program. This
enables the BPF program to access the real vma with BTF. (Alexei)
2. Fix the logic when the control is returned to user space. (Yonghong)
3. Revise commit log and cover letter. (Yonghong)
Changes v1 => v2:
1. Small fixes in task_iter.c and
task_file and task_vma iter programs have access to file->f_path. Enable
bpf_d_path to print paths of these file.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
kernel/trace/bpf_trace.c | 4
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/tr
The test dumps information similar to /proc/pid/maps. The first line of
the output is compared against the /proc file to make sure they match.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
.../selftests/bpf/prog_tests/bpf_iter.c | 118 --
tools/testing/selftests/bpf
Sleepable iterator program have access to helper functions like bpf_d_path.
Acked-by: Yonghong Song
Acked-by: KP Singh
Signed-off-by: Song Liu
---
tools/lib/bpf/libbpf.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index
exei)
2. Fix the logic when the control is returned to user space. (Yonghong)
3. Revise commit log and cover letter. (Yonghong)
Changes v1 => v2:
1. Small fixes in task_iter.c and the selftests. (Yonghong)
Song Liu (4):
bpf: introduce task_vma bpf_iter
bpf: allow bpf_d_path in
1 - 100 of 3268 matches
Mail list logo