On Thu, May 1, 2025, at 7:28 AM, Lorenz Bauer wrote:
> I'd like to cut down the memory usage of parsing vmlinux BTF in ebpf-go.
> With some upcoming changes the library is sitting at 5MiB for a parse.
> Most of that memory is simply copying the BTF blob into user space.
> By allowing vmlinux BTF to
bpf_check(), as it currently exists, will soon be going away to make way
for loadable BPF verifier support. Fixup selftests so they fentry attach
to a more reliable location.
Signed-off-by: Daniel Xu
---
tools/testing/selftests/bpf/progs/exceptions_assert.c | 2 +-
tools/testing/selftests/bpf
Test that very high constant map keys are not interpreted as an error
value by the verifier. This would previously fail.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
.../selftests/bpf/progs/verifier_array_access.c | 15 +++
1 file changed, 15 insertions(+)
diff --git
Two fixes for nullness elision. See commits for more details.
=== Changelog ===
Changes from v1:
* Reword commit message in patch 1
* Add tags
Daniel Xu (3):
bpf: verifier: Do not extract constant map keys for irrelevant maps
bpf: selftests: Test constant key extraction on irrelevant maps
Test that very high constant map keys are not interpreted as an error
value by the verifier. This would previously fail.
Signed-off-by: Daniel Xu
---
.../selftests/bpf/progs/verifier_array_access.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/tools/testing/selftests
Two fixes for nullness elision. See commits for more details.
Daniel Xu (3):
bpf: verifier: Do not extract constant map keys for irrelevant maps
bpf: selftests: Test constant key extraction on irrelevant maps
bpf: verifier: Disambiguate get_constant_map_key() errors
kernel/bpf/verifier.c
On Thu, Jan 30, 2025, at 7:41 PM, Daniel Xu wrote:
> Hi Ilya,
>
> On Thu, Jan 30, 2025, at 2:06 AM, Ilya Leoshkevich wrote:
>> On Wed, 2025-01-29 at 10:45 -0700, Daniel Xu wrote:
>>> On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
>>> > Hi Ilya,
Hi Yonghong,
On Thu, Jan 30, 2025 at 10:28:11PM -0800, Yonghong Song wrote:
>
>
>
> On 1/30/25 2:33 PM, Daniel Xu wrote:
> > Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
> > libraries"), only statically linking test_progs is support
e. If both options are available, static linking
is chosen.
Signed-off-by: Daniel Xu
---
tools/testing/selftests/bpf/Makefile | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
index 67
Hi Ilya,
On Thu, Jan 30, 2025, at 2:06 AM, Ilya Leoshkevich wrote:
> On Wed, 2025-01-29 at 10:45 -0700, Daniel Xu wrote:
>> On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
>> > Hi Ilya,
>> >
>> > On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leosh
On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
> Hi Ilya,
>
> On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leoshkevich wrote:
> > On Tue, 2025-01-14 at 13:28 -0700, Daniel Xu wrote:
> > > This commit allows progs to elide a null check on statically known
>
Hi Ilya,
On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leoshkevich wrote:
> On Tue, 2025-01-14 at 13:28 -0700, Daniel Xu wrote:
> > This commit allows progs to elide a null check on statically known
> > map
> > lookup keys. In other words, if the verifier can statically p
ointer. So check that we disallow
both.
Signed-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 188 ++
1 file changed, 188 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_arra
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() call
bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
bpf: verifier: Refactor helper access type tracking
bpf: verifier: Support eliding map lookup nulln
: Daniel Xu
---
tools/testing/selftests/bpf/veristat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/veristat.c
b/tools/testing/selftests/bpf/veristat.c
index 974c808f9321..7d0a9cb753e3 100644
--- a/tools/testing/selftests/bpf/veristat.c
On Thu, Jan 02, 2025 at 06:53:54PM -0800, Eduard Zingerman wrote:
> On Thu, 2024-12-19 at 21:09 -0700, Daniel Xu wrote:
>
> lgtm, but please see a note below.
>
> [...]
>
> > +/* Returns constant key value if possible, else negative error */
> > +static s
ointer. So check that we disallow
both.
Signed-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 168 ++
1 file changed, 168 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_arra
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45
* Added a check for when R2 is not a ptr to stack
* Added a check for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() c
On Thu, Dec 19, 2024 at 04:49:13PM -0800, Alexei Starovoitov wrote:
> On Thu, Dec 19, 2024 at 4:43 PM Eduard Zingerman wrote:
> >
> > On Thu, 2024-12-19 at 17:40 -0700, Daniel Xu wrote:
> >
> > [...]
> >
> > > > Ok, thinking a bit more, the best tes
On Thu, Dec 19, 2024 at 04:04:43PM -0800, Eduard Zingerman wrote:
> On Thu, 2024-12-19 at 14:41 -0700, Daniel Xu wrote:
>
> [...]
>
> > > > I think that if test operates on a key like:
> > > >
> > > > valid key 15
> > > >
On Mon, Dec 16, 2024 at 03:24:01PM -0800, Andrii Nakryiko wrote:
> On Fri, Dec 13, 2024 at 7:13 PM Eduard Zingerman wrote:
> >
> > On Fri, 2024-12-13 at 19:44 -0700, Daniel Xu wrote:
> >
> > [...]
> >
> > > > > + /* First handle precisely t
On Mon, Dec 16, 2024 at 03:24:01PM -0800, Andrii Nakryiko wrote:
> On Fri, Dec 13, 2024 at 7:13 PM Eduard Zingerman wrote:
> >
> > On Fri, 2024-12-13 at 19:44 -0700, Daniel Xu wrote:
> >
[...]
> >
> > > > with Eduard's suggestion this also becomes
On Fri, Dec 13, 2024, at 10:17 PM, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
>> Test that nullness elision works for common use cases. For example, we
>> want to check that both full and subreg stack slots are recognized. As
>> well as wh
On Fri, Dec 13, 2024 at 03:02:11PM GMT, Andrii Nakryiko wrote:
> On Thu, Dec 12, 2024 at 3:23 PM Daniel Xu wrote:
> >
> > This commit allows progs to elide a null check on statically known map
> > lookup keys. In other words, if the verifier can statically prove that
>
On Thu, Dec 12, 2024 at 08:04:45PM GMT, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
>
> I think these changes are fine in general, but see below.
>
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 58b36cc96
On Thu, Dec 12, 2024 at 08:04:28PM GMT, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
> > Previously, the verifier was treating all PTR_TO_STACK registers passed
> > to a helper call as potentially written to by the helper. However, a
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
Test that nullness elision works for common use cases. For example, we
want to check that both full and subreg stack slots are recognized. As
well as when there's both const and non-const values of R2 leading up to
a lookup. And obviously some bound checks.
Signed-off-by: Daniel Xu
---
..
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45 +++
.../testing
ck for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() call
bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
bpf
Extend the rss_ctx test suite to test that an ntuple action that
redirects to an RSS context contains that information in `ethtool -n`.
Otherwise the output from ethtool is highly deceiving. This test helps
ensure drivers are compliant with the API.
Signed-off-by: Daniel Xu
---
tools/testing
to net instead of net-next
* Make regex work with ethtool output changes
Changes from v1:
* Add selftest in patch 2
Daniel Xu (2):
bnxt_en: ethtool: Supply ntuple rss context action
selftests: drv-net: rss_ctx: Add test for ntuple rule
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8
Hi Jakub,
On Tue, Nov 12, 2024, at 5:44 PM, Jakub Kicinski wrote:
> On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Othe
Hi Ed,
On Tue, Nov 12, 2024, at 3:10 AM, Edward Cree wrote:
> On 12/11/2024 02:23, Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Otherwise the output f
This patchset fixes a bug where bnxt driver was failing to report that
an ntuple rule is redirecting to an RSS context. First commit is the
fix, then second commit extends selftests to detect if other/new drivers
are compliant with ntuple/rss_ctx API.
Daniel Xu (2):
bnxt_en: ethtool: Supply
Extend the rss_ctx test suite to test that an ntuple action that
redirects to an RSS context contains that information in `ethtool -n`.
Otherwise the output from ethtool is highly deceiving. This test helps
ensure drivers are compliant with the API.
Signed-off-by: Daniel Xu
---
tools/testing
d-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 183 ++
1 file changed, 183 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_array_access.c
index 95d7ecc12963..872edded1623 1
ck for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (2):
bpf: verifier: Support eliding map lookup nullness
bpf: selftests: verifier: Add nullness elision tests
k
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
-
On Wed, Sep 25, 2024 at 10:24:01AM GMT, Alexei Starovoitov wrote:
> On Tue, Sep 24, 2024 at 12:40 PM Daniel Xu wrote:
> >
> > +
> > +/* Returns constant key value if possible, else -1 */
> > +static long get_constant_map_key(s
Hit send too early.
On Tue, Oct 1, 2024, at 5:07 PM, Daniel Xu wrote:
> On Wed, Sep 25, 2024 at 10:24:01AM GMT, Alexei Starovoitov wrote:
>> On Tue, Sep 24, 2024 at 12:40 PM Daniel Xu wrote:
>> >
>> > +
>> > +/* Returns constant key value if po
d-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 166 ++
1 file changed, 166 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_array_access.c
index 95d7ecc12963..2e74504ddbb5 1
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
e for when R2 can be both const and non-const
Daniel Xu (2):
bpf: verifier: Support eliding map lookup nullness
bpf: selftests: verifier: Add nullness elision tests
kernel/bpf/verifier.c | 67 ++-
tools/testing/selftests/bpf/progs/iters.c | 14 +-
...
On Fri, Sep 20, 2024 at 03:05:35PM GMT, Eduard Zingerman wrote:
> On Sun, 2024-09-15 at 21:45 -0600, Daniel Xu wrote:
> > This commit allows progs to elide a null check on statically known map
> > lookup keys. In other words, if the verifier can statically prove that
> >
Test that nullness elision works for common use cases. For example, we
want to check that both full and subreg stack slots are recognized. As
well as when there's both const and non-const values of R2 leading up to
a lookup. And obviously some bound checks.
Signed-off-by: Daniel Xu
---
..
bytes. In these situations, it is
desirable for the programmer to express: "this lookup should never fail,
and if it does, it means I messed up the code". By omitting the null
check, the programmer can "ask" the verifier to double check the logic.
Signed-off-by: Daniel
k for when R2 is not a ptr to stack
* Added a check for when stack is uninitialized (no stack slot yet)
* Fix spinlock reg id bumping
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (2):
bpf: verifier: Support eliding
Test that nullness elision works for common use cases. For example, we
want to check that both full and subreg stack slots recognized. As well
as multiple lookups. And obviously some bound checks.
Signed-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 143
bytes. In these situations, it is
desirable for the programmer to express: "this lookup should never fail,
and if it does, it means I messed up the code". By omitting the null
check, the programmer can "ask" the verifier to double check the logic.
Daniel Xu (2):
bpf: verifier:
On Thu, Sep 12, 2024, at 2:40 AM, Jesper Dangaard Brouer wrote:
> On 11/09/2024 20.53, Daniel Xu wrote:
>> On Wed, Sep 11, 2024 at 10:32:56AM GMT, Jesper Dangaard Brouer wrote:
>>>
>>>
>>> On 11/09/2024 06.43, Daniel Xu wrote:
>>>> [cc Jesper]
&g
On Wed, Sep 11, 2024 at 10:32:56AM GMT, Jesper Dangaard Brouer wrote:
>
>
> On 11/09/2024 06.43, Daniel Xu wrote:
> > [cc Jesper]
> >
> > On Tue, Sep 10, 2024, at 8:31 PM, Daniel Xu wrote:
> > > On Tue, Sep 10, 2024 at 05:39:55PM GMT, Andrii Nakryiko wrot
[cc Jesper]
On Tue, Sep 10, 2024, at 8:31 PM, Daniel Xu wrote:
> On Tue, Sep 10, 2024 at 05:39:55PM GMT, Andrii Nakryiko wrote:
>> On Tue, Sep 10, 2024 at 4:44 PM Daniel Xu wrote:
>> >
>> > On Tue, Sep 10, 2024 at 03:21:04PM GMT, Andrii Nakryiko wrote:
>> &g
On Tue, Sep 10, 2024 at 05:39:55PM GMT, Andrii Nakryiko wrote:
> On Tue, Sep 10, 2024 at 4:44 PM Daniel Xu wrote:
> >
> > On Tue, Sep 10, 2024 at 03:21:04PM GMT, Andrii Nakryiko wrote:
> > > On Tue, Sep 10, 2024 at 3:16 PM Daniel Xu wrote:
> > > >
> > &g
On Tue, Sep 10, 2024 at 03:21:04PM GMT, Andrii Nakryiko wrote:
> On Tue, Sep 10, 2024 at 3:16 PM Daniel Xu wrote:
> >
> >
> >
> > On Tue, Sep 10, 2024, at 2:07 PM, Daniel Xu wrote:
> > > On Tue, Sep 10, 2024 at 01:41:41PM GMT, Andrii Nakryiko wrote:
> >
On Tue, Sep 10, 2024, at 2:07 PM, Daniel Xu wrote:
> On Tue, Sep 10, 2024 at 01:41:41PM GMT, Andrii Nakryiko wrote:
>> On Tue, Sep 10, 2024 at 11:36 AM Alexei Starovoitov
[...]
>
>>
>> Also, Daniel, can you please make sure that dynptr we return for each
>> sam
On Tue, Sep 10, 2024 at 01:41:41PM GMT, Andrii Nakryiko wrote:
> On Tue, Sep 10, 2024 at 11:36 AM Alexei Starovoitov
> wrote:
> >
> > On Mon, Sep 9, 2024 at 5:55 PM Daniel Xu wrote:
> > >
> > > Right now there exists prog produce / userspace consume and us
On Tue, Sep 10, 2024 at 11:36:36AM GMT, Alexei Starovoitov wrote:
> On Mon, Sep 9, 2024 at 5:55 PM Daniel Xu wrote:
> >
> > Right now there exists prog produce / userspace consume and userspace
> > produce / prog consume support. But it is also useful to have prog
>
use case - there is no need to involve
kernel for that.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 6 +-
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/ringbuf.c| 50 +++
.../bpf/progs
__u64 *. You can see
evidence of that intent in a3a5113393cc ("selftests/bpf: Add kprobe
session cookie test").
Fix conflict by changing kfunc definition.
Fixes: 5c919acef851 ("bpf: Add support for kprobe session cookie")
Signed-off-by: Daniel Xu
---
kernel/trace/bpf_tr
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 addin
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/
so that userspace 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
are introduced 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 instr
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
osleep+150
do_syscall_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 +++-
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
> &
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 back.
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) th
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 pro
gress
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/self
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
uninitialized 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
* a
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 &
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
> 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/strnc
gress
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/self
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
s 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_from_user.c: Don't overcopy bytes after NUL
gress
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/self
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 mast
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
1 - 100 of 147 matches
Mail list logo