Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570876 > unrolled thread

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

Started byIngo Molnar <mingo@kernel.org>
First post2017-01-31 17:30 +0100
Last post2017-02-03 22:50 +0100
Articles 14 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v4 3/7] x86: put msr-index.h in uapi Ingo Molnar <mingo@kernel.org> - 2017-01-31 17:30 +0100
    [PATCH v5 1/8] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
    [PATCH v5 3/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
      Re: [PATCH v5 3/8] x86: stop exporting msr-index.h to userland Ingo Molnar <mingo@kernel.org> - 2017-02-02 14:40 +0100
    [PATCH v5 0/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
      [PATCH v5 8/8] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
        Re: [PATCH v5 8/8] uapi: export all arch specifics directories kbuild test robot <lkp@intel.com> - 2017-02-02 15:40 +0100
        Re: [PATCH v5 8/8] uapi: export all arch specifics directories kbuild test robot <lkp@intel.com> - 2017-02-02 15:50 +0100
      [PATCH v5 4/8] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
      [PATCH v5 6/8] uapi: includes linux/types.h before exporting files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
        Re: [PATCH v5 6/8] uapi: includes linux/types.h before exporting  files kbuild test robot <lkp@intel.com> - 2017-02-02 16:30 +0100
      [PATCH v5 2/8] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
      [PATCH v5 5/8] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-02 14:30 +0100
        Re: [PATCH v5 5/8] Makefile.headersinst: remove destination-y option Paul Bolle <pebolle@tiscali.nl> - 2017-02-03 22:50 +0100

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

FromIngo Molnar <mingo@kernel.org>
Date2017-01-31 17:30 +0100
SubjectRe: [PATCH v4 3/7] x86: put msr-index.h in uapi
Message-ID<t5JtE-2Tw-13@gated-at.bofh.it>
* Russell King - ARM Linux <linux@armlinux.org.uk> wrote:

> 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@suse.de>
> 
> 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.

Firstly, I believe you are (very!) confused about what forms part of the Linux 
user-space ABI - it's not the exported headers but the functionality and how 
application _binaries_ rely on it. We have strong ABI guarantees that are in no 
header anywhere. And we have tons and tons of details in UAPI headers that are not 
part of any system call ABI (or protocol ABI) of Linux.

Note that for example the 'MSR_STAR' definition you quote above is not part of the 
ABI, because user-space _cannot make use of it_: it's a privileged CPU register 
that only the kernel can write to. There's no system call ABI that Linux defines 
that this MSR (or any other MSR for that matter) are part of.

These MSR headers are not part of the ABI - they are part of the _mechanism_ 
trying to inform user-space about ABIs and people trying to somehow claim that 
they are an ABI are confused IMHO.

The point with msr-index.h is that there's no user-space ABI where those MSRs are 
enumerated.

Secondly, ABI means 'Application Binary Interface' - note the 'Binary' part. The 
ABI cannot be broken, by definition, by putting a header into another place. Now 
we do export UAPI headers and we definitely don't want to break user-space tooling 
if we can avoid it, but trying to spin the UAPI headers mechanism into an "ABI" is 
confused on so many levels.


I.e. this whole discussion is silly in the extreme. The point of the UAPI exports 
is to clean up our ABI exports, after we used to export _all_ headers to 
user-space.

I.e. by definition the UAPI mechanism is fundamentally about _restricting_ the 
amount of headers that are exposed - separating true ABI from random kernel 
internals. This process of enumerating ABI details separately from kernel 
implementation internal details improves the kernel headers.

> [...]  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.

I challenge you to show a single user-space regression from the removal of the 
'MSR_STAR' definition for example.

Please explain, why do you want to export msr-index.h and which part of it is an 
'ABI' in your opinion? Until you can explain that my NAK stands.

Thanks,

	Ingo

[toc] | [next] | [standalone]


#1572348 — [PATCH v5 1/8] h8300: put bitsperlong.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 1/8] h8300: put bitsperlong.h in uapi
Message-ID<t6pCy-4Bc-15@gated-at.bofh.it>
In reply to#1570876
This header file is exported, thus move it to uapi.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 arch/h8300/include/asm/bitsperlong.h      | 14 --------------
 arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)
 delete mode 100644 arch/h8300/include/asm/bitsperlong.h
 create mode 100644 arch/h8300/include/uapi/asm/bitsperlong.h

diff --git a/arch/h8300/include/asm/bitsperlong.h b/arch/h8300/include/asm/bitsperlong.h
deleted file mode 100644
index e140e46729ac..000000000000
--- a/arch/h8300/include/asm/bitsperlong.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __ASM_H8300_BITS_PER_LONG
-#define __ASM_H8300_BITS_PER_LONG
-
-#include <asm-generic/bitsperlong.h>
-
-#if !defined(__ASSEMBLY__)
-/* h8300-unknown-linux required long */
-#define __kernel_size_t __kernel_size_t
-typedef unsigned long	__kernel_size_t;
-typedef long		__kernel_ssize_t;
-typedef long		__kernel_ptrdiff_t;
-#endif
-
-#endif /* __ASM_H8300_BITS_PER_LONG */
diff --git a/arch/h8300/include/uapi/asm/bitsperlong.h b/arch/h8300/include/uapi/asm/bitsperlong.h
new file mode 100644
index 000000000000..e56cf72369b6
--- /dev/null
+++ b/arch/h8300/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,14 @@
+#ifndef _UAPI_ASM_H8300_BITS_PER_LONG
+#define _UAPI_ASM_H8300_BITS_PER_LONG
+
+#include <asm-generic/bitsperlong.h>
+
+#if !defined(__ASSEMBLY__)
+/* h8300-unknown-linux required long */
+#define __kernel_size_t __kernel_size_t
+typedef unsigned long	__kernel_size_t;
+typedef long		__kernel_ssize_t;
+typedef long		__kernel_ptrdiff_t;
+#endif
+
+#endif /* _UAPI_ASM_H8300_BITS_PER_LONG */
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572352 — [PATCH v5 3/8] x86: stop exporting msr-index.h to userland

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 3/8] x86: stop exporting msr-index.h to userland
Message-ID<t6pCy-4Bc-21@gated-at.bofh.it>
In reply to#1570876
Even if this file was not in an uapi directory, it was exported because
it was listed in the Kbuild file.

Fixes: b72e7464e4cf ("x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers")
Suggested-by: Borislav Petkov <bp@alien8.de>
CC: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
index 3dec769cadf7..1c532b3f18ea 100644
--- a/arch/x86/include/uapi/asm/Kbuild
+++ b/arch/x86/include/uapi/asm/Kbuild
@@ -27,7 +27,6 @@ header-y += ldt.h
 header-y += mce.h
 header-y += mman.h
 header-y += msgbuf.h
-header-y += msr-index.h
 header-y += msr.h
 header-y += mtrr.h
 header-y += param.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572370 — Re: [PATCH v5 3/8] x86: stop exporting msr-index.h to userland

FromIngo Molnar <mingo@kernel.org>
Date2017-02-02 14:40 +0100
SubjectRe: [PATCH v5 3/8] x86: stop exporting msr-index.h to userland
Message-ID<t6pMf-4F2-45@gated-at.bofh.it>
In reply to#1572352
* Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:

> Even if this file was not in an uapi directory, it was exported because
> it was listed in the Kbuild file.
> 
> Fixes: b72e7464e4cf ("x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers")
> Suggested-by: Borislav Petkov <bp@alien8.de>
> CC: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  arch/x86/include/uapi/asm/Kbuild | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
> index 3dec769cadf7..1c532b3f18ea 100644
> --- a/arch/x86/include/uapi/asm/Kbuild
> +++ b/arch/x86/include/uapi/asm/Kbuild
> @@ -27,7 +27,6 @@ header-y += ldt.h
>  header-y += mce.h
>  header-y += mman.h
>  header-y += msgbuf.h
> -header-y += msr-index.h
>  header-y += msr.h
>  header-y += mtrr.h
>  header-y += param.h

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1572353 — [PATCH v5 0/8] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 0/8] uapi: export all headers under uapi directories
Message-ID<t6pCx-4Bc-7@gated-at.bofh.it>
In reply to#1570876
Here is the v5 of this series. Seems there was too many people cc'ed, so I've
removed arch specific ml. Hope it's better now.

Patches #1 and #2 are just cleanup: some exported headers were still under
a non-uapi directory. Patch #3 is a fix to avoid exporting a file that was
not under an uapi directory.
After these three patches, all exported headers are under an uapi directory:
path #4 stops searching files in non uapi directories.
The patch #5 was spotted by code review: there is no in-tree user of this
functionality.
Patch #6 fixes some warnings/errors reported by 0-day tests.
Patches #7 and #8 remove the need to list explicitly headers. Now all files
under an uapi directory are exported.

This series has been tested with a 'make headers_install' on x86 and a
'make headers_install_all'. I've checked the result of both commands.

This patch is built against linus tree. If I must rebase it against the kbuild
tree, just tell me.

v4 -> v5:
  - patch #3: get back to v3 (don't export msr-index.h)
  - patch #6: new in this version
  - patch #7: fix compilation by introducing header-n

v3 -> v4:
 - first patch has been included
 - patch #4: get back to v2 and remove arch/x86/include/asm/msr-index.h

v2 -> v3:
 - patch #1: remove arch/arm/include/asm/types.h
 - patch #2: remove arch/h8300/include/asm/bitsperlong.h
 - patch #3: remove arch/nios2/include/uapi/asm/setup.h
 - patch #4: don't export msr-index.h
 - patch #5: fix a typo: s/unput-files3-name/input-files3-name
 - patch #6: no change
 - patch #7: fix include/uapi/asm-generic/Kbuild.asm by introducing mandatory-y
 - add patch #8

v1 -> v2:
 - add patch #1 to #6
 - patch #7: remove use of header-y

Comments are welcomed,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1572354 — [PATCH v5 8/8] uapi: export all arch specifics directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 8/8] uapi: export all arch specifics directories
Message-ID<t6pCy-4Bc-27@gated-at.bofh.it>
In reply to#1572353
This patch removes the need of subdir-y. Now all files/directories under
arch/<arch>/include/uapi/ are exported.

The only change for userland is the layout of the command 'make
headers_install_all': directories asm-<arch> are replaced by arch-<arch>/.
Those new directories contains all files/directories of the specified arch.

Note that only cris and tile have more directories than only asm:
 - arch-v[10|32] for cris;
 - arch for tile.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 Documentation/kbuild/makefiles.txt | 15 +--------------
 Makefile                           |  4 ++--
 arch/cris/include/uapi/asm/Kbuild  |  3 ---
 arch/tile/include/uapi/asm/Kbuild  |  2 --
 scripts/Makefile.headersinst       |  3 +--
 5 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 91ffb391ed54..223b33d5195a 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -49,7 +49,6 @@ This document describes the Linux kernel Makefiles.
 		--- 7.3 generic-y
 		--- 7.4 generated-y
 		--- 7.5 mandatory-y
-		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1265,7 +1264,7 @@ The pre-processing does:
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
 All headers under include/uapi/, include/generated/uapi/,
-arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+arch/<arch>/include/uapi/ and arch/<arch>/include/generated/uapi/
 are exported.
 
 A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
@@ -1338,18 +1337,6 @@ See subsequent chapter for the syntax of the Kbuild file.
 	The convention is to list one subdir per line and
 	preferably in alphabetic order.
 
-	--- 7.6 subdir-y
-
-	subdir-y may be used to specify a subdirectory to be exported.
-
-		Example:
-			#arch/cris/include/uapi/asm/Kbuild
-			subdir-y += ../arch-v10/arch/
-			subdir-y += ../arch-v32/arch/
-
-	The convention is to list one subdir per line and
-	preferably in alphabetic order.
-
 === 8 Kbuild Variables
 
 The top Makefile exports the following variables:
diff --git a/Makefile b/Makefile
index 96b27a888285..7c3183c32e08 100644
--- a/Makefile
+++ b/Makefile
@@ -1126,7 +1126,7 @@ firmware_install:
 export INSTALL_HDR_PATH = $(objtree)/usr
 
 # If we do an all arch process set dst to asm-$(hdr-arch)
-hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
+hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include)
 
 PHONY += archheaders
 archheaders:
@@ -1147,7 +1147,7 @@ headers_install: __headers
 	$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
 	  $(error Headers not exportable for the $(SRCARCH) architecture))
 	$(Q)$(MAKE) $(hdr-inst)=include/uapi
-	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
+	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
 
 PHONY += headers_check_all
 headers_check_all: headers_install_all
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index d0c5471856e0..b15bf6bc0e94 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-subdir-y += ../arch-v10/arch/
-subdir-y += ../arch-v32/arch/
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
index e0a50111e07f..0c74c3c5ebfa 100644
--- a/arch/tile/include/uapi/asm/Kbuild
+++ b/arch/tile/include/uapi/asm/Kbuild
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ucontext.h
-
-subdir-y += ../arch
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index c96805a7f48b..0ee6b59403ca 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -2,7 +2,7 @@
 # Installing headers
 #
 # All headers under include/uapi, include/generated/uapi,
-# arch/<arch>/include/uapi/asm and arch/<arch>/include/generated/uapi/asm are
+# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are
 # exported.
 # They are preprocessed to remove __KERNEL__ section of the file.
 #
@@ -28,7 +28,6 @@ include scripts/Kbuild.include
 installdir    := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst))
 
 subdirs       := $(patsubst $(srctree)/$(obj)/%/.,%,$(wildcard $(srctree)/$(obj)/*/.))
-subdirs       += $(subdir-y)
 header-files  := $(notdir $(wildcard $(srctree)/$(obj)/*.h))
 header-files  += $(notdir $(wildcard $(srctree)/$(obj)/*.agh))
 header-files  := $(filter-out $(header-n), $(header-files))
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572416 — Re: [PATCH v5 8/8] uapi: export all arch specifics directories

Fromkbuild test robot <lkp@intel.com>
Date2017-02-02 15:40 +0100
SubjectRe: [PATCH v5 8/8] uapi: export all arch specifics directories
Message-ID<t6qIi-5eS-39@gated-at.bofh.it>
In reply to#1572354

[Multipart message — attachments visible in raw view] — view raw

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[cannot apply to next-20170202]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: ia64-allnoconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

>> make[3]: *** No rule to make target 'usr/include/perfmon.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/break.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/fcntl.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/errno.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/ucontext.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/termios.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/posix_types.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/ioctls.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/signal.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/msgbuf.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/poll.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ustack.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/termbits.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/ipcbuf.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/swab.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/rse.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/resource.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/intel_intrin.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/fpu.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/sembuf.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ptrace_offsets.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/auxvec.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/mman.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/statfs.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/socket.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/perfmon_default_smpl.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/siginfo.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/param.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/sockios.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/intrinsics.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ia64regs.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/gcc_intrin.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/unistd.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/bitsperlong.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/byteorder.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/shmbuf.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/cmpxchg.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/stat.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/ioctl.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/setup.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/types.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/ptrace.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/sigcontext.h', needed by 'usr/include/.check'.
   make[3]: *** No rule to make target 'usr/include/kvm_para.h', needed by 'usr/include/.check'.
   make[3]: Target '__headerscheck' not remade because of errors.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1572428 — Re: [PATCH v5 8/8] uapi: export all arch specifics directories

Fromkbuild test robot <lkp@intel.com>
Date2017-02-02 15:50 +0100
SubjectRe: [PATCH v5 8/8] uapi: export all arch specifics directories
Message-ID<t6qRX-5if-11@gated-at.bofh.it>
In reply to#1572354

[Multipart message — attachments visible in raw view] — view raw

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[cannot apply to next-20170202]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: x86_64-kexec (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> make[3]: *** No rule to make target 'usr/include/ldt.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/posix_types_x32.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/sembuf.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/e820.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/fcntl.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/errno.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/hyperv.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/resource.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ipcbuf.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/termios.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ucontext.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ist.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/vm86.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/param.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/msgbuf.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/prctl.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/msr.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/ptrace-abi.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/termbits.h', needed by 'usr/include/.check'.
>> make[3]: *** No rule to make target 'usr/include/swab.h', needed by 'usr/include/.check'.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1572355 — [PATCH v5 4/8] Makefile.headersinst: cleanup input files

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 4/8] Makefile.headersinst: cleanup input files
Message-ID<t6pCy-4Bc-29@gated-at.bofh.it>
In reply to#1572353
After the last four patches, all exported headers are under uapi/, thus
input-files2 are not needed anymore.
The side effect is that input-files1-name is exactly header-y.

Note also that input-files3-name is genhdr-y.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 1106d6ca3a38..3e20d03432d2 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -40,31 +40,20 @@ wrapper-files := $(filter $(header-y), $(generic-y))
 srcdir        := $(srctree)/$(obj)
 gendir        := $(objtree)/$(gen)
 
-oldsrcdir     := $(srctree)/$(subst /uapi,,$(obj))
-
 # all headers files for this dir
 header-y      := $(filter-out $(generic-y), $(header-y))
 all-files     := $(header-y) $(genhdr-y) $(wrapper-files)
 output-files  := $(addprefix $(installdir)/, $(all-files))
 
-input-files1  := $(foreach hdr, $(header-y), \
-		   $(if $(wildcard $(srcdir)/$(hdr)), \
-			$(wildcard $(srcdir)/$(hdr))) \
-		   )
-input-files1-name := $(notdir $(input-files1))
-input-files2  := $(foreach hdr, $(header-y), \
-		   $(if  $(wildcard $(srcdir)/$(hdr)),, \
-			$(if $(wildcard $(oldsrcdir)/$(hdr)), \
-				$(wildcard $(oldsrcdir)/$(hdr)), \
-				$(error Missing UAPI file $(srcdir)/$(hdr))) \
-		   ))
-input-files2-name := $(notdir $(input-files2))
-input-files3  := $(foreach hdr, $(genhdr-y), \
-		   $(if	$(wildcard $(gendir)/$(hdr)), \
-			$(wildcard $(gendir)/$(hdr)), \
-			$(error Missing generated UAPI file $(gendir)/$(hdr)) \
-		   ))
-input-files3-name := $(notdir $(input-files3))
+# Check that all expected files exist
+$(foreach hdr, $(header-y), \
+  $(if $(wildcard $(srcdir)/$(hdr)),, \
+       $(error Missing UAPI file $(srcdir)/$(hdr)) \
+   ))
+$(foreach hdr, $(genhdr-y), \
+  $(if	$(wildcard $(gendir)/$(hdr)),, \
+       $(error Missing generated UAPI file $(gendir)/$(hdr)) \
+  ))
 
 # Work out what needs to be removed
 oldheaders    := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
@@ -78,9 +67,8 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
                             file$(if $(word 2, $(all-files)),s))
       cmd_install = \
-        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \
-        $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \
-        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \
+        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-y); \
+        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-y); \
         for F in $(wrapper-files); do                                   \
                 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
         done;                                                           \
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572356 — [PATCH v5 6/8] uapi: includes linux/types.h before exporting files

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 6/8] uapi: includes linux/types.h before exporting files
Message-ID<t6pCy-4Bc-31@gated-at.bofh.it>
In reply to#1572353
Some files will be exported after the next patch. 0-day tests report the
following warning/error:
./usr/include/linux/bcache.h:8: include of <linux/types.h> is preferred over <asm/types.h>
./usr/include/linux/bcache.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/qrtr.h:8: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/cryptouser.h:39: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/media.h:29: included file 'linux/version.h' is not exported
./usr/include/linux/pr.h:14: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/btrfs_tree.h:337: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/seg6.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/seg6_hmac.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/bcache.h     | 2 +-
 include/uapi/linux/btrfs_tree.h | 2 ++
 include/uapi/linux/cryptouser.h | 2 ++
 include/uapi/linux/media.h      | 1 -
 include/uapi/linux/pr.h         | 2 ++
 include/uapi/linux/seg6.h       | 2 ++
 6 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index 22b6ad31c706..e3bb0635e94a 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -5,7 +5,7 @@
  * Bcache on disk data structures
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define BITMASK(name, type, field, offset, size)		\
 static inline __u64 name(const type *k)				\
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index d5ad15a106a7..6a261cb52d95 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -1,6 +1,8 @@
 #ifndef _BTRFS_CTREE_H_
 #define _BTRFS_CTREE_H_
 
+#include <linux/types.h>
+
 /*
  * This header contains the structure definitions and constants used
  * by file system objects that can be retrieved using
diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h
index 11d21fce14d6..c6a09c5261e7 100644
--- a/include/uapi/linux/cryptouser.h
+++ b/include/uapi/linux/cryptouser.h
@@ -18,6 +18,8 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include <linux/types.h>
+
 /* Netlink configuration messages.  */
 enum {
 	CRYPTO_MSG_BASE = 0x10,
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 4890787731b8..27c972903b3f 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -28,7 +28,6 @@
 #endif
 #include <linux/ioctl.h>
 #include <linux/types.h>
-#include <linux/version.h>
 
 #define MEDIA_API_VERSION	KERNEL_VERSION(0, 1, 0)
 
diff --git a/include/uapi/linux/pr.h b/include/uapi/linux/pr.h
index 57d7c0f916b6..645ef3cf3dd0 100644
--- a/include/uapi/linux/pr.h
+++ b/include/uapi/linux/pr.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI_PR_H
 #define _UAPI_PR_H
 
+#include <linux/types.h>
+
 enum pr_type {
 	PR_WRITE_EXCLUSIVE		= 1,
 	PR_EXCLUSIVE_ACCESS		= 2,
diff --git a/include/uapi/linux/seg6.h b/include/uapi/linux/seg6.h
index c396a8052f73..33496595064c 100644
--- a/include/uapi/linux/seg6.h
+++ b/include/uapi/linux/seg6.h
@@ -14,6 +14,8 @@
 #ifndef _UAPI_LINUX_SEG6_H
 #define _UAPI_LINUX_SEG6_H
 
+#include <linux/types.h>
+
 /*
  * SRH
  */
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572468 — Re: [PATCH v5 6/8] uapi: includes linux/types.h before exporting files

Fromkbuild test robot <lkp@intel.com>
Date2017-02-02 16:30 +0100
SubjectRe: [PATCH v5 6/8] uapi: includes linux/types.h before exporting files
Message-ID<t6ruG-5L1-15@gated-at.bofh.it>
In reply to#1572356

[Multipart message — attachments visible in raw view] — view raw

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: x86_64-randconfig-n0-02022216 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/media/media-device.c: In function 'media_device_get_info':
>> drivers/media/media-device.c:76:2: error: implicit declaration of function 'KERNEL_VERSION' [-Werror=implicit-function-declaration]
     info->media_version = MEDIA_API_VERSION;
     ^
   drivers/media/media-device.c: In function 'media_device_pci_init':
   drivers/media/media-device.c:841:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^
   drivers/media/media-device.c:841:25: note: each undeclared identifier is reported only once for each function it appears in
   drivers/media/media-device.c: In function '__media_device_usb_init':
   drivers/media/media-device.c:870:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^
   cc1: some warnings being treated as errors

vim +/KERNEL_VERSION +76 drivers/media/media-device.c

bcd5081b Sakari Ailus          2016-05-03  70  			sizeof(info->driver));
bb07bd6b Mauro Carvalho Chehab 2016-02-11  71  
bcd5081b Sakari Ailus          2016-05-03  72  	strlcpy(info->model, dev->model, sizeof(info->model));
bcd5081b Sakari Ailus          2016-05-03  73  	strlcpy(info->serial, dev->serial, sizeof(info->serial));
bcd5081b Sakari Ailus          2016-05-03  74  	strlcpy(info->bus_info, dev->bus_info, sizeof(info->bus_info));
140d8816 Laurent Pinchart      2010-08-18  75  
bcd5081b Sakari Ailus          2016-05-03 @76  	info->media_version = MEDIA_API_VERSION;
bcd5081b Sakari Ailus          2016-05-03  77  	info->hw_revision = dev->hw_revision;
bcd5081b Sakari Ailus          2016-05-03  78  	info->driver_version = dev->driver_version;
140d8816 Laurent Pinchart      2010-08-18  79  

:::::: The code at line 76 was first introduced by commit
:::::: bcd5081b05367d108c1380369c698a4601c41cfc [media] media: Refactor copying IOCTL arguments from and to user space

:::::: TO: Sakari Ailus <sakari.ailus@linux.intel.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@s-opensource.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1572362 — [PATCH v5 2/8] nios2: put setup.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 2/8] nios2: put setup.h in uapi
Message-ID<t6pCz-4Bc-49@gated-at.bofh.it>
In reply to#1572353
This header file is exported, but from a userland pov, it's just a wrapper
to asm-generic/setup.h.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index e0bb972a50d7..69c965304146 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1572364 — [PATCH v5 5/8] Makefile.headersinst: remove destination-y option

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-02 14:30 +0100
Subject[PATCH v5 5/8] Makefile.headersinst: remove destination-y option
Message-ID<t6pCz-4Bc-45@gated-at.bofh.it>
In reply to#1572353
This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y
for exported headers") but never used in-tree.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 9b9c4797fc55..37b525d329ae 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -46,9 +46,8 @@ This document describes the Linux kernel Makefiles.
 	=== 7 Kbuild syntax for exported headers
 		--- 7.1 header-y
 		--- 7.2 genhdr-y
-		--- 7.3 destination-y
-		--- 7.4 generic-y
-		--- 7.5 generated-y
+		--- 7.3 generic-y
+		--- 7.4 generated-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1295,21 +1294,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#include/linux/Kbuild
 			genhdr-y += version.h
 
-	--- 7.3 destination-y
-
-	When an architecture has a set of exported headers that needs to be
-	exported to a different directory destination-y is used.
-	destination-y specifies the destination directory for all exported
-	headers in the file where it is present.
-
-		Example:
-			#arch/xtensa/platforms/s6105/include/platform/Kbuild
-			destination-y := include/linux
-
-	In the example above all exported headers in the Kbuild file
-	will be located in the directory "include/linux" when exported.
-
-	--- 7.4 generic-y
+	--- 7.3 generic-y
 
 	If an architecture uses a verbatim copy of a header from
 	include/asm-generic then this is listed in the file
@@ -1336,7 +1321,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 		Example: termios.h
 			#include <asm-generic/termios.h>
 
-	--- 7.5 generated-y
+	--- 7.4 generated-y
 
 	If an architecture generates other header files alongside generic-y
 	wrappers, and not included in genhdr-y, then generated-y specifies
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 3e20d03432d2..876b42cfede4 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,7 +14,7 @@ kbuild-file := $(srctree)/$(obj)/Kbuild
 include $(kbuild-file)
 
 # called may set destination dir (when installing to asm/)
-_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj)))
+_dst := $(if $(dst),$(dst),$(obj))
 
 old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
 ifneq ($(wildcard $(old-kbuild-file)),)
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1573462 — Re: [PATCH v5 5/8] Makefile.headersinst: remove destination-y option

FromPaul Bolle <pebolle@tiscali.nl>
Date2017-02-03 22:50 +0100
SubjectRe: [PATCH v5 5/8] Makefile.headersinst: remove destination-y option
Message-ID<t6TTX-7qD-7@gated-at.bofh.it>
In reply to#1572364
On Thu, 2017-02-02 at 14:25 +0100, Nicolas Dichtel wrote:
> This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y
> for exported headers") but never used in-tree.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

I've got an identical patch in my ever growing stack of stuff that I should
actually submit:

Acked-by: Paul Bolle <pebolle@tiscali.nl>

Thanks,


Paul Bolle

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web