Re: [PATCH 2/2] rust: cfi: add support for CFI_CLANG with Rust
From: Sami Tolvanen
Date: Tue Jul 30 2024 - 11:25:01 EST
On Tue, Jul 30, 2024 at 3:32 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Tue, Jul 30, 2024 at 09:40:12AM +0000, Alice Ryhl wrote:
> > From: Matthew Maurer <mmaurer@xxxxxxxxxx>
> >
> > Make it possible to use the Control Flow Integrity (CFI) sanitizer when
> > Rust is enabled. Enabling CFI with Rust requires that CFI is configured
> > to normalize integer types so that all integer types of the same size
> > and signedness are compatible under CFI.
>
> I am assuming -- because I have to, because you're not actually saying
> anyting -- that this is fully compatible with the C version and all the
> fun and games we play with rewriting the function prologue for FineIBT
> and the like also work?
Rust uses the same LLVM backend for the actual code generation, so it
should be fully compatible.
Sami