Re: [PATCH v4 01/13] objtool: Remove CFI save/restore special case
From: Josh Poimboeuf
Date: Thu Mar 26 2020 - 09:56:32 EST
On Thu, Mar 26, 2020 at 12:30:49PM +0100, Peter Zijlstra wrote:
> This isn't ideal either; stuffing code with NOPs just to make
> annotations work is certainly sub-optimal, but given that sync_core()
> is stupid expensive in any case, one extra nop isn't going to be a
> problem here.
/me puts his hardened objtool maintainer's glasses on...
The problem is, when you do this kind of change to somebody else's code
-- like adding a NOP to driver code -- there's a 90% chance they'll NACK
it and tell you to fix your shit. Because they'll be happy to tell you
the code itself should never be changed just to "make objtool happy".
And honestly, they'd be right, and there's not much you can say in
reply. And then we end up having to fix it in objtool again anyway.
The 'insn == first' check isn't ideal, but at least it works (I think?).
Maybe there's some cleaner approach. I'll need to think about it later
after I make some progress on the massive oil well fire I call my INBOX.
--
Josh