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: <CAH5fLgiFjTBhgYEsCR4R=W8xS8_99E5+F5g0y-gq3Bz_rY1++w@mail.gmail.com>
Date: Mon, 17 Nov 2025 17:11:55 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>, Miguel Ojeda <ojeda@...nel.org>, 
	Danilo Krummrich <dakr@...nel.org>, Alistair Popple <apopple@...dia.com>, John Hubbard <jhubbard@...dia.com>, 
	Alexandre Courbot <acourbot@...dia.com>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, 
	Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the rust tree

On Mon, Nov 17, 2025 at 4:37 PM Tamir Duberstein <tamird@...il.com> wrote:
>
> On Mon, Nov 17, 2025 at 9:51 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
> >
> > On Mon, Nov 17, 2025 at 07:04:17PM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > After merging the rust tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > error[E0277]: `Chipset` doesn't implement `core::fmt::Display`
> > >    --> drivers/gpu/nova-core/gpu.rs:233:13
> > >     |
> > > 233 |             self.chipset,
> > >     |             ^^^^^^^^^^^^ `Chipset` cannot be formatted with the default formatter
> > >     |
> > >     = help: the trait `core::fmt::Display` is not implemented for `Chipset`
> > >     = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
> > >     = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
> > >
> > > error[E0277]: `Revision` doesn't implement `core::fmt::Display`
> > >    --> drivers/gpu/nova-core/gpu.rs:235:13
> > >     |
> > > 235 |             self.revision
> > >     |             ^^^^^^^^^^^^^ `Revision` cannot be formatted with the default formatter
> > >     |
> > >     = help: the trait `core::fmt::Display` is not implemented for `Revision`
> > >     = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
> > >     = note: this error originates in the macro `$crate::format_args` which comes from the expansion of the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info)
> > >
> > > error[E0277]: the trait bound `MsgFunction: kernel::fmt::Display` is not satisfied
> > >    --> drivers/gpu/nova-core/gsp/cmdq.rs:532:9
> > >     |
> > > 532 | /         dev_dbg!(
> > > 533 | |             &self.dev,
> > > 534 | |             "GSP RPC: send: seq# {}, function={}, length=0x{:x}\n",
> > >     | |                                               -- required by a bound introduced by this call
> > > 535 | |             self.seq,
> > > 536 | |             M::FUNCTION,
> > > 537 | |             dst.header.length(),
> > > 538 | |         );
> > >     | |_________^ the trait `kernel::fmt::Display` is not implemented for `MsgFunction`
> > >     |
> > >     = help: the following other types implement trait `kernel::fmt::Display`:
> > >               &T
> > >               Arc<T>
> > >               Arguments<'_>
> > >               BStr
> > >               Box<T, A>
> > >               CStr
> > >               Chipset
> > >               Class
> > >             and 22 others
> > >     = note: required for `kernel::fmt::Adapter<&MsgFunction>` to implement `core::fmt::Display`
> > > note: required by a bound in `core::fmt::rt::Argument::<'_>::new_display`
> > >    --> /usr/lib/rustlib/src/rust/library/core/src/fmt/rt.rs:113:27
> > >     |
> > > 113 |     pub fn new_display<T: Display>(x: &T) -> Argument<'_> {
> > >     |                           ^^^^^^^ required by this bound in `Argument::<'_>::new_display`
> > >     = note: this error originates in the macro `::core::format_args` which comes from the expansion of the macro `dev_dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
> > >
> > > error: aborting due to 3 previous errors
> > >
> > > For more information about this error, try `rustc --explain E0277`.
> > >
> > > Caused by commit
> > >
> > >   c5cf01ba8dfe ("rust: support formatting of foreign types")
> > >
> > > (I think) interacting with commits
> > >
> > >   38b7cc448a5b ("gpu: nova-core: implement Display for Spec")
> > >   75f6b1de8133 ("gpu: nova-core: gsp: Add GSP command queue bindings and handling")
> > >
> > > from the drm-rust tree.
> >
> > I applied a patch to drm-rust-next that makes this error go away.
> >
> > Alice
>
> Thanks for taking care of this!
>
> Alexandre: the correct thing to do going forward is never to use
> `core::fmt`; instead always use `kernel::fmt`.

Here's the fix I applied:
https://lore.kernel.org/all/20251117-nova-fmt-rust-v1-1-651ca28cd98f@google.com/

I had to use write_fmt(fmt!(...)) instead of the write!(...) macro.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ