> 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 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/bpf/linker.c
> index 4
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 Thu, Apr 1, 2021 at 9:49 AM Lorenzo Bianconi wrote:
>
> > On Thu, Apr 1, 2021 at 1:57 AM Lorenzo Bianconi wrote:
> > >
>
> [...]
>
> > > - /* Inject into network stack */
> > > - ret = netif_receive_skb_core(skb);
> > > - if (re
> 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
On Thu, Apr 1, 2021 at 1:57 AM Lorenzo Bianconi wrote:
>
> Rely on netif_receive_skb_list routine to send skbs converted from
> xdp_frames in cpu_map_kthread_run in order to improve i-cache usage.
> The proposed patch has been tested running xdp_redirect_cpu bpf sample
> available in the kernel tr
> 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
> On Mar 31, 2021, at 9:26 PM, Cong Wang wrote:
>
> From: Cong Wang
>
> (This patch is still in early stage and obviously incomplete. I am sending
> it out to get some high-level feedbacks. Please kindly ignore any coding
> details for now and focus on the design.)
Could you please explain
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
[...]
> On Mar 28, 2021, at 4:26 AM, Jiri Olsa wrote:
>
> Adding the test to re-attach (detach/attach again) tracing
> fentry programs, plus check that already linked program can't
> be attached again.
>
> Fixing the number of check-ed results, which should be 8.
>
> Signed-off-by: Jiri Olsa
>
[
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
> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>
> 'bpf_ring_buffer__poll()' abstracts the polling method, so abstract the
> constants that make the implementation don't wait or wait indefinetly
> for data.
>
> Signed-off-by: Pedro Tammela
> ---
> tools/lib/bpf/libbpf.h
> On Mar 28, 2021, at 9:10 AM, Pedro Tammela wrote:
>
> The current code only checks flags in 'bpf_ringbuf_output()'.
>
> Signed-off-by: Pedro Tammela
> ---
> include/uapi/linux/bpf.h | 8
> kernel/bpf/ringbuf.c | 13 +++--
> tools/include/uapi/linux/bpf.h |
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
On Fri, Mar 26, 2021 at 9:07 AM Lorenz Bauer wrote:
>
> As for bpf_link, refuse creating a non-O_RDWR fd. Since program fds
> currently don't allow modifications this is a precaution, not a
> straight up bug fix.
>
> Signed-off-by: Lorenz Bauer
> ---
> kernel/bpf/inode.c | 2 +-
> 1 file changed
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
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
, 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
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
ave access to bpf_d_path; non-sleepable
programs have access to bpf_spin_lock.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
kernel/trace/bpf_trace.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 6c0018abe68a0..1f3becd443
> On Feb 10, 2021, at 3:02 PM, Yonghong Song wrote:
>
>
>
> On 2/9/21 7:00 PM, Alexei Starovoitov wrote:
>> On 2/9/21 2:08 PM, Song Liu wrote:
>>>
>>>
>>>> On Feb 9, 2021, at 1:30 PM, Alexei Starovoitov
>>>> wrote:
>
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
> On Feb 9, 2021, at 7:00 PM, Alexei Starovoitov wrote:
>
> On 2/9/21 2:08 PM, Song Liu wrote:
>>> On Feb 9, 2021, at 1:30 PM, Alexei Starovoitov
>>> wrote:
>>>
>>> On Mon, Feb 08, 2021 at 02:52:52PM -0800, Song Liu wrote:
>>>> Int
> On Feb 9, 2021, at 1:30 PM, Alexei Starovoitov
> wrote:
>
> On Mon, Feb 08, 2021 at 02:52:52PM -0800, Song Liu wrote:
>> Introduce task_vma bpf_iter to print memory information of a process. It
>> can be used to print customized information similar to /proc//ma
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.
Signed-off-by: Song Liu
---
.../selftests/bpf/prog_tests/bpf_iter.c | 118 --
tools/testing/selftests/bpf/progs/bpf_iter.h | 8
().
Signed-off-by: Song Liu
---
kernel/bpf/task_iter.c | 217 -
1 file changed, 216 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index 175b7b42bfc46..a0d469f0f481c 100644
--- a/kernel/bpf/task_iter.c
+++ b
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
ave access to bpf_d_path; non-sleepable
programs have access to bpf_spin_lock.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
kernel/trace/bpf_trace.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 6c0018abe68a0..1f3becd443
og 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 sleepable bpf_iter program
libbpf: introduce section "iter.s/" for sleepable bpf_iter program
se
emove.
>
> Signed-off-by: Jiri Olsa
Acked-by: Song Liu
> ---
> tools/bpf/resolve_btfids/Makefile | 17 -
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/tools/bpf/resolve_btfids/Makefile
> b/tools/bpf/resolve_btfids/Makefile
>
> On Feb 4, 2021, at 1:18 PM, Jiri Olsa wrote:
>
> The resolve_btfids tool is used during the kernel build,
> so we should clean it on kernel's make clean.
>
> Invoking the the resolve_btfids clean as part of root
> 'make clean'.
>
> Sig
solve this by setting current srctree value
> directly.
>
> Also root Makefile does not define the implicit RM variable,
> so adding RM initialization.
>
> Signed-off-by: Jiri Olsa
Acked-by: Song Liu
> ---
> tools/bpf/resolve_btfids/Makefile | 3 +--
> 1 file changed
.
>
> Also there's no need for FEATURE-DUMP.libbpf and bpf_helper_defs.h
> files in .gitignore anymore.
>
> Signed-off-by: Jiri Olsa
Acked-by: Song Liu
[...]
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
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.
Signed-off-by: Song Liu
---
.../selftests/bpf/prog_tests/bpf_iter.c | 114 --
tools/testing/selftests/bpf/progs/bpf_iter.h | 8
ave access to bpf_d_path; non-sleepable
programs have access to bpf_spin_lock.
Acked-by: Yonghong Song
Signed-off-by: Song Liu
---
kernel/trace/bpf_trace.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 6c0018abe68a0..1f3becd443
().
Signed-off-by: Song Liu
---
kernel/bpf/task_iter.c | 215 -
1 file changed, 214 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c
index 175b7b42bfc46..31e63b6c3d718 100644
--- a/kernel/bpf/task_iter.c
+++ b
e 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 the selftests. (
On Thu, Feb 4, 2021 at 3:42 AM Tiezhu Yang wrote:
>
> The program is made in a way that everytime an execve syscall
> is executed it prints Hello, BPF World!
>
> This is inspired and based on the code example for the book
> Linux Observability with BPF [1], load_bpf_file() has been
> removed after
On Wed, Feb 3, 2021 at 12:13 AM Ciara Loftus wrote:
>
> This commit introduces tracing infrastructure for AF_XDP sockets
> (xsks) and a new trace event called 'xsk_packet_drop'. This trace
> event is triggered when a packet cannot be processed by the socket
> due to one of the following issues:
>
> On Feb 2, 2021, at 6:19 PM, Alexei Starovoitov
> wrote:
>
> On Wed, Feb 03, 2021 at 12:56:39AM +0000, Song Liu wrote:
>>
>>
>>> On Feb 1, 2021, at 9:38 PM, Alexei Starovoitov
>>> wrote:
>>>
>>> From: Alexei Starovoitov
>&
> On Feb 1, 2021, at 9:38 PM, Alexei Starovoitov
> wrote:
>
> From: Alexei Starovoitov
>
> PTR_TO_BTF_ID registers contain either kernel pointer or NULL.
> Emit the NULL check explicitly by JIT instead of going into
> do_user_addr_fault() on NULL deference.
>
> Signed-off-by: Alexei Starov
7;
> https://ebpf.io/
>
> $ curl -s -S -L https://ebpf.io/ -o /dev/null -w '%{time_redirect}\n'
> 0.000
>
> So update https://bpf.io/ to https://ebpf.io/ to avoid redirects.
>
> Signed-off-by: Tiezhu Yang
Acked-by: Song Liu
> ---
> MAINTAINERS | 2 +
not allocate
new storage when the task is not refcounted (task->usage == 0).
Signed-off-by: Song Liu
---
include/linux/bpf.h| 7 +++
include/linux/bpf_lsm.h| 22 --
include/linux/bpf_types.h | 2 +-
include/linux/sched.h | 5 +
ker
, 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
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 (4):
bpf: enable task local storage for tracing programs
sel
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
> On Jan 27, 2021, at 1:21 PM, Andrii Nakryiko
> wrote:
>
> On Tue, Jan 26, 2021 at 1:21 AM Song Liu wrote:
>>
>> Task local storage is enabled for tracing programs. Add two tests for
>> task local storage without CONFIG_BPF_LSM.
>>
>> The first
> On Jan 15, 2021, at 4:55 PM, Yonghong Song wrote:
>
>
>
> On 1/15/21 3:34 PM, Song Liu wrote:
>>> On Jan 12, 2021, at 8:53 AM, KP Singh wrote:
>>>
>>> On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote:
>>>>
>>>>
>
> On Jan 12, 2021, at 8:53 AM, KP Singh wrote:
>
> On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote:
>>
>>
>>
>> On 1/11/21 3:45 PM, Song Liu wrote:
>>>
>>>
>>>> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote:
>
> On Jan 12, 2021, at 9:17 PM, Yonghong Song wrote:
>
>
>
> On 1/12/21 3:42 PM, Song Liu wrote:
>> syzbot reported a WARNING for allocating too big memory:
>> WARNING: CPU: 1 PID: 8484 at mm/page_alloc.c:4976
>> __alloc_pages_nodemask+0x5f8/0x730 mm/page_
4f98876664c7337a4...@syzkaller.appspotmail.com
Fixes: 1b4d60ec162f ("bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint")
Cc: sta...@vger.kernel.org # v5.10+
Signed-off-by: Song Liu
---
net/bpf/test_run.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/bpf/test_run.c b/net/bpf/tes
> On Jan 11, 2021, at 9:30 AM, Yonghong Song wrote:
>
>
>
> On 1/8/21 3:19 PM, Song Liu wrote:
>> Task local storage is enabled for tracing programs. Add a test for it
>> without CONFIG_BPF_LSM.
>> Signed-off-by: Song Liu
>> ---
>> .../b
> On Jan 11, 2021, at 9:44 AM, KP Singh wrote:
>
> On Mon, Jan 11, 2021 at 6:31 PM Yonghong Song wrote:
>>
>>
>>
>> On 1/8/21 3:19 PM, Song Liu wrote:
>>> Task local storage is enabled for tracing programs. Add a test for it
>>> without
> On Jan 11, 2021, at 9:49 AM, Yonghong Song wrote:
>
>
>
> On 1/8/21 3:19 PM, Song Liu wrote:
>> Replace hashtab with task local storage in runqslower. This improves the
>> performance of these BPF programs. The following table summarizes average
>&
1 - 100 of 1351 matches
Mail list logo