Re: [TECH TOPIC] Rust for Linux

Miguel Ojeda
2021-07-07T16:44:17Z

On Wed, Jul 7, 2021 at 5:48 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> BTW, does rust support "fentry/mcount" code? If not, that means ftrace
> (and all the hooks we have inside the kernel) are not going to be able
> to use it? That's one big "notrace" across all drivers that implement
> Rust?

From a quick look, there seems to be support for `mcount` [1], and an
open issue on `fentry` [2]. Rust is based on LLVM, so anything that we
already do through Clang should be doable in `rustc` too.

I have asked our in-house Rust experts in case they now something more
(thanks Alex for the `fentry` link!).

[1] https://github.com/rust-lang/rust/pull/57220
[2] https://github.com/rust-lang/rust/issues/55092

Cheers,
Miguel