BPF List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	mingo@kernel.org, andrii@kernel.org,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	oleg@redhat.com, jolsa@kernel.org, clm@meta.com,
	paulmck@kernel.org, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH 00/10] perf/uprobe: Optimize uprobes
Date: Wed, 10 Jul 2024 14:34:18 +0200	[thread overview]
Message-ID: <20240710123418.GH28838@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20240710101239.GW27299@noisy.programming.kicks-ass.net>

On Wed, Jul 10, 2024 at 12:12:39PM +0200, Peter Zijlstra wrote:

> > [   11.262797] ------------[ cut here ]------------
> > [   11.263162] refcount_t: underflow; use-after-free.
> > [   11.263474] WARNING: CPU: 1 PID: 2409 at lib/refcount.c:28
> > refcount_warn_saturate+0x99/0xda
> > [   11.263995] Modules linked in: bpf_testmod(OE) aesni_intel(E)
> > crypto_simd(E) floppy(E) cryptd(E) i2c_piix4(E) crc32c_intel(E)
> > button(E) i2c_core(E) i6300esb(E) pcspkr(E) serio_raw(E)
> > [   11.265105] CPU: 1 PID: 2409 Comm: test_progs Tainted: G
> > OE      6.10.0-rc6-gd3f5cbffe86b #1263
> > [   11.265740] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
> > BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
> > [   11.266507] RIP: 0010:refcount_warn_saturate+0x99/0xda
> > [   11.266862] Code: 05 ba 29 1d 02 01 e8 e2 c0 b4 ff 0f 0b c3 80 3d
> > aa 29 1d 02 00 75 53 48 c7 c7 20 59 50 82 c6 05 9a 29 1d 02 01 e8 c3
> > c0 b4 ff <0f> 0b c3 80 3d 8a 29 1d 02 00 75 34 a
> > [   11.268099] RSP: 0018:ffffc90001fbbd60 EFLAGS: 00010282
> > [   11.268451] RAX: 0000000000000026 RBX: ffff88810f333000 RCX: 0000000000000027
> > [   11.268931] RDX: 0000000000000000 RSI: ffffffff82580a45 RDI: 00000000ffffffff
> > [   11.269417] RBP: ffff888105937818 R08: 0000000000000000 R09: 0000000000000000
> > [   11.269910] R10: 00000000756f6366 R11: 0000000063666572 R12: ffff88810f333030
> > [   11.270387] R13: ffffc90001fbbb80 R14: ffff888100535190 R15: dead000000000100
> > [   11.270870] FS:  00007fc938bd2d00(0000) GS:ffff88881f680000(0000)
> > knlGS:0000000000000000
> > [   11.271363] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [   11.271725] CR2: 000000000073a005 CR3: 00000001127d5004 CR4: 0000000000370ef0
> > [   11.272220] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > [   11.272693] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > [   11.273182] Call Trace:
> > [   11.273370]  <TASK>
> > [   11.273518]  ? __warn+0x8b/0x14d
> > [   11.273753]  ? report_bug+0xdb/0x151
> > [   11.273997]  ? refcount_warn_saturate+0x99/0xda
> > [   11.274326]  ? handle_bug+0x3c/0x5b
> > [   11.274564]  ? exc_invalid_op+0x13/0x5c
> > [   11.274831]  ? asm_exc_invalid_op+0x16/0x20
> > [   11.275119]  ? refcount_warn_saturate+0x99/0xda
> > [   11.275428]  uprobe_unregister_nosync+0x61/0x7c
> > [   11.275768]  __probe_event_disable+0x5d/0x7d
> > [   11.276069]  probe_event_disable+0x50/0x58
> 
> This I'll have to stare at for a bit.

I found one put_uprobe() that should've now been a srcu_read_unlock().
That might explain things.

      reply	other threads:[~2024-07-10 12:34 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240708091241.544262971@infradead.org>
     [not found] ` <20240709075651.122204f1358f9f78d1e64b62@kernel.org>
2024-07-09  0:25   ` [PATCH 00/10] perf/uprobe: Optimize uprobes Andrii Nakryiko
2024-07-09  9:01     ` Peter Zijlstra
2024-07-09 14:11       ` Paul E. McKenney
2024-07-09 14:29         ` Peter Zijlstra
2024-07-09 14:36           ` Paul E. McKenney
2024-07-09 15:31             ` Peter Zijlstra
2024-07-09 15:56               ` Paul E. McKenney
2024-07-09 16:10           ` Matthew Wilcox
2024-07-09 16:30             ` Matthew Wilcox
2024-07-09 16:57               ` Paul E. McKenney
2024-07-10  9:16             ` Peter Zijlstra
2024-07-10  9:40               ` Peter Zijlstra
2024-07-22 19:09                 ` Suren Baghdasaryan
2024-07-27  0:20                   ` Andrii Nakryiko
2024-07-27  1:29                     ` Suren Baghdasaryan
2024-07-27  3:45                       ` Matthew Wilcox
2024-07-30  3:18                         ` Andrii Nakryiko
2024-07-30 13:10                         ` Peter Zijlstra
2024-07-30 18:10                           ` Suren Baghdasaryan
2024-08-03  5:47                             ` Andrii Nakryiko
2024-08-03  8:53                               ` Peter Zijlstra
2024-08-04 23:22                                 ` Andrii Nakryiko
2024-08-06  4:08                                   ` Andrii Nakryiko
2024-08-06 14:50                                     ` Suren Baghdasaryan
2024-08-06 17:40                                       ` Andrii Nakryiko
2024-08-06 17:44                                         ` Suren Baghdasaryan
2024-08-07  1:36                                     ` Suren Baghdasaryan
2024-08-07  5:13                                       ` Suren Baghdasaryan
2024-08-07 17:49                                         ` Andrii Nakryiko
2024-08-07 18:04                                           ` Suren Baghdasaryan
2024-08-07 18:30                                             ` Andrii Nakryiko
2024-08-07 18:33                                             ` Suren Baghdasaryan
2024-08-08  0:47                                               ` Andrii Nakryiko
2024-07-30 13:46                   ` Peter Zijlstra
2024-07-30 18:16                     ` Suren Baghdasaryan
2024-07-09 16:42         ` Andrii Nakryiko
2024-07-09  9:03     ` Peter Zijlstra
2024-07-09 10:01       ` Jiri Olsa
2024-07-09 10:16         ` Peter Zijlstra
2024-07-09 22:10           ` Masami Hiramatsu
2024-07-10 10:10             ` Peter Zijlstra
2024-07-10 14:56               ` Masami Hiramatsu
2024-07-10 18:40                 ` Andrii Nakryiko
2024-07-11  8:51                   ` Peter Zijlstra
2024-07-11 15:17                     ` Masami Hiramatsu
2024-07-11 15:22                       ` Peter Zijlstra
2024-07-11 17:47                         ` Steven Rostedt
2024-07-11 23:59                           ` Masami Hiramatsu
2024-07-10  0:55       ` Masami Hiramatsu
2024-07-09 21:47     ` Andrii Nakryiko
2024-07-10 10:12       ` Peter Zijlstra
2024-07-10 12:34         ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240710123418.GH28838@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox