[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72nVJ4wL0eWY1C40hqYaOXuLjLFJZePjMh=n1YzZXCTPrw@mail.gmail.com>
Date: Fri, 20 Jun 2025 11:36:34 +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 6:10 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> Yeah, I don't think we should do that.
By the way, if we are OK with just moving the line down, then we could
keep using `BUG()` taking advantage of `BUGFLAG_NO_CUT_HERE`.
Well, at least for x86 it seems straightforward -- see diff -- to get
output like e.g.:
[ 0.609779] ------------[ cut here ]------------
[ 0.609855] rust_kernel: panicked at samples/rust/rust_minimal.rs:29:9:
[ 0.609855] my Rust panic message
[ 0.610474] kernel BUG at rust/helpers/bug.c:7!
[ 0.610992] Oops: invalid opcode: 0000 [#1] SMP NOPTI
Cheers,
Miguel
View attachment "bug_rust.patch" of type "text/x-patch" (1803 bytes)
Powered by blists - more mailing lists