From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5362A18FA12; Wed, 10 Jul 2024 10:12:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720606366; cv=none; b=dfGLoV7UZzHyfKsWTO7iZXDpzm6bAWYcS8dMyuiUHYk3I652YHEooAyLMzYG6T4y8W/uxjbVtsGIpvRaHjYBm1tDtKw+tyPRXwGa1MwwlVYdRdVENJjPtqZgm8lOeXkxaBDEIG7Gd7orGf7OaTRY7h/PBbAunMKP145zU1qqFaE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720606366; c=relaxed/simple; bh=4MVl39cZUHo+cRYDs++fNGDt+ZsyCXiHmNfV5hD+l18=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=htfa8ZhtPckOcofy/3riY5Mq17NVigoJur6+TGJdYtw1OJcWrnBREFjQO1TQre356aXIHf0sMKis0GvQnNL+oju/0AZ1pbnC6189tXHjBaBstwISrgSDDomTKZ0MjXSi02zXHVsfc5XAxkhFK4GGlqvmzYvrx+qrqNQIDNhb4eY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=LLKrog3W; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="LLKrog3W" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wMUKqNeGsniDV27HFxXZLOgNCHO5p0I89QFIUolap+0=; b=LLKrog3WGsNt3l0WRb3R1IGULx RXiRx2KVsVrh9NYNVCbkwQPswJLqOusw6zQt5d212HcIMqmZDuhiT3IxdPGlCicZSL1qnnTrY9Yv0 pz4Xc3XYsX6T8FVRi53NsRLeZcHLyWb4rH7Xc46lILCxCQmEoYQ/HLyj8RqCKHtXGmQv5YMWGawxF TA3PfuAshq2hEDZVM6r6t4SjOevCL4w9uHBmXwWwkrSEFFNLdiQfAxmWVWq5l+VlYy1njJTQTxdm+ 4hysqbIXi8iF3Wu1akYN5WBMILyAxKWl2ydKMU8QI7vH/OWQ9MCUfIrCiDbyMNjabkeaUADbEsX9A 8iMGAm4A==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRUJT-000000095rK-44BV; Wed, 10 Jul 2024 10:12:40 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 97AEA300694; Wed, 10 Jul 2024 12:12:39 +0200 (CEST) Date: Wed, 10 Jul 2024 12:12:39 +0200 From: Peter Zijlstra To: Andrii Nakryiko Cc: Masami Hiramatsu , 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 Subject: Re: [PATCH 00/10] perf/uprobe: Optimize uprobes Message-ID: <20240710101239.GW27299@noisy.programming.kicks-ass.net> References: <20240708091241.544262971@infradead.org> <20240709075651.122204f1358f9f78d1e64b62@kernel.org> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jul 09, 2024 at 02:47:12PM -0700, Andrii Nakryiko wrote: > Running in my local VM with debugging config, I'm getting the > following. Please check if that's something new or it's just another > symptom of the issues that Oleg pointed out already. > > > [ 11.213834] ================================================ > [ 11.214225] WARNING: lock held when returning to user space! > [ 11.214603] 6.10.0-rc6-gd3f5cbffe86b #1263 Tainted: G OE > [ 11.215040] ------------------------------------------------ > [ 11.215426] urandom_read/2412 is leaving the kernel with locks still held! > [ 11.215876] 1 lock held by urandom_read/2412: > [ 11.216175] #0: ffffffff835ce8f0 (uretprobes_srcu){.+.+}-{0:0}, > at: srcu_read_lock+0x31/0x3f Bah, I forgot the SRCU thing had lockdep on. > [ 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] > [ 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. Thanks!