Re: C aggregate passing (Rust kernel policy)

From: Ralf Jung
Date: Wed Feb 26 2025 - 09:38:00 EST




On 26.02.25 15:26, James Bottomley wrote:
On Wed, 2025-02-26 at 14:53 +0100, Miguel Ojeda wrote:
On Wed, Feb 26, 2025 at 2:03 PM Ventura Jack
<venturajack85@xxxxxxxxx> wrote:
[...]
Exception/unwind safety may be another subject that increases
the difficulty of writing unsafe Rust.

Note that Rust panics in the kernel do not unwind.

I presume someone is working on this, right? While rust isn't
pervasive enough yet for this to cause a problem, dumping a backtrace
is one of the key things we need to diagnose how something went wrong,
particularly for user bug reports where they can't seem to bisect.

Rust panics typically print a backtrace even if they don't unwind. This works just fine in userland, but I don't know the state in the kernel.

Kind regards,
Ralf