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] [day] [month] [year] [list]
Message-ID: <aCGndjmLQMXM76I3@pollux>
Date: Mon, 12 May 2025 09:47:02 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	patches@...ts.linux.dev
Subject: Re: [PATCH] rust: devres: fix doctest build under `!CONFIG_PCI`

On Sun, May 11, 2025 at 08:25:33PM +0200, Miguel Ojeda wrote:
> The doctest requires `CONFIG_PCI`:
> 
>     error[E0432]: unresolved import `kernel::pci`
>         --> rust/doctests_kernel_generated.rs:2689:44
>          |
>     2689 | use kernel::{device::Core, devres::Devres, pci};
>          |                                            ^^^ no `pci` in the root
>          |
>     note: found an item that was configured out
>         --> rust/kernel/lib.rs:96:9
>     note: the item is gated here
>         --> rust/kernel/lib.rs:95:1
> 
> Thus conditionally compile it (which still checks the syntax).
> 
> Fixes: f301cb978c06 ("rust: devres: implement Devres::access()")
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>

Good catch!

Once we have the platform ioremap() abstractions [1], which are always built-in,
we should use those for the doctests. Maybe this could be a good first issue.

Applied to nova-next, thanks!

[1] https://lore.kernel.org/rust-for-linux/20250509-topics-tyr-platform_iomem-v8-3-e9f1725a40da@collabora.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ