Re: [PATCH] x86: Enable IBT in Rust if enabled in C
From: Trevor Gross
Date: Thu Oct 12 2023 - 16:13:25 EST
On Mon, Oct 9, 2023 at 6:44 PM Matthew Maurer <mmaurer@xxxxxxxxxx> wrote:
> +KBUILD_RUSTFLAGS += -Zcf-protection=branch -Zno-jump-tables
I have not tested this, but is it possible to enable these options via
`-Cllvm-args=...` instead of using the unstable flags?
If so, I think this would be preferred in case the exact flags change
before they become stable. It sounds like they are likely to change,
see [1].
If not, no big deal since it would just need an update at a rust version bump.
- Trevor
[1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60-Zbranch-protection.60.20stability