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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 23, 2017 at 05:52:45PM +0100, Borislav Petkov wrote:
> 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?
> 
> 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.
> 
> NAKed-by: Borislav Petkov <bp@xxxxxxx>

Here on my Fedora system:

$ less /usr/include/asm/msr-index.h
#ifndef _ASM_X86_MSR_INDEX_H
#define _ASM_X86_MSR_INDEX_H

/* CPU model specific register (MSR) numbers */

/* x86-64 specific MSRs */
#define MSR_EFER                0xc0000080 /* extended feature register */
#define MSR_STAR                0xc0000081 /* legacy mode SYSCALL target */
#define MSR_LSTAR               0xc0000082 /* long mode SYSCALL target */
...

Like it or not, it is _already_ exported to userspace, so it forms
part of the user ABI.  You can try to remove it from userspace view,
but if anyone has already started to use it, removing it will already
cause a userspace regression.

So, I don't think we have any grounds to NAK these patches on the
basis of "we don't want this to be visible to userspace because it
may cause a userspace regression."  Removing it from userspace view
is likely to cause a userspace regression.

This patch just makes sure that such a regression doesn't happen when
kbuild stops exporting files in _non_-uapi directories.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux