Re: C aggregate passing (Rust kernel policy)

James Bottomley
2025-02-26T14:45:55Z

On Wed, 2025-02-26 at 15:39 +0100, Greg KH wrote:
> 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@gmail.com> 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.

From some other rust boot system work, I know that the quality of a
simple backtrace in rust where you just pick out addresses you think
you know in the stack and print them as symbols can sometimes be rather
misleading, which is why you need an unwinder to tell you exactly what
happened.

Regards,

James