lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DFQ6ABRP8U2W.GZP8XMBPDO8Q@kernel.org>
Date: Fri, 16 Jan 2026 18:00:21 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Jason Gunthorpe" <jgg@...dia.com>
Cc: "Laurent Pinchart" <laurent.pinchart@...asonboard.com>, "Greg
 Kroah-Hartman" <gregkh@...uxfoundation.org>, "Tzung-Bi Shih"
 <tzungbi@...nel.org>, "Benson Leung" <bleung@...omium.org>, "Rafael J .
 Wysocki" <rafael@...nel.org>, "Bartosz Golaszewski" <brgl@...ev.pl>, "Linus
 Walleij" <linusw@...nel.org>, "Jonathan Corbet" <corbet@....net>, "Shuah
 Khan" <shuah@...nel.org>, <linux-doc@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <chrome-platform@...ts.linux.dev>,
 <linux-kselftest@...r.kernel.org>, "Wolfram Sang"
 <wsa+renesas@...g-engineering.com>, "Simona Vetter"
 <simona.vetter@...ll.ch>, "Dan Williams" <dan.j.williams@...el.com>,
 <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v7 0/3] drivers/base: Introduce revocable

On Fri Jan 16, 2026 at 5:52 PM CET, Jason Gunthorpe wrote:
> The C code doesn't really work like that, it works on sync teardown
> flows. If you want to write correct C code you need to think about all
> the concurrency the driver has and ensure that removal undoes it

Again, it depends: Sometimes a synchronized teardown is not possible. Iff a
synchronized teardown is not possible by design, this is where revocable is
useful instead.

However, a synchronized teardown should of course always be preferred.

And just to clarify, since you said "the C code": The Rust code follows exactly
the the same principle, prefer synchronized teardown whenever possible.

(The only difference with Rust is that we can always guard device resources and
iff synchronized teardown is ensured through the type system the guard becomes
zero-cost for accesses.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ