Re: [PATCH v2 03/10] x86: Add a type field to alt_instr
From: Josh Poimboeuf
Date: Tue Jan 16 2018 - 18:06:41 EST
On Tue, Jan 16, 2018 at 11:53:25PM +0100, Borislav Petkov wrote:
> On Tue, Jan 16, 2018 at 04:49:55PM -0600, Josh Poimboeuf wrote:
> > Unfortunately it's against policy to include kernel headers from the
> > tools subdirectory, so we generally have to either hard code things like
> > this, or have a duplicated header file which needs to be kept in sync.
>
> Yeah, and AFAIR, perf tool guys already have machinery that does check
> whether stuff went out of sync and they resync the required definitions.
>
> You could reuse that...
We could, but it can be a real PITA to keep those files in sync, as they
often change for minor changes which don't even matter. So it might not
be worth the trouble. Objtool seems to complain when the alternatives
struct size changes anyway, so it's probably not a big deal.
--
Josh