Re: [PATCH v4 3/7] x86: put msr-index.h in uapi

From: Nicolas Dichtel
Date: Mon Jan 23 2017 - 12:07:08 EST


+ Peter Anvin and Ingo Molnar

Le 23/01/2017 Ã 17:52, Borislav Petkov a Ãcrit :
> On Mon, Jan 23, 2017 at 03:58:37PM +0100, Nicolas Dichtel wrote:
>> This header file is exported, thus move it to uapi.
>
> Why? Why is this damn thing exported in the first place?
It is exported because it is listed in arch/x86/include/uapi/asm/Kbuild:
header-y += msr-index.h (see also patch #4).

>
> The moment we decide to change an MSR name or even remove it from that
> file, we break userspace. And what for, because userspace is using some
> arbitrary header file which was meant to be for the kernel solely.
I understand your concerns but my patch does not change anything. And I think
David's comment is right: if I remove it, I break the uapi.

After digging a bit, it seems you have already tried to remove it in commit
b72e7464e4cf ("x86/uapi: Do not export <asm/msr-index.h> as part of the user API
headers"), but because this file is still listed in the Kbuild file, it is still
exported.

It would be great if we could find a consensus about what to do with this file
because it blocks patch #4 and the rest of the series.


Thank you,
Nicolas