Re: [RFC][PATCH 6/6] objtool: Add IBT validation / fixups

From: Joao Moreira
Date: Tue Feb 08 2022 - 21:45:12 EST


Note: This feature was already submitted for upstreaming with the
llvm-project: https://reviews.llvm.org/D116070

Ah nice; I see this has been committed now.

Yes, but then some front-end changes also required this fix https://reviews.llvm.org/D118052, which is currently under review (posting this here in case someone is trying this out).


Given that IBT will need to work with both Clang and gcc, I suspect the
objtool approach will still end up needing to do all the verification.

(And as you say, it has limited visibility into assembly.)

Agreed that at this point objtool provides more coverage. Yet, besides being an attempt to relief objtool and improve a bit the compiler support as mentioned in the series cover letter, it is still nice to reduce the left-over nops and fixups which end-up scattered all around.

FWIIW, https://reviews.llvm.org/D118438 and https://reviews.llvm.org/D118355 are also being cooked. Comments and ideas for new approaches or improvements in the compiler support for this are very welcome :)

Tks,
Joao