From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796200790; b=vVA4Hoyi/qR+/ZEcoAVkhRH0fkzjggCVkI5oWQLuZL0jV2SF1OWHsb2GYCO10vij9PzL W9LwNY0EzJerj06BGMPhCQe7eweIVWv/Sk+/pyHLqxmWcaNxOK24so8m0A5V2nTBp5eOT NpD9hQslVSxltOl5Tumm+Rcn3TWm3C9wohazUpINmEW+fVDOz0I54vlzyw/WpcfHbT84i 1huAv3YT/jKMG1wrpvv6bXZ5rrzb1/DtPCHrCHEW8xJ+Gwm1O9ZjVR04Znpsdagat8iiB i3oOSUXp93/dkxOENSgAqkj2OdZwTQ3koWp2gU9VUCEQHiLvlyCJHYjIMPrT4iWrGxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796200790; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=VxwjY2QJCZdl9wV9+9qRKsXG55KM4So/nYxkGjCb8Co=; b=zvut6Kjegcn9KT8MesvnP3fKKtECwRDlcZxcdxM5Zo1esN/Kqk7MrawXQ3pih/u1pTFr 5/Ho/Xlj+tzqfZyBjB2YmZNjRNL0SiW4yFVLJdG8KfwwxcWM59uh2DcD/KHaBmkpPvzGc VbnLV4gydNr2eGUchaonIUJU92wlOAYvXQRAAOP1FELe8qIEJza7hiPqlrololLlKXrrf q7QzncB8HpRj1vlHVM3AWewojix8UQeRok3gcV7SwHI6X2m8gXrdD6RDujIP5xIYEJkXB O+CugkJMZQycHvNC1SgfsV6GgmZWTJGxbe3mX3j+jZhIlScUxjyhXPD5Dtuq7Ph/T4A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XIBeVlZE; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B054C606A323; Wed, 2 Dec 2026 08:39:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XIBeVlZE Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D8C01F0089B; Wed, 2 Dec 2026 08:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796200789; bh=VxwjY2QJCZdl9wV9+9qRKsXG55KM4So/nYxkGjCb8Co=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=XIBeVlZEQSncIadyAtbpVvIlBYOh5TmjN9F8nbpAOIZLRdhxAx28MO8YL1dzH4BIl ZkRh1vxRowTJSnqSEL1x15JdoXQFrduzzOHhMKEKweUOgwnRp0mPyyBOpecYqzrrW5 n+bNEdDEevHL9Z0+zTwGtZY3mK/OVAN6Tjl90F3s4zUQDEgA7DjsrYH6DeAL9SkAqQ 932sIv2Efi0fmy1c+riJlXFBzxcFoS1kgLNDDfXENn2fLQ55mCvLQLNgT7kM2vo24p 1rMxmY20l/uRJOtV66UD3aAvEtHP9+CTmpCNaK06QmqjEnjDcX/UJA/OqbHDCFG+ZW h/eXs0Z7U6Ymw== Date: Wed, 2 Dec 2026 09:39:46 +0100 From: Antoine Tenart To: Steven Rostedt Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com, vmalik@redhat.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, "Uladzislau Rezki (Sony)" Subject: Re: [PATCH] tracing/probes: fix race between probe execution and event unregistering Message-ID: References: <20261126132830.14992-1-atenart@kernel.org> <20261127140616.20616c68@gandalf.local.home> <20261201085848.33796693@gandalf.local.home> X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201085848.33796693@gandalf.local.home> On Tue, Dec 01, 2026 at 08:58:48AM -0500, Steven Rostedt wrote: > On Tue, 1 Dec 2026 14:21:21 +0100 > Antoine Tenart wrote: > > > > @@ -2841,7 +2850,7 @@ int trace_probe_remove_file(struct trace_probe *tp, > > > return -ENOENT; > > > > > > list_del_rcu(&link->list); > > > - kvfree_rcu_mightsleep(link); > > > + call_rcu(&link->rcu, free_link_rcu); > > > > While this defers freeing file, this unfortunately won't work because > > this is not only about struct trace_event_file but also the pointers it > > contains and the lifetime of those objects. E.g. accessing file->filter > > will also cause UaF in trace_event_buffer_commit -> > > __event_trigger_test_discard. (I haven't looked at the other pointers, > > they might be problematic too). > > Then those need to be fixed as well. All right. I was concerned about missing one, but I guess adding back a costly call isn't an option. I'll cook a series and try not to miss a path then. Thanks! Antoine