Re: C aggregate passing (Rust kernel policy)

From: Greg KH
Date: Wed Feb 26 2025 - 09:41:15 EST


On Wed, Feb 26, 2025 at 09:26:50AM -0500, 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.

The backtrace is there, just like any other call to BUG() provides,
which is what the rust framework calls for this.

Try it and see!