Re: [PATCH] x86/ibt: Implement FineIBT

From: Joao Moreira
Date: Mon Oct 24 2022 - 16:28:27 EST


Yes, the compiler patch is already in, but if the cfi/kcfi confusion
is a big concern, it's still possible to rename the symbol before
Clang 16 is released. However, I thought we picked the __cfi prefix
earlier to make things less confusing with FineIBT? Joao, are you
still planning on adding FineIBT to Clang as well?

Not only with FineIBT, but also with CFG, ClangCFI and any other scheme that does CFI. IIRC, my concern was regarding some functions/structures that could be easily re-used in both (or many) schemes (such as setting the hashes for a specific call or something) being named to one specifically. But yeah, I didn't think at the time that there would be a different collision with Dwarf stuff. I still think that having a generic prefix is better, but I agree that the collision with dwarf is bad. Maybe we use something generic enough that doesn't collide, Idk, "cflow" or something like that (naming is hard).

As for FineIBT within clang, that is still undecided. I'm waiting for peterz's patches to get in first, so then I can raise the discussion if it is worthy compiling the kernel directly with FineIBT. Also, on the user-space side, I'm waiting for IBT support to get in to then get back there and see if I can make it feasible. So the answer right now is really that it depends.

Tks,
Joao