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: <2025092333-happening-eggnog-66ce@gregkh>
Date: Tue, 23 Sep 2025 14:41:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Daniel Almeida <daniel.almeida@...labora.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Miguel Ojeda <ojeda@...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 <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Trevor Gross <tmgross@...ch.edu>,
	Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org,
	rust-for-linux@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 0/2] rust: usb: add initial USB abstractions

On Tue, Sep 23, 2025 at 02:34:27PM +0200, Daniel Almeida wrote:
> […]
> 
> >> 
> >> I tried to apply these, but I get the following build error when adding
> >> to the char-misc-testing tree:
> >> 
> >> ld.lld: error: undefined symbol: usb_get_intf
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::usb::Interface as kernel::sync::aref::AlwaysRefCounted>::inc_ref) in archive vmlinux.a
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::sync::aref::ARef<kernel::usb::Interface> as core::convert::From<&kernel::usb::Interface<kernel::device::CoreInternal>>>::from) in archive vmlinux.a
> >> 
> >> ld.lld: error: undefined symbol: usb_put_intf
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::usb::Interface as kernel::sync::aref::AlwaysRefCounted>::dec_ref) in archive vmlinux.a
> >> 
> >> ld.lld: error: undefined symbol: usb_get_dev
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::usb::Device as kernel::sync::aref::AlwaysRefCounted>::inc_ref) in archive vmlinux.a
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::sync::aref::ARef<kernel::usb::Device> as core::convert::From<&kernel::usb::Device<kernel::device::CoreInternal>>>::from) in archive vmlinux.a
> >> 
> >> ld.lld: error: undefined symbol: usb_put_dev
> >>>>> referenced by kernel.1a949e63ee2acc6a-cgu.0
> >>>>>              rust/kernel.o:(<kernel::usb::Device as kernel::sync::aref::AlwaysRefCounted>::dec_ref) in archive vmlinux.a
> >> 
> >> 
> >> Any hints?
> > 
> > Did you enable CONFIG_USB?
> > 
> > Alice
> 
> +#[cfg(CONFIG_USB)]
> +pub mod usb;
> 
> Hmm, but the USB module is gated by #[cfg(CONFIG_USB) in lib.rs, so not having
> CONFIG_USB enabled should not return any errors and instead skip the USB
> bindings completely.
> 
> I wonder if this has to be CONFIG_USB=y?

It passes if CONFIG_USB=y, but it is good to keep the USB subsystem as a
module if at all possible :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ