Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600307 > unrolled thread
| Started by | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| First post | 2017-03-14 14:00 +0100 |
| Last post | 2017-03-27 17:40 +0200 |
| Articles | 20 on this page of 26 — 2 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.
[PATCH v10 00/11] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-14 14:00 +0100
[PATCH v10 04/11] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-14 14:00 +0100
[PATCH v10 08/11] cryptouser.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-14 14:00 +0100
[PATCH v10 01/11] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-14 14:00 +0100
Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-27 07:40 +0200
Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 11:50 +0200
[PATCH v10 03/11] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-14 14:00 +0100
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-24 09:40 +0100
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-24 09:50 +0100
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-24 10:10 +0100
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-27 07:40 +0200
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 11:50 +0200
Re: [PATCH v10 00/11] uapi: export all headers under uapi directories Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-27 17:40 +0200
[PATCH v11 11/12] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 08/12] cryptouser.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 02/12] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 05/12] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 04/12] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 03/12] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 07/12] btrfs_tree.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 00/12] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 09/12] smc_diag.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 01/12] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 06/12] uapi: includes linux/types.h before exporting files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:30 +0200
[PATCH v11 12/12] arch/include: remove empty Kbuild files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-03-27 14:40 +0200
Re: [PATCH v11 00/12] uapi: export all headers under uapi directories Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-27 17:40 +0200
Page 1 of 2 [1] 2 Next page →
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-14 14:00 +0100 |
| Subject | [PATCH v10 00/11] uapi: export all headers under uapi directories |
| Message-ID | <tkUdr-cW-3@gated-at.bofh.it> |
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.
Patch #7 to #9 fix some errors when the corresponding files are included by
userland.
Patches #10 and #11 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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1).
I didn't find any conflict with v4.11-rc2.
v9 -> v10:
- rebase on top of masahiroy/linux-kbuild.git#for-next
- patch #4 & #10: fix dependency check
- fix some typos in commits logs
v8 -> v9:
- rebase on top of linus tree
- patch #8: add include/uapi/linux/crypto.h
v7 -> v8:
- rebase on top of linus tree
- add patch #7, #8 and #9
v6 -> v7:
- rebase on top of linus tree
- patch #7: remove autogenerated files from the list in the commit log
v5 -> v6:
- patch #6: remove change of include/uapi/linux/media.h
- patch #7: fix hdr export when 'make O=' is used (look for genhdr files in
the right directory)
- patch #8: fix 'make headers_check'
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] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-14 14:00 +0100 |
| Subject | [PATCH v10 04/11] Makefile.headersinst: cleanup input files |
| Message-ID | <tkUdu-cW-65@gated-at.bofh.it> |
| In reply to | #1600307 |
After the last three 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 | 38 ++++++++++++++------------------------
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 1106d6ca3a38..7bd9df6efe2f 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; \
@@ -106,7 +94,9 @@ __headersinst: $(subdirs) $(install-file)
@:
targets += $(install-file)
-$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
+$(install-file): scripts/headers_install.sh \
+ $(addprefix $(srcdir)/,$(header-y)) \
+ $(addprefix $(gendir)/,$(genhdr-y)) FORCE
$(if $(unwanted),$(call cmd,remove),)
$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
$(call if_changed,install)
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-14 14:00 +0100 |
| Subject | [PATCH v10 08/11] cryptouser.h: fix include from userland |
| Message-ID | <tkUdt-cW-59@gated-at.bofh.it> |
| In reply to | #1600307 |
This patch prepares the uapi export by fixing the following error:
.../linux/cryptouser.h:58:16: error: ‘CRYPTO_MAX_ALG_NAME’ undeclared here (not in a function)
char cru_name[CRYPTO_MAX_ALG_NAME];
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
---
include/linux/crypto.h | 2 +-
include/uapi/linux/crypto.h | 14 ++++++++++++++
include/uapi/linux/cryptouser.h | 6 ++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 include/uapi/linux/crypto.h
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index c0b0cf3d2d2f..cc2425ba8527 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/uaccess.h>
+#include <uapi/linux/crypto.h>
/*
* Autoloaded crypto modules should only use a prefixed name to avoid allowing
@@ -123,7 +124,6 @@
/*
* Miscellaneous stuff.
*/
-#define CRYPTO_MAX_ALG_NAME 64
/*
* The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
diff --git a/include/uapi/linux/crypto.h b/include/uapi/linux/crypto.h
new file mode 100644
index 000000000000..e342c5a5ac50
--- /dev/null
+++ b/include/uapi/linux/crypto.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2017 Nicolas Dichtel <nicolas.dichtel@6wind.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ */
+
+#ifndef _UAPI_CRYPTO_H
+#define _UAPI_CRYPTO_H
+
+#define CRYPTO_MAX_ALG_NAME 64
+
+#endif /* _UAPI_CRYPTO_H */
diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h
index c6a09c5261e7..ce3c64fb89e1 100644
--- a/include/uapi/linux/cryptouser.h
+++ b/include/uapi/linux/cryptouser.h
@@ -18,7 +18,11 @@
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifndef _UAPI_CRYPTOUSER_H
+#define _UAPI_CRYPTOUSER_H
+
#include <linux/types.h>
+#include <linux/crypto.h>
/* Netlink configuration messages. */
enum {
@@ -121,3 +125,5 @@ struct crypto_report_acomp {
#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
sizeof(struct crypto_report_blkcipher))
+
+#endif /* _UAPI_CRYPTOUSER_H */
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-14 14:00 +0100 |
| Subject | [PATCH v10 01/11] h8300: put bitsperlong.h in uapi |
| Message-ID | <tkUdu-cW-75@gated-at.bofh.it> |
| In reply to | #1600307 |
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]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-03-27 07:40 +0200 |
| Subject | Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi |
| Message-ID | <tpvxM-321-15@gated-at.bofh.it> |
| In reply to | #1600313 |
Hi Nicolas, 2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>: > This header file is exported, thus move it to uapi. > > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> > -#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 Just a minor comment. The include guard was originally __ASM_H8300_BITS_PER_LONG. This will change it into _ASM_H8300_BITS_PER_LONG (after _UAPI is stripped by headers_install.sh) I just thought _UAPI__ASM_H8300_BITS_PER_LONG might be even safer, but I know I am nit-picking. I can apply this as-is. I leave it to you. -- Best Regards Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 11:50 +0200 |
| Subject | Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi |
| Message-ID | <tpzrI-62q-35@gated-at.bofh.it> |
| In reply to | #1609459 |
Le 27/03/2017 à 07:31, Masahiro Yamada a écrit : [snip] >> -#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 > > > Just a minor comment. > > The include guard was originally __ASM_H8300_BITS_PER_LONG. > This will change it into _ASM_H8300_BITS_PER_LONG > (after _UAPI is stripped by headers_install.sh) > > I just thought _UAPI__ASM_H8300_BITS_PER_LONG might be even safer, > but I know I am nit-picking. I can apply this as-is. > I leave it to you. I intentionnaly "clean" that, but I will restore it, no problem ;-) Regards, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-14 14:00 +0100 |
| Subject | [PATCH v10 03/11] x86: stop exporting msr-index.h to userland |
| Message-ID | <tkUdu-cW-71@gated-at.bofh.it> |
| In reply to | #1600307 |
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>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-24 09:40 +0100 |
| Message-ID | <tosVk-7gO-33@gated-at.bofh.it> |
| In reply to | #1600307 |
Le 14/03/2017 à 13:54, Nicolas Dichtel a écrit : > 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. > Patch #7 to #9 fix some errors when the corresponding files are included by > userland. > Patches #10 and #11 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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). > I didn't find any conflict with v4.11-rc2. Masahiro, is this series under review or do you expect something else on my side? Regards, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-03-24 09:50 +0100 |
| Message-ID | <tot50-7ku-25@gated-at.bofh.it> |
| In reply to | #1608218 |
Hi Nicolas, 2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>: > Le 14/03/2017 à 13:54, Nicolas Dichtel a écrit : >> 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. >> Patch #7 to #9 fix some errors when the corresponding files are included by >> userland. >> Patches #10 and #11 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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). >> I didn't find any conflict with v4.11-rc2. > Masahiro, is this series under review or do you expect something else on my side? > Under review. Please give me time to take a closer look. Sorry for the delay. -- Best Regards Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-24 10:10 +0100 |
| Message-ID | <toton-7Is-45@gated-at.bofh.it> |
| In reply to | #1608226 |
Le 24/03/2017 à 09:42, Masahiro Yamada a écrit : > Hi Nicolas, > > > 2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>: >> Le 14/03/2017 à 13:54, Nicolas Dichtel a écrit : >>> 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. >>> Patch #7 to #9 fix some errors when the corresponding files are included by >>> userland. >>> Patches #10 and #11 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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). >>> I didn't find any conflict with v4.11-rc2. >> Masahiro, is this series under review or do you expect something else on my side? >> > > Under review. > Please give me time to take a closer look. > Sorry for the delay. No problem, take your time. I just wanted to be sure to not miss something ;-) Thank you, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-03-27 07:40 +0200 |
| Message-ID | <tpvxM-321-9@gated-at.bofh.it> |
| In reply to | #1608251 |
Hi Nocolas,
2017-03-24 18:03 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>:
> Le 24/03/2017 à 09:42, Masahiro Yamada a écrit :
>> Hi Nicolas,
>>
>>
>> 2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>:
>>> Le 14/03/2017 à 13:54, Nicolas Dichtel a écrit :
>>>> 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.
>>>> Patch #7 to #9 fix some errors when the corresponding files are included by
>>>> userland.
>>>> Patches #10 and #11 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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1).
>>>> I didn't find any conflict with v4.11-rc2.
>>> Masahiro, is this series under review or do you expect something else on my side?
>>>
>>
>> Under review.
>> Please give me time to take a closer look.
>> Sorry for the delay.
> No problem, take your time. I just wanted to be sure to not miss something ;-)
>
>
As a whole, this series is amazing. Thanks for your great work!
I added some comments, but they are trivial.
I wanted to leave comments/questions on 10/11,
but I could not find 10/11 in my mailbox. I do not know why.
I am leaving comments on the cover-letter,
the following are related to 10/11.
[1]
>mandatory-y += $(foreach hdr,$(opt-header), \
> $(if \
> $(wildcard \
> $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \
> $(srctree)/arch/$(SRCARCH)/include/asm/$(hdr) \
> ), \
> $(hdr) \
> ))
What is this actually checking?
If ARCH has its own (uapi/)asm/{kvm.h,kvm_para.h,a.out.h},
they are added to mandatory-y, then they are checked if they exist.
But, we know they exist.
This check reminds us only when we added asm/*.h
but forgot to add uapi/asm/*.h
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) seems unneeded at least.
(perhaps, the whole hunk might be unneeded.)
[2]
>ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
> $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)
>header-n += a.out.h
>endif
>
>ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \
> $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
>header-n += kvm.h
>endif
>
>ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \
> $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),)
>header-n += kvm_para.h
>endif
This series intends all headers are exported from uapi/, correct?
Do we still need to check $(srctree)/arch/$(SRCARCH)/include/asm/*.h ?
(related to [1])
[3]
>--- 7.1 header-n
>
>header-n is essentially used by include/uapi/linux/Kbuild to avoid
>exporting specific headers (e.g. kvm.h) on architectures that do not
>support it. It should be avoided as much as possible.
Going forward, header-y will be never used
because uapi/ is exported by default.
So, I wonder if we could rename this into something clearer.
Kbuild supports "no-clean-files".
(Please see ./Kbuild for its usage)
I guess this notation seems clearer
when we want to negate the default behavior.
Can you consider "no-export", "no-export-files", "no-export-headers"
or whatever you like?
Thanks!
--
Best Regards
Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 11:50 +0200 |
| Message-ID | <tpzrH-62q-1@gated-at.bofh.it> |
| In reply to | #1609458 |
Hi Masahiro,
Le 27/03/2017 à 07:26, Masahiro Yamada a écrit :
> Hi Nocolas,
>
>
> 2017-03-24 18:03 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>:
[snip]
>
>
> As a whole, this series is amazing. Thanks for your great work!
Thank you. And thank you for taking time to review it.
>
>
> I added some comments, but they are trivial.
>
>
>
>
> I wanted to leave comments/questions on 10/11,
> but I could not find 10/11 in my mailbox. I do not know why.
Note that you can download the mail from the kbuild patchwork, open it with your
email client and do a reply ;-)
>
>
> I am leaving comments on the cover-letter,
> the following are related to 10/11.
>
>
>
> [1]
>
>> mandatory-y += $(foreach hdr,$(opt-header), \
>> $(if \
>> $(wildcard \
>> $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \
>> $(srctree)/arch/$(SRCARCH)/include/asm/$(hdr) \
>> ), \
>> $(hdr) \
>> ))
>
> What is this actually checking?
>
> If ARCH has its own (uapi/)asm/{kvm.h,kvm_para.h,a.out.h},
> they are added to mandatory-y, then they are checked if they exist.
> But, we know they exist.
Yes, you're right. With english words : 'those files are mandatory only if they
exist', thus they are not mandatory at all :)
>
>
> This check reminds us only when we added asm/*.h
> but forgot to add uapi/asm/*.h
>
> $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) seems unneeded at least.
> (perhaps, the whole hunk might be unneeded.)
I think we can remove the whole hunk (see also [2]).
>
>
>
> [2]
>
>> ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
>> $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)
>> header-n += a.out.h
>> endif
>>
>> ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \
>> $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
>> header-n += kvm.h
>> endif
>>
>> ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \
>> $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),)
>> header-n += kvm_para.h
>> endif
>
> This series intends all headers are exported from uapi/, correct?
> Do we still need to check $(srctree)/arch/$(SRCARCH)/include/asm/*.h ?
> (related to [1])
No you're right, uapi/asm/*.h is enough. Those files should be exported only if
the uapi/asm/ counterpart exists.
>
>
>
> [3]
>
>> --- 7.1 header-n
>>
>> header-n is essentially used by include/uapi/linux/Kbuild to avoid
>> exporting specific headers (e.g. kvm.h) on architectures that do not
>> support it. It should be avoided as much as possible.
>
>
> Going forward, header-y will be never used
> because uapi/ is exported by default.
>
> So, I wonder if we could rename this into something clearer.
>
> Kbuild supports "no-clean-files".
> (Please see ./Kbuild for its usage)
> I guess this notation seems clearer
> when we want to negate the default behavior.
>
> Can you consider "no-export", "no-export-files", "no-export-headers"
> or whatever you like?
No problem, let's use no-export-headers.
Thank you,
Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-03-27 17:40 +0200 |
| Message-ID | <tpEUq-1P8-23@gated-at.bofh.it> |
| In reply to | #1609617 |
Hi Nicolas, 2017-03-27 18:45 GMT+09:00 Nicolas Dichtel <nicolas.dichtel@6wind.com>: >> I wanted to leave comments/questions on 10/11, >> but I could not find 10/11 in my mailbox. I do not know why. > Note that you can download the mail from the kbuild patchwork, open it with your > email client and do a reply ;-) I took the patch from the patchwork for git-am, but I was too lazy to import it to my mailer. I will try it next time. Thanks for the tip! -- Best Regards Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 11/12] uapi: export all arch specifics directories |
| Message-ID | <tpBWy-80f-7@gated-at.bofh.it> |
| In reply to | #1608226 |
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 | 6 +++--- arch/cris/include/uapi/asm/Kbuild | 3 --- arch/tile/include/uapi/asm/Kbuild | 2 -- scripts/Makefile.headersinst | 3 +-- 5 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index b9f7ca4e62ae..e18daca65ccd 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 6ea27d9f1384..50547481ed5a 100644 --- a/Makefile +++ b/Makefile @@ -1131,7 +1131,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: @@ -1152,7 +1152,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 @@ -1161,7 +1161,7 @@ headers_check_all: headers_install_all PHONY += headers_check headers_check: headers_install $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1 - $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1 + $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/ $(hdr-dst) HDRCHECK=1 # --------------------------------------------------------------------------- # Kernel selftest 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 20be1fbc19cc..6ba97a1f9c5a 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. # @@ -30,7 +30,6 @@ installdir := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst)) srcdir := $(srctree)/$(obj) gendir := $(objtree)/$(gen) subdirs := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.)) -subdirs += $(subdir-y) header-files := $(notdir $(wildcard $(srcdir)/*.h)) header-files += $(notdir $(wildcard $(srcdir)/*.agh)) header-files := $(filter-out $(no-export-headers), $(header-files)) -- 2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 08/12] cryptouser.h: fix include from userland |
| Message-ID | <tpBWy-80f-19@gated-at.bofh.it> |
| In reply to | #1608226 |
This patch prepares the uapi export by fixing the following error:
.../linux/cryptouser.h:58:16: error: ‘CRYPTO_MAX_ALG_NAME’ undeclared here (not in a function)
char cru_name[CRYPTO_MAX_ALG_NAME];
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
---
include/linux/crypto.h | 2 +-
include/uapi/linux/crypto.h | 14 ++++++++++++++
include/uapi/linux/cryptouser.h | 6 ++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 include/uapi/linux/crypto.h
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index c0b0cf3d2d2f..cc2425ba8527 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/uaccess.h>
+#include <uapi/linux/crypto.h>
/*
* Autoloaded crypto modules should only use a prefixed name to avoid allowing
@@ -123,7 +124,6 @@
/*
* Miscellaneous stuff.
*/
-#define CRYPTO_MAX_ALG_NAME 64
/*
* The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
diff --git a/include/uapi/linux/crypto.h b/include/uapi/linux/crypto.h
new file mode 100644
index 000000000000..e342c5a5ac50
--- /dev/null
+++ b/include/uapi/linux/crypto.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2017 Nicolas Dichtel <nicolas.dichtel@6wind.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ */
+
+#ifndef _UAPI_CRYPTO_H
+#define _UAPI_CRYPTO_H
+
+#define CRYPTO_MAX_ALG_NAME 64
+
+#endif /* _UAPI_CRYPTO_H */
diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h
index c6a09c5261e7..751e7daef54a 100644
--- a/include/uapi/linux/cryptouser.h
+++ b/include/uapi/linux/cryptouser.h
@@ -18,6 +18,10 @@
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#ifndef _UAPI_CRYPTOUSER_H
+#define _UAPI_CRYPTOUSER_H
+
+#include <linux/crypto.h>
#include <linux/types.h>
/* Netlink configuration messages. */
@@ -121,3 +125,5 @@ struct crypto_report_acomp {
#define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
sizeof(struct crypto_report_blkcipher))
+
+#endif /* _UAPI_CRYPTOUSER_H */
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 02/12] nios2: put setup.h in uapi |
| Message-ID | <tpBWy-80f-13@gated-at.bofh.it> |
| In reply to | #1608226 |
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]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 05/12] Makefile.headersinst: remove destination-y option |
| Message-ID | <tpBWy-80f-23@gated-at.bofh.it> |
| In reply to | #1608226 |
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>
Acked-by: Paul Bolle <pebolle@tiscali.nl>
---
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 7bd9df6efe2f..ca5d439c9abf 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]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 04/12] Makefile.headersinst: cleanup input files |
| Message-ID | <tpBWy-80f-33@gated-at.bofh.it> |
| In reply to | #1608226 |
After the last three 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 | 38 ++++++++++++++------------------------
1 file changed, 14 insertions(+), 24 deletions(-)
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 1106d6ca3a38..7bd9df6efe2f 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; \
@@ -106,7 +94,9 @@ __headersinst: $(subdirs) $(install-file)
@:
targets += $(install-file)
-$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
+$(install-file): scripts/headers_install.sh \
+ $(addprefix $(srcdir)/,$(header-y)) \
+ $(addprefix $(gendir)/,$(genhdr-y)) FORCE
$(if $(unwanted),$(call cmd,remove),)
$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
$(call if_changed,install)
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 03/12] x86: stop exporting msr-index.h to userland |
| Message-ID | <tpBWz-80f-35@gated-at.bofh.it> |
| In reply to | #1608226 |
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>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
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]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-03-27 14:30 +0200 |
| Subject | [PATCH v11 07/12] btrfs_tree.h: fix include from userland |
| Message-ID | <tpBWy-80f-31@gated-at.bofh.it> |
| In reply to | #1608226 |
This patch prepares the uapi export by fixing the following errors:
.../linux/btrfs_tree.h:283:2: error: #error "UUID items require BTRFS_UUID_SIZE == 16!"
#error "UUID items require BTRFS_UUID_SIZE == 16!"
.../linux/btrfs_tree.h:390:12: error: ‘BTRFS_UUID_SIZE’ undeclared here (not in a function)
__u8 uuid[BTRFS_UUID_SIZE];
^
.../linux/btrfs_tree.h:796:16: error: ‘BTRFS_DEV_STAT_VALUES_MAX’ undeclared here (not in a function)
__le64 values[BTRFS_DEV_STAT_VALUES_MAX];
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
include/uapi/linux/btrfs_tree.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index 6a261cb52d95..10689e1fdf11 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -1,6 +1,7 @@
#ifndef _BTRFS_CTREE_H_
#define _BTRFS_CTREE_H_
+#include <linux/btrfs.h>
#include <linux/types.h>
/*
--
2.8.1
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web