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: <DG5ITP7I2CQO.DOQM3MZKKPS9@kernel.org>
Date: Tue, 03 Feb 2026 18:59:52 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Gary Guo" <gary@...yguo.net>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>, "Matthew Maurer"
 <mmaurer@...gle.com>, "Bjorn Andersson" <andersson@...nel.org>, "Konrad
 Dybcio" <konradybcio@...nel.org>, "Satya Durga Srinivasu Prabhala"
 <satyap@...cinc.com>, "Miguel Ojeda" <ojeda@...nel.org>, "Boqun Feng"
 <boqun.feng@...il.com>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
 Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
 "Trevor Gross" <tmgross@...ch.edu>, "Daniel Almeida"
 <daniel.almeida@...labora.com>, "Rafael J. Wysocki" <rafael@...nel.org>,
 "David Airlie" <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>,
 "Michal Wilczynski" <m.wilczynski@...sung.com>, "Dave Ertman"
 <david.m.ertman@...el.com>, "Ira Weiny" <ira.weiny@...el.com>, "Leon
 Romanovsky" <leon@...nel.org>, "Trilok Soni" <tsoni@...cinc.com>,
 <linux-kernel@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
 <rust-for-linux@...r.kernel.org>, <driver-core@...ts.linux.dev>,
 <dri-devel@...ts.freedesktop.org>, <linux-pwm@...r.kernel.org>
Subject: Re: [PATCH v2 6/6] soc: qcom: socinfo: Convert to Rust

On Tue Feb 3, 2026 at 6:17 PM CET, Gary Guo wrote:
> PS. Personally I think this check (and the one in Devres::access) should use
> assertion rather than `EINVAL`, because it is a bad driver bug when this is hit,
> and adding failing code path for something that is a bug is something I really
> dislike... It should at least be a `WARN`.

I don't think we should panic in this case, as it can happen too easily.

	// Let's assume the resource is owned by the parent.
	fn foo(adev: &auxiliary::Device<Bound>, res: &Devres<Resource>) {
	    let res = res.access(dev.parent()); // OK
	    let res = res.access(dev.as_ref()); // panic()
	}

Printing a warning is probably a good idea though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ