On Thu, Apr 08, 2021 at 04:13:32PM -0700, Darrick J. Wong wrote:
> On Wed, Apr 07, 2021 at 02:46:10PM -0700, Daniel Xu wrote:
> > There currently does not exist a way to answer the question: "What is in
> > the page cache?". There are various heuristics and counters but
On Thu, Apr 08, 2021 at 04:45:37PM +, Al Viro wrote:
> On Wed, Apr 07, 2021 at 02:46:11PM -0700, Daniel Xu wrote:
>
> > +static void fini_seq_pagecache(void *priv_data)
> > +{
> > + struct bpf_iter_seq_pagecache_info *info = priv_data;
> > + struct radix_
On Thu, Apr 08, 2021 at 10:19:35AM +0200, Christian Brauner wrote:
> On Wed, Apr 07, 2021 at 02:46:11PM -0700, Daniel Xu wrote:
> > This commit introduces the bpf page cache iterator. This iterator allows
> > users to run a bpf prog against each page in the "page cache".
On Thu, Apr 08, 2021 at 07:14:01AM +0100, Matthew Wilcox wrote:
> On Wed, Apr 07, 2021 at 02:46:11PM -0700, Daniel Xu wrote:
> > +struct bpf_iter_seq_pagecache_info {
> > + struct mnt_namespace *ns;
> > + struct radix_tree_root superblocks;
>
> Why are you ad
Hi Christian, thanks for taking a look.
On Thu, Apr 08, 2021 at 09:51:17AM +0200, Christian Brauner wrote:
> On Wed, Apr 07, 2021 at 02:46:10PM -0700, Daniel Xu wrote:
> > There currently does not exist a way to answer the question: "What is in
> > the page cache?". The
n the
caller's mount namespace.
Signed-off-by: Daniel Xu
---
kernel/bpf/Makefile | 2 +-
kernel/bpf/pagecache_iter.c | 293
2 files changed, 294 insertions(+), 1 deletion(-)
create mode 100644 kernel/bpf/pagecache_iter.c
diff --git a/kernel/bpf/M
ace can more easily tell which pages are
duplicate
Daniel Xu (1):
bpf: Introduce iter_pagecache
kernel/bpf/Makefile | 2 +-
kernel/bpf/pagecache_iter.c | 293
2 files changed, 294 insertions(+), 1 deletion(-)
create mode 100644 kernel/b
ntroduced to the series.
>
> Daniel, can you also test this again? I and Josh discussed a bit different
> method and I've implemented it on this version.
Works great, thanks!
Tested-by: Daniel Xu
>
> This actually changes the kretprobe behavisor a bit, now the instraction
n-graph
> tracer in the unwind_next_frame().
>
> Signed-off-by: Masami Hiramatsu
>
I applied your original patchset + Josh's patch + this patch and can
confirm it works for bpftrace + kretprobes.
Tested-by: Daniel Xu
Hi Masami,
Just want to clarify a few points:
On Mon, Mar 08, 2021 at 11:52:10AM +0900, Masami Hiramatsu wrote:
> On Sun, 7 Mar 2021 13:23:33 -0800
> Daniel Xu wrote:
> To help your understanding, let me explain.
>
> If we have a code here
>
> caller_func:
> 0x00
On Sat, Mar 06, 2021 at 10:13:57AM +0900, Masami Hiramatsu wrote:
> On Fri, 5 Mar 2021 11:16:45 -0800
> Daniel Xu wrote:
>
> > Hi Masami,
> >
> > On Sat, Mar 06, 2021 at 12:38:57AM +0900, Masami Hiramatsu wrote:
> > > Hello,
> > >
> > > H
On Fri, Mar 05, 2021 at 01:32:44PM -0600, Josh Poimboeuf wrote:
> On Fri, Mar 05, 2021 at 11:25:15AM -0800, Daniel Xu wrote:
> > > BTW, is this a regression? or CONFIG_UNWINDER_ORC has this issue before?
> > > It seems that the above commit just changed the default unwind
On Fri, Mar 05, 2021 at 07:58:09PM +0900, Masami Hiramatsu wrote:
> On Fri, 5 Mar 2021 18:28:06 +0900
> Masami Hiramatsu wrote:
>
> > Hi Daniel,
> >
> > On Thu, 4 Mar 2021 16:07:52 -0800
> > Daniel Xu wrote:
> >
> > > Getting a stack trace
Hi Masami,
On Sat, Mar 06, 2021 at 12:38:57AM +0900, Masami Hiramatsu wrote:
> Hello,
>
> Here is a series of patches for kprobes and stacktracer to fix the kretprobe
> entries in the kernel stack. This was reported by Daniel Xu. I thought that
> was in the bpftrace, but it i
call_64+51
entry_SYSCALL_64_after_hwframe+68
]: 12
Fixes: fc72ae40e303 ("x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in
kconfig for 64-bit")
Signed-off-by: Daniel Xu
---
arch/x86/kernel/unwind_orc.c | 53 +++-
kernel/kprobes.c
On Wed, Mar 3, 2021, at 6:18 PM, Daniel Xu wrote:
> On Wed, Mar 03, 2021 at 03:37:40PM -0500, Steven Rostedt wrote:
> > On Wed, 03 Mar 2021 12:13:08 -0800
> > "Daniel Xu" wrote:
> >
> > > On Wed, Mar 3, 2021, at 11:58 AM, Daniel Xu wrote:
> > > &
On Wed, Mar 03, 2021 at 03:37:40PM -0500, Steven Rostedt wrote:
> On Wed, 03 Mar 2021 12:13:08 -0800
> "Daniel Xu" wrote:
>
> > On Wed, Mar 3, 2021, at 11:58 AM, Daniel Xu wrote:
> > > On Wed, Mar 03, 2021 at 09:26:04AM -0500, Steven Rostedt wrote:
> &g
On Wed, Mar 03, 2021 at 01:48:28PM +0900, Masami Hiramatsu wrote:
> Hi Daniel,
>
> On Tue, 02 Mar 2021 17:15:13 -0800
> "Daniel Xu" wrote:
>
> > Hi Masami,
> >
> > Jakub reported a bug with kretprobe stack traces -- wondering if you've
> > g
On Wed, Mar 03, 2021 at 09:26:04AM -0500, Steven Rostedt wrote:
> On Wed, 3 Mar 2021 13:48:28 +0900
> Masami Hiramatsu wrote:
>
> >
> > >
> > > I think (can't prove) this used to work:
>
> Would be good to find out if it did.
I'm installing some older kernels now to check. Will report
On Wed, Mar 3, 2021, at 11:58 AM, Daniel Xu wrote:
> On Wed, Mar 03, 2021 at 09:26:04AM -0500, Steven Rostedt wrote:
> > On Wed, 3 Mar 2021 13:48:28 +0900
> > Masami Hiramatsu wrote:
> >
> > >
> > > >
> > > > I think (can't prove) t
On Tue, Mar 02, 2021 at 06:18:23PM -0800, Alexei Starovoitov wrote:
> On Tue, Mar 2, 2021 at 5:46 PM Andy Lutomirski wrote:
> >
> >
> > > On Mar 2, 2021, at 5:22 PM, Alexei Starovoitov
> > > wrote:
> > >
> > > On Tue, Mar 2, 2021 at 1:02 PM Andy Lutomirski
> > > wrote:
> > >>
> > >>
> >
Hi Masami,
Jakub reported a bug with kretprobe stack traces -- wondering if you've gotten
any bug reports related to stack traces being broken for kretprobes.
I think (can't prove) this used to work:
# bpftrace -e 'kretprobe:__tcp_retransmit_skb { @[kstack()] = count() }'
Attaching 1
bpf_probe_read_user_str() again.
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 71 +++
.../bpf/progs/test_probe_read_user_str.c | 25 +++
2 files changed, 96 insertions(+)
create mode 100644 tools/testing/selftests
ernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
As mentioned in the v6 discussion, I didn't think it would make a lot
of sense to put a comment in kernel/bpf/hashtab.c:alloc_htab_elem .
I opted to add the comment to bpf_probe_read_user_str_common() b/c it
tialized memory
v3 -> v4:
* directly pass userspace pointer to prog
* test more strings of different length
v2 -> v3:
* set pid filter before attaching prog in selftest
* use long instead of int as bpf_probe_read_user_str() retval
* style changes
v1 -> v2:
* add Fixes: tag
* add se
Hi Linus,
On Mon, Nov 16, 2020 at 02:15:52PM -0800, Linus Torvalds wrote:
> On Mon, Nov 16, 2020 at 1:17 PM Daniel Xu wrote:
> >
> > Based on on-list discussion and some off-list discussion with Alexei,
> > I'd like to propose the v4-style patch without the `(*out & ~mas
ernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
Based on on-list discussion and some off-list discussion with Alexei,
I'd like to propose the v4-style patch without the `(*out & ~mask)`
bit.
We can't really zero out the rest of the buffer due to ABI issues
v4:
* directly pass userspace pointer to prog
* test more strings of different length
v2 -> v3:
* set pid filter before attaching prog in selftest
* use long instead of int as bpf_probe_read_user_str() retval
* style changes
v1 -> v2:
* add Fixes: tag
* add selftest
Daniel Xu (2):
lib/strncpy_fr
bpf_probe_read_user_str() again.
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 71 +++
.../bpf/progs/test_probe_read_user_str.c | 25 +++
2 files changed, 96 insertions(+)
create mode 100644 tools/testing/selftests
On Wed Nov 11, 2020 at 3:22 PM PST, Andrii Nakryiko wrote:
> On Wed, Nov 11, 2020 at 2:46 PM Daniel Xu wrote:
> >
> > 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} and probe_read_{user,
> > kernel}_str helpers") introduced a subtle bug where
> > bpf_pr
{user, kernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
lib/strncpy_from_user.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index e6d5fcc2cdf3..83180742e729 100644
bae607b0524632b7793 ("[PATCH bpf v3 2/2]
> > selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after
> > NUL")
> > url:
> > https://github.com/0day-ci/linux/commits/Daniel-Xu/Fix-bpf_probe_read_user_str-overcopying/20201106-033210
> > base: https
different length
v2 -> v3:
* set pid filter before attaching prog in selftest
* use long instead of int as bpf_probe_read_user_str() retval
* style changes
v1 -> v2:
* add Fixes: tag
* add selftest
Daniel Xu (2):
lib/strncpy_from_user.c: Don't overcopy bytes after NUL terminato
bpf_probe_read_user_str() again.
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 71 +++
.../bpf/progs/test_probe_read_user_str.c | 25 +++
2 files changed, 96 insertions(+)
create mode 100644 tools/testing/selftests
om_user.c: Don't overcopy bytes after NUL terminator")
> > url:
> > https://github.com/0day-ci/linux/commits/Daniel-Xu/lib-strncpy_from_user-c-Don-t-overcopy-bytes-after-NUL-terminator/20201104-103306
> > base: https://git.kernel.org/cgit/linux/kernel/git/bpf/bpf-next.git master
[
ernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
lib/strncpy_from_user.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index e6d5fcc2cdf3..82a67dde136b 100644
--- a/lib/strncpy_f
e attaching prog in selftest
* use long instead of int as bpf_probe_read_user_str() retval
* style changes
v1 -> v2:
* add Fixes: tag
* add selftest
Daniel Xu (2):
lib/strncpy_from_user.c: Don't overcopy bytes after NUL terminator
selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes
bpf_probe_read_user_str() again.
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 71 +++
.../bpf/progs/test_probe_read_user_str.c | 25 +++
2 files changed, 96 insertions(+)
create mode 100644 tools/testing/selftests/bpf/prog_tests/probe_read_user_str.c
create
On Thu Nov 5, 2020 at 3:31 PM PST, Song Liu wrote:
>
>
> > On Nov 5, 2020, at 3:22 PM, Daniel Xu wrote:
> >
> > On Thu Nov 5, 2020 at 1:32 PM PST, Andrii Nakryiko wrote:
> >> On Wed, Nov 4, 2020 at 8:51 PM Daniel Xu wrote:
> > [...]
> >>
On Thu Nov 5, 2020 at 1:32 PM PST, Andrii Nakryiko wrote:
> On Wed, Nov 4, 2020 at 8:51 PM Daniel Xu wrote:
[...]
> > diff --git a/tools/testing/selftests/bpf/progs/test_probe_read_user_str.c
> > b/tools/testing/selftests/bpf/progs/test_probe_read_user_str.c
> > new file
ges
v1 -> v2:
* add Fixes: tag
* add selftest
Daniel Xu (2):
lib/strncpy_from_user.c: Don't overcopy bytes after NUL terminator
selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes
after NUL
lib/strncpy_from_user.c | 9 ++-
.../bpf/prog_tests/probe
ernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
lib/strncpy_from_user.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index e6d5fcc2cdf3..82a67dde136b 100644
--- a/lib/strncpy_f
bpf_probe_read_user_str() again.
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 60 +++
.../bpf/progs/test_probe_read_user_str.c | 34 +++
2 files changed, 94 insertions(+)
create mode 100644 tools/testing/selftests/bpf/prog_tests/probe_read_user_str.c
On Thu Nov 5, 2020 at 10:30 AM PST, Song Liu wrote:
>
>
> > On Nov 4, 2020, at 6:25 PM, Daniel Xu wrote:
> >
> > Previously, bpf_probe_read_user_str() could potentially overcopy the
> > trailing bytes after the NUL due to how do_strncpy_from_user() does the
On Thu Nov 5, 2020 at 10:16 AM PST, Song Liu wrote:
>
>
> > On Nov 4, 2020, at 6:25 PM, Daniel Xu wrote:
> >
> > do_strncpy_from_user() may copy some extra bytes after the NUL
>
> We have multiple use of "NUL" here, should be "NULL"?
>
>
ernel} and probe_read_{user,
kernel}_str helpers")
Signed-off-by: Daniel Xu
---
lib/strncpy_from_user.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
index e6d5fcc2cdf3..d084189eb05c 100644
--- a/lib/strncpy_f
bpf_probe_read_user_str() again.
Signed-off-by: Daniel Xu
---
.../bpf/prog_tests/probe_read_user_str.c | 60 +++
.../bpf/progs/test_probe_read_user_str.c | 34 +++
2 files changed, 94 insertions(+)
create mode 100644 tools/testing/selftests/bpf/prog_tests/probe_read_user_str.c
s map keys,
as seemingly identical strings can occupy multiple entries in a map.
This patchset fixes the issue and introduces a selftest to prevent
future regressions.
Daniel Xu (2):
lib/strncpy_from_user.c: Don't overcopy bytes after NUL terminator
selftest/bpf: Test bpf_probe_read_user_str() strip
On Wed Nov 4, 2020 at 2:36 PM PST, Daniel Borkmann wrote:
> On 11/4/20 9:18 PM, Daniel Xu wrote:
> > On Wed Nov 4, 2020 at 8:24 AM PST, Daniel Borkmann wrote:
> >> On 11/4/20 3:29 AM, Daniel Xu wrote:
> >>> do_strncpy_from_user() may copy some extra bytes
Hi Daniel,
On Wed Nov 4, 2020 at 8:24 AM PST, Daniel Borkmann wrote:
> On 11/4/20 3:29 AM, Daniel Xu wrote:
> > do_strncpy_from_user() may copy some extra bytes after the NUL
> > terminator into the destination buffer. This usually does not matter for
> > normal string oper
bytes after the NUL
terminator, it can result in seemingly identical strings occupying
multiple slots in a BPF map. This behavior is subtle and totally
unexpected by the user.
This commit uses the proper word-at-a-time APIs to avoid overcopying.
Signed-off-by: Daniel Xu
---
lib/strncpy_from_user.c
Hi Andrii,
On Tue May 26, 2020 at 3:09 PM PST, Andrii Nakryiko wrote:
> On Tue, May 26, 2020 at 7:09 PM Daniel Xu wrote:
> >
> > Right now the libbpf model encourages loading the entire object at once.
> > In this model, libbpf handles loading BTF from vmlinux for us
, there was perviously no way to load BTF on-demand.
This commit exports the bpf_object__load_vmlinux_btf such that we are
able to load BTF on demand.
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 2 +-
tools/lib/bpf/libbpf.h | 1 +
tools/lib/bpf/libbpf.map | 1 +
3 files changed, 3 insertions(+), 1
Hi Jiri,
On Tue Sep 24, 2019 at 10:33 AM Jiri Olsa wrote:
> On Tue, Sep 17, 2019 at 06:30:52AM -0700, Daniel Xu wrote:
>
> SNIP
>
> > + PERF_FORMAT_MAX = 1U << 5, /* non-ABI */
> > };
> >
> > #define PERF_ATTR_SIZE_VER064
On Tue Sep 17, 2019 at 10:32 PM kbuild test robot wrote:
> All errors (new ones prefixed by >>):
>
>kernel/events/core.c: In function 'perf_event_lost':
> >> kernel/events/core.c:4753:11: error: implicit declaration of function
> >> 'perf_kprobe_missed'; did you mean 'perf_release'?
> >>
Signed-off-by: Daniel Xu
---
tools/include/uapi/linux/perf_event.h | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/perf_event.h
b/tools/include/uapi/linux/perf_event.h
index 7198ddd0c6b1..bd874c7257f0 100644
--- a/tools/include/uapi/linux
There is no way to get the nmissed count from kprobes that are created
using the perf API. The previous commits added read_format support for
this count. Enable it in this commit.
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions
Signed-off-by: Daniel Xu
---
.../selftests/bpf/prog_tests/attach_probe.c | 32 ++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
index 5ecc267d98b0
infrastructure and misses from ringbuffer infrastructure.
Signed-off-by: Daniel Xu
---
include/linux/trace_events.h| 1 +
include/uapi/linux/perf_event.h | 5 -
kernel/events/core.c| 39 ++---
kernel/trace/trace_kprobe.c | 8 +++
4 files changed
it clear to users what they can
expect to extract from what type of link.
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 21 +
tools/lib/bpf/libbpf.h | 13 +
tools/lib/bpf/libbpf.map | 3 +++
3 files changed
hing while reading the code so please let
me know if I am mistaken.
Daniel Xu (5):
perf/core: Add PERF_FORMAT_LOST read_format
perf/core: Sync perf_event.h to tools
libbpf: Add helpers to extract perf fd from bpf_link
libbpf: Set read_format PERF_FORMAT_LOST on kprobe perf fds
libbpf: Ad
On Thu Aug 22, 2019 at 11:05 AM Peter Zijlstra wrote:
> On Thu, Aug 22, 2019 at 07:54:16AM +, Song Liu wrote:
> > Hi Peter,
> >
> > > On Aug 22, 2019, at 12:47 AM, Peter Zijlstra wrote:
> > >
> > > On Wed, Aug 21, 2019 at 06:43:49PM +, Yonghong Song wrote:
> > >> On 8/21/19 11:31 AM,
it clear to users what they can
expect to extract from what type of link.
Acked-by: Song Liu
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 21 +
tools/lib/bpf/libbpf.h | 13 +
tools/lib/bpf/libbpf.map | 3 +++
3 files changed, 37
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
.../selftests/bpf/prog_tests/attach_probe.c | 115 ++
1 file changed, 115 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
index
Signed-off-by: Daniel Xu
---
tools/include/uapi/linux/perf_event.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/include/uapi/linux/perf_event.h
b/tools/include/uapi/linux/perf_event.h
index 7198ddd0c6b1..8783d29a807a 100644
--- a/tools/include/uapi/linux
but leave the possibility open for other probes like tracepoint.
Signed-off-by: Daniel Xu
---
include/linux/trace_events.h| 2 ++
include/uapi/linux/perf_event.h | 23 +++
kernel/events/core.c| 20
kernel/trace/trace_kprobe.c | 25
rom ioctl struct
- Split out libbpf.h sync to tools dir to separate commit
Daniel Xu (4):
tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE ioctl
libbpf: Add helpers to extract perf fd from bpf_link
tracing/probe: Sync perf_event.h to tools
tracing/probe: Add self test for PERF_EVENT_IOC_QU
Hi Peter,
On Tue Aug 20, 2019 at 4:45 PM Peter Zijlstra wrote:
> On Fri, Aug 16, 2019 at 03:31:46PM -0700, Daniel Xu wrote:
> > It's useful to know [uk]probe's nmissed and nhit stats. For example with
> > tracing tools, it's important to know when events may have been lost.
> &
On Mon Aug 19, 2019 at 6:26 PM Alexei Starovoitov wrote:
> On Fri, Aug 16, 2019 at 3:33 PM Daniel Xu wrote:
> >
> > It's useful to know [uk]probe's nmissed and nhit stats. For example with
> > tracing tools, it's important to know when events may have been lost.
> >
On Mon, Aug 19, 2019, at 10:45 AM, Andrii Nakryiko wrote:
> On Fri, Aug 16, 2019 at 3:32 PM Daniel Xu wrote:
> >
> > It is sometimes necessary to perform ioctl's on the underlying perf fd.
> > There is not currently a way to extract the fd given a bpf_link, so add a
Signed-off-by: Daniel Xu
---
tools/include/uapi/linux/perf_event.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/tools/include/uapi/linux/perf_event.h
b/tools/include/uapi/linux/perf_event.h
index 7198ddd0c6b1..8783d29a807a 100644
--- a/tools/include/uapi/linux
but leave the possibility open for other probes like tracepoint.
Signed-off-by: Daniel Xu
---
include/linux/trace_events.h| 12
include/uapi/linux/perf_event.h | 23 +++
kernel/events/core.c| 20
kernel/trace/trace_kprobe.c
it clear to users what they can
expect to extract from what type of link.
Acked-by: Song Liu
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 21 +
tools/lib/bpf/libbpf.h | 13 +
tools/lib/bpf/libbpf.map | 4
3 files changed, 38 insertions(+)
diff --git
iptive cover letter
- Make API more generic and support uprobes as well
- Use casters/getters for libbpf instead of single getter
- Fix typos
- Remove size field from ioctl struct
- Split out libbpf.h sync to tools dir to separate commit
Daniel Xu (4):
tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE
Acked-by: Andrii Nakryiko
Signed-off-by: Daniel Xu
---
.../selftests/bpf/prog_tests/attach_probe.c | 106 ++
1 file changed, 106 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
index
On Tue, Aug 13, 2019, at 2:47 PM, Song Liu wrote:
> On Fri, Aug 9, 2019 at 2:48 PM Daniel Xu wrote:
> >
> > It's useful to know [uk]probe's nmissed and nhit stats. For example with
> > tracing tools, it's important to know when events may have been lost.
> > debugfs
On Mon, Aug 12, 2019, at 8:57 AM, Andrii Nakryiko wrote:
> On Fri, Aug 9, 2019 at 2:47 PM Daniel Xu wrote:
> >
> > It's useful to know [uk]probe's nmissed and nhit stats. For example with
> > tracing tools, it's important to know when events may have been lost.
> >
On Fri, Aug 9, 2019, at 2:47 PM, Daniel Xu wrote:
> It's useful to know [uk]probe's nmissed and nhit stats. For example with
> tracing tools, it's important to know when events may have been lost.
> debugfs currently exposes a control file to get this information, but
> it is no
Signed-off-by: Daniel Xu
---
tools/include/uapi/linux/perf_event.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/include/uapi/linux/perf_event.h
b/tools/include/uapi/linux/perf_event.h
index 7198ddd0c6b1..65faa9b2a3b4 100644
--- a/tools/include/uapi/linux
Signed-off-by: Daniel Xu
---
.../selftests/bpf/prog_tests/attach_probe.c | 102 ++
1 file changed, 102 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
index 5ecc267d98b0..bb53103ddb66
ync to tools dir to separate commit
Daniel Xu (4):
tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE ioctl
libbpf: Add helpers to extract perf fd from bpf_link
tracing/probe: Sync perf_event.h to tools
tracing/probe: Add self test for PERF_EVENT_IOC_QUERY_PROBE
include/linux/trace_event
but leave the possibility open for other probes like tracepoint.
Signed-off-by: Daniel Xu
---
include/linux/trace_events.h| 12
include/uapi/linux/perf_event.h | 19 +++
kernel/events/core.c| 20
kernel/trace/trace_kprobe.c
it clear to users what they can
expect to extract from what type of link.
Signed-off-by: Daniel Xu
---
tools/lib/bpf/libbpf.c | 19 +++
tools/lib/bpf/libbpf.h | 8
tools/lib/bpf/libbpf.map | 6 ++
3 files changed, 33 insertions(+)
diff --git a/tools/lib/bpf/libbpf.c b
83 matches
Mail list logo