From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 51FD772 for ; Wed, 7 Jul 2021 10:50:33 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5FB96619A0; Wed, 7 Jul 2021 10:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625655032; bh=FliZbpFB/+KqrgFoOQwPELvURgyMhPCNqb0TsiHBqwY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M4vI9mR/dyURbls6ws4LmxZIbpxMLFL7zjxFt2jTglvzmQmzrZXWHb16i0W2qZlH8 FCQURWdv+m0OxIiYrWG6XR4JFa3D17x7OVZf+0dKwblt8qGYdx2JwwJNjx5FPGl/sg sz2hYB4h/OvpzLPOrejS8G8EqRvKvgCK/WHr531VbtEqncVIy1XD48OqHzkNCamI7h mkMVeGZ/14qsHM3QEHFi3yu+jHShYj/MnnSXb5ZRYvoMTXQSzek0qJH/suDQTQZReF PS9tZUy1NXo95fWiHtD7FUM+gYEa8WDn9Vj+xvdUaD469TCKj9tSGfRjuXnmuAxcWW cHoRwM5QiVMuA== Date: Wed, 7 Jul 2021 11:50:00 +0100 From: Mark Brown To: Linus Walleij Cc: Roland Dreier , Miguel Ojeda , ksummit@lists.linux.dev Subject: Re: [TECH TOPIC] Rust for Linux Message-ID: <20210707105000.GA4394@sirena.org.uk> References: Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: X-Cookie: I will never lie to you. User-Agent: Mutt/1.10.1 (2018-07-13) --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 06, 2021 at 10:36:14PM +0200, Linus Walleij wrote: > On Tue, Jul 6, 2021 at 10:00 PM Roland Dreier wrote: > > "devres" / devm_xxx was an attempt to deal with this in C, but it only > > solves some cases of this and has not received a lot of adoption (we > > can argue about the reasons). > Really? From my point of view that is adopted all over the map. > I add new users all the time and use it as much as I can when > writing new drivers. Yes, it's *super* widely used in most of the kernel. Perhaps there's some subsystems that reject it for some reason. > I think it's a formidable success, people just need to learn to do it more. There *are* issues with people adopting it too enthusiastically - as well as the memory lifetime issues that Laurent mentioned it's easy for it to cause problems with interrupt handlers that are left live longer than they should be and try to use things that were already deallocated. --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDlhtgACgkQJNaLcl1U h9CCcgf6A1aByFZCq8btFKJQUbiD3Ny5SPtFfNDMGtOz5BOylkUJTuR7s4lwOelP 4Wyb2pm6HQicW5+9TxAHNeKMM42jZkAB0DQgR/HUhpCEbjyrOwO3D0iOY7gOkOj+ Pm2JPA7Z2MJdjBaKfe3DLWRREmT2bhsOEzZMQOVzY/dSsQRa+uXbKFO42APeYZ1l eL1ss+RnUNK2U0xWkP14liS9RlLNOKOY0UmuDWcUMkmzIbVDzRQ7d2Ed77GDPnCQ dv9zeI2V8bM1EvKYALr9dQyRerv84rJu+hVzFLtH/TwZou5W5PorsXPJBky4xXKp kjYdY883WiCqTE7yOqJFoqBWFvQINQ== =H7Ne -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--