Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 16 Apr 2021 10:05:18 -0700 | Subject | Re: [PATCH 04/13] Kbuild: Rust support |
| |
On Fri, Apr 16, 2021 at 6:38 AM Peter Zijlstra <peterz@infradead.org> wrote: > > AFAICT rust has try/throw/catch exception handling (like > C++/Java/others) which is typically implemented with stack unwinding of > its own.
I was assuming that the kernel side would never do that.
There's some kind of "catch_unwind()" thing that catches a Rust "panic!" thing, but I think it's basically useless for the kernel.
Typical Rust error handling should match the regular kernel IS_ERR/ERR_PTR/PTR_ERR model fairly well, although the syntax is fairly different (and it's not limited to pointers).
Linus
| |