[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72nqkHazs-GRay_4LZViV43tDbCkPqWzqa28CSRE9DV7cw@mail.gmail.com>
Date: Tue, 14 May 2024 16:21:50 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Miguel Ojeda <ojeda@...nel.org>,
John Stultz <jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Gary Guo <gary@...yguo.net>,
bjorn3_gh@...tonmail.com, Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...sung.com>, Alice Ryhl <aliceryhl@...gle.com>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Kees Cook <keescook@...omium.org>, Mara Bos <m-ou.se@...u.se>,
"Amanieu d'Antras" <amanieu@...il.com>
Subject: Re: [PATCH 2/2] rust: time: Use wrapping_sub() for Ktime::sub()
On Tue, May 14, 2024 at 3:13 PM Boqun Feng <boqun.feng@...il.com> wrote:
>
> However, I must point out that it needs more than a customized panic
> handler to work: we also need to change the code generation (or adding
> a different flag similar to -Coverflow-checks), because the current code
> generation is Rust panic when overflow happens, which means the
> subsequent code is unreachable.
Yeah, definitely. That first step RFC is a bit ambiguous ("custom
implementations of `panic_*`"), but what we discussed was the ability
to customize the report and continue, rather than providing a
different panic handler. So the customization point function should
not return `!` for our use case, at least in the integer arithmetic
overflow case.
Cheers,
Miguel
Powered by blists - more mailing lists