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: <2025092338-elbow-dash-373d@gregkh>
Date: Tue, 23 Sep 2025 14:05:06 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Daniel Almeida <daniel.almeida@...labora.com>
Cc: 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>,
	Alice Ryhl <aliceryhl@...gle.com>, 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 Mon, Aug 25, 2025 at 03:18:04PM -0300, Daniel Almeida wrote:
> This adds initial support for USB Rust drivers, not only because I see a
> widespread use of module_usb_driver() in media (which is a subsystem I
> aim to support) but also because I want to learn about USB in general
> and this is a nice opportunity to start doing so.
> 
> I tried to keep things as consistent with pci.rs and platform.rs as
> possible and tested it by manually binding a device (i.e.: my Logitech
> mouse) to the sample driver via:
> 
> /sys/bus/usb/drivers/rust_driver_usb/new_id
> 
> This initial patch is therefore comprised of the same patterns that are
> known to work for pci and platform already.
> 
> Physically disconnecting the device also worked, i.e.: nothing bad
> showed up in dmesg.
> 
> Note that I did not touch MAINTAINERS at all. The objective is to
> kickstart the discussion of what to do there here in v1.

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?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ