[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=ORd8Y=BiMCWEN7sdjLTGrepnLd58AObVHEPcZE_NVAg@mail.gmail.com>
Date: Thu, 19 Jun 2025 18:10:12 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Arnd Bergmann <arnd@...db.de>, Miguel Ojeda <ojeda@...nel.org>, Kees Cook <kees@...nel.org>,
Tony Luck <tony.luck@...el.com>, "Guilherme G. Piccoli" <gpiccoli@...lia.com>,
Peter Zijlstra <peterz@...radead.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
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>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] panic: improve panic output from Rust panics
On Thu, Jun 19, 2025 at 5:11 PM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> This patch has the pretty major disadvantage that it unconditionally
> calls panic() when a Rust panic happens.
Yeah, I don't think we should do that.
Other `BUG()` calls in the kernel do a `pr_*` plus a `BUG()`, so what
we currently do is fairly common and I would expect tooling to be
aware of that alreardy. What we are missing to be on par with C is
essentially overriding the file/line.
Now, maybe `BUG()` itself could also have a way to inject a better
one-liner explanation after the file/line.
That way, we could improve not just Rust, but use it to improve other
C reports too.
Cheers,
Miguel
Powered by blists - more mailing lists