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: <aYNBtc2Jbtg9sLIE@google.com>
Date: Wed, 4 Feb 2026 12:55:17 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Gary Guo <gary@...yguo.net>
Cc: Link Mauve <linkmauve@...kmauve.fr>, rust-for-linux@...r.kernel.org, 
	Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun@...nel.org>, 
	"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>, Jonathan Corbet <corbet@....net>, 
	Madhavan Srinivasan <maddy@...ux.ibm.com>, Michael Ellerman <mpe@...erman.id.au>, 
	Nicholas Piggin <npiggin@...il.com>, "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.org>, 
	Jason Baron <jbaron@...mai.com>, Steven Rostedt <rostedt@...dmis.org>, 
	Ard Biesheuvel <ardb@...nel.org>, Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>, Bill Wendling <morbo@...gle.com>, 
	Justin Stitt <justinstitt@...gle.com>, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, 
	llvm@...ts.linux.dev, officialTechflashYT@...il.com, 
	Ash Logan <ash@...quark.com>, Roberto Van Eeden <rw-r-r-0644@...tonmail.com>, 
	"Jonathan Neuschäfer" <j.neuschaefer@....net>
Subject: Re: [PATCH] rust: Add PowerPC support

On Wed, Feb 04, 2026 at 12:36:38PM +0000, Gary Guo wrote:
> On Wed Feb 4, 2026 at 10:41 AM GMT, Alice Ryhl wrote:
> > On Wed, Feb 04, 2026 at 04:05:04AM +0100, Link Mauve wrote:
> >> For now only Big Endian 32-bit PowerPC is supported, as that is the only
> >> hardware I have.  This has been tested on the Nintendo Wii so far, but I
> >> plan on also using it on the GameCube, Wii U and Apple G4.
> >
> > Super cool!
> >
> >> These changes aren’t the only ones required to get the kernel to compile
> >> and link on PowerPC, libcore will also have to be changed to not use
> >> integer division to format u64, u128 and core::time::Duration, otherwise
> >> __udivdi3() and __umoddi3() will have to be added.  I have tested this
> >> change by replacing the three implementations with unimplemented!() and
> >> it linked just fine.
> >
> > Uh oh this seems tricky. How is this not a problem on arm32 too?
> >
> > Perhaps we should just be providing __udivdi3() and __umoddi3() in
> > general?
> 
> I think there is some concern that if this is provided, then C side that uses
> the divide operator instead of dividing function doesn't get linker error
> anymore.
> 
> However, a proper way is to do this via the hooks that we already have in
> `compiler_builtins.rs`.
> 
> This can either be replace these with panics or actual implementation, but for
> libcore.o only.

Is there any reason to not make it Rust-only but for all Rust code?
Making the / operator work seems like it would be a good idea.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ