Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1550216 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-01-03 22:40 +0100 |
| Last post | 2017-01-13 02:40 +0100 |
| Articles | 18 on this page of 38 — 11 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.
Re: [PATCH] uapi: use wildcards to list files Arnd Bergmann <arnd@arndb.de> - 2017-01-03 22:40 +0100
Re: [PATCH] uapi: use wildcards to list files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-04 10:10 +0100
[PATCH v2 5/7] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
[PATCH v2 6/7] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
[PATCH v2 0/7] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
[PATCH v2 1/7] arm: put types.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
Re: [PATCH v2 1/7] arm: put types.h in uapi Arnd Bergmann <arnd@arndb.de> - 2017-01-09 12:40 +0100
Re: [PATCH v2 1/7] arm: put types.h in uapi Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-09 13:10 +0100
[PATCH v2 3/7] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
Re: [PATCH v2 3/7] nios2: put setup.h in uapi Arnd Bergmann <arnd@arndb.de> - 2017-01-09 12:40 +0100
[PATCH v2 2/7] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-06 10:50 +0100
Re: [PATCH v2 4/7] x86: put msr-index.h in uapi Borislav Petkov <bp@alien8.de> - 2017-01-06 13:20 +0100
Re: [PATCH v2 4/7] x86: put msr-index.h in uapi Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-06 22:00 +0100
Re: [PATCH v2 0/7] uapi: export all headers under uapi directories Arnd Bergmann <arnd@arndb.de> - 2017-01-09 12:40 +0100
Re: [PATCH v2 0/7] uapi: export all headers under uapi directories Jesper Nilsson <jesper.nilsson@axis.com> - 2017-01-11 13:50 +0100
[PATCH v3 5/8] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 11:50 +0100
[PATCH v3 4/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 11:50 +0100
(none) David Howells <dhowells@redhat.com> - 2017-01-13 16:50 +0100
Re: [PATCH v3 4/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 17:10 +0100
Re: [PATCH v3 4/8] x86: stop exporting msr-index.h to userland Borislav Petkov <bp@alien8.de> - 2017-01-13 17:40 +0100
[PATCH v3 3/8] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 11:50 +0100
Re: [PATCH v3 3/8] nios2: put setup.h in uapi Tobias Klauser <tklauser@distanz.ch> - 2017-01-13 12:00 +0100
[PATCH v3 1/8] arm: put types.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 12:00 +0100
(none) David Howells <dhowells@redhat.com> - 2017-01-13 16:40 +0100
Re: [PATCH v3 1/8] arm: put types.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 17:10 +0100
Re: [PATCH v3 1/8] arm: put types.h in uapi Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-13 17:30 +0100
Re: [PATCH v3 1/8] arm: put types.h in uapi David Howells <dhowells@redhat.com> - 2017-01-13 17:40 +0100
Re: [PATCH v3 1/8] arm: put types.h in uapi Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-13 18:10 +0100
[PATCH v3 6/8] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 12:00 +0100
[PATCH v3 8/8] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 12:00 +0100
[PATCH v3 2/8] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 12:00 +0100
[PATCH v3 0/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-13 12:00 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-09 13:10 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Christoph Hellwig <hch@infradead.org> - 2017-01-09 14:00 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-12 17:00 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Jan Engelhardt <jengelh@inai.de> - 2017-01-12 17:40 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-01-12 17:40 +0100
Re: [PATCH v2 7/7] uapi: export all headers under uapi directories Jeff Epler <jepler@unpythonic.net> - 2017-01-13 02:40 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 11:50 +0100 |
| Subject | [PATCH v3 3/8] nios2: put setup.h in uapi |
| Message-ID | <sZ7AK-8dm-23@gated-at.bofh.it> |
| In reply to | #1554233 |
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> --- 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 | Tobias Klauser <tklauser@distanz.ch> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | Re: [PATCH v3 3/8] nios2: put setup.h in uapi |
| Message-ID | <sZ7Kv-8gB-21@gated-at.bofh.it> |
| In reply to | #1558203 |
On 2017-01-13 at 11:46:41 +0100, Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote: > 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>
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | [PATCH v3 1/8] arm: put types.h in uapi |
| Message-ID | <sZ7Ku-8gB-3@gated-at.bofh.it> |
| In reply to | #1554233 |
This header file is exported, thus move it to uapi. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> --- arch/arm/include/asm/types.h | 40 --------------------------------------- arch/arm/include/uapi/asm/types.h | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 arch/arm/include/asm/types.h create mode 100644 arch/arm/include/uapi/asm/types.h diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h deleted file mode 100644 index a53cdb8f068c..000000000000 --- a/arch/arm/include/asm/types.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _ASM_TYPES_H -#define _ASM_TYPES_H - -#include <asm-generic/int-ll64.h> - -/* - * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as - * unambiguous on ARM as you would expect. For the types below, there is a - * difference on ARM between GCC built for bare metal ARM, GCC built for glibc - * and the kernel itself, which results in build errors if you try to build with - * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' - * in order to use NEON intrinsics) - * - * As the typedefs for these types in 'stdint.h' are based on builtin defines - * supplied by GCC, we can tweak these to align with the kernel's idea of those - * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same - * source file (provided that -ffreestanding is used). - * - * int32_t uint32_t uintptr_t - * bare metal GCC long unsigned long unsigned int - * glibc GCC int unsigned int unsigned int - * kernel int unsigned int unsigned long - */ - -#ifdef __INT32_TYPE__ -#undef __INT32_TYPE__ -#define __INT32_TYPE__ int -#endif - -#ifdef __UINT32_TYPE__ -#undef __UINT32_TYPE__ -#define __UINT32_TYPE__ unsigned int -#endif - -#ifdef __UINTPTR_TYPE__ -#undef __UINTPTR_TYPE__ -#define __UINTPTR_TYPE__ unsigned long -#endif - -#endif /* _ASM_TYPES_H */ diff --git a/arch/arm/include/uapi/asm/types.h b/arch/arm/include/uapi/asm/types.h new file mode 100644 index 000000000000..9435a42f575e --- /dev/null +++ b/arch/arm/include/uapi/asm/types.h @@ -0,0 +1,40 @@ +#ifndef _UAPI_ASM_TYPES_H +#define _UAPI_ASM_TYPES_H + +#include <asm-generic/int-ll64.h> + +/* + * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as + * unambiguous on ARM as you would expect. For the types below, there is a + * difference on ARM between GCC built for bare metal ARM, GCC built for glibc + * and the kernel itself, which results in build errors if you try to build with + * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' + * in order to use NEON intrinsics) + * + * As the typedefs for these types in 'stdint.h' are based on builtin defines + * supplied by GCC, we can tweak these to align with the kernel's idea of those + * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same + * source file (provided that -ffreestanding is used). + * + * int32_t uint32_t uintptr_t + * bare metal GCC long unsigned long unsigned int + * glibc GCC int unsigned int unsigned int + * kernel int unsigned int unsigned long + */ + +#ifdef __INT32_TYPE__ +#undef __INT32_TYPE__ +#define __INT32_TYPE__ int +#endif + +#ifdef __UINT32_TYPE__ +#undef __UINT32_TYPE__ +#define __UINT32_TYPE__ unsigned int +#endif + +#ifdef __UINTPTR_TYPE__ +#undef __UINTPTR_TYPE__ +#define __UINTPTR_TYPE__ unsigned long +#endif + +#endif /* _UAPI_ASM_TYPES_H */ -- 2.8.1
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2017-01-13 16:40 +0100 |
| Subject | (none) |
| Message-ID | <sZc7n-2zn-1@gated-at.bofh.it> |
| In reply to | #1558211 |
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote: > This header file is exported, thus move it to uapi. Exported how? > +#ifdef __INT32_TYPE__ > +#undef __INT32_TYPE__ > +#define __INT32_TYPE__ int > +#endif > + > +#ifdef __UINT32_TYPE__ > +#undef __UINT32_TYPE__ > +#define __UINT32_TYPE__ unsigned int > +#endif > + > +#ifdef __UINTPTR_TYPE__ > +#undef __UINTPTR_TYPE__ > +#define __UINTPTR_TYPE__ unsigned long > +#endif These weren't defined by the kernel before, so why do we need to define them now? Will defining __UINTPTR_TYPE__ cause problems in compiling libboost by changing the signature on C++ functions that use uintptr_t? David
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 17:10 +0100 |
| Subject | Re: [PATCH v3 1/8] arm: put types.h in uapi |
| Message-ID | <sZcAq-2YI-45@gated-at.bofh.it> |
| In reply to | #1558493 |
Please, do not remove the email subject when you reply. I restore it to ease the thread follow-up. Le 13/01/2017 à 16:36, David Howells a écrit : > Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote: > >> This header file is exported, thus move it to uapi. > > Exported how? It is listed in include/uapi/asm-generic/Kbuild.asm, which is included by arch/arm/include/uapi/asm/Kbuild. You can also have a look at patch #5 to see why it was exported even if it was not in an uapi directory. Regards, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2017-01-13 17:30 +0100 |
| Subject | Re: [PATCH v3 1/8] arm: put types.h in uapi |
| Message-ID | <sZcTL-351-3@gated-at.bofh.it> |
| In reply to | #1558547 |
On Fri, Jan 13, 2017 at 05:01:01PM +0100, Nicolas Dichtel wrote: > Please, do not remove the email subject when you reply. I restore it to > ease the thread follow-up. I mentioned it to David, and he says it's because the long list of recipients is breaking his mailer. I've already posed the question about whether that's exploitable! > Le 13/01/2017 à 16:36, David Howells a écrit : > > Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote: > > > >> This header file is exported, thus move it to uapi. > > > > Exported how? > > It is listed in include/uapi/asm-generic/Kbuild.asm, which is included by > arch/arm/include/uapi/asm/Kbuild. We really should not be installing non-uapi header files to userland under _any_ circumstance - this to me sounds like a bug in kbuild. The assumption is that headers outside of uapi directories are not part of the user visible API, and so can be freely modified - which in the presence of this bug is untrue. However, as it's happening, and this header has been there since 2013 (commit 09096f6a0ee2 - "ARM: 7822/1: add workaround for ambiguous C99 stdint.h types") it's now well and truely part of the user API whether we intended it to be or not, so your patch looks to me like the correct thing to do. I think it needs further evaluation to make sure kbuild isn't going to do something else silly, like subsitute include/asm-generic/types.h for the now missing arch/arm/include/asm/types.h I wonder how many more headers are unintentionally exported. ... what a mess. :( -- 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.
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2017-01-13 17:40 +0100 |
| Subject | Re: [PATCH v3 1/8] arm: put types.h in uapi |
| Message-ID | <sZd3s-389-25@gated-at.bofh.it> |
| In reply to | #1558555 |
Russell King - ARM Linux <linux@armlinux.org.uk> wrote: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > Le 13/01/2017 =C3=A0 16:36, David Howells a =C3=A9crit : > > > Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote: > > >=20 > > >> This header file is exported, thus move it to uapi. > > >=20 > > > Exported how? > >=20 > > It is listed in include/uapi/asm-generic/Kbuild.asm, which is included = by > > arch/arm/include/uapi/asm/Kbuild. >=20 > We really should not be installing non-uapi header files to userland > under _any_ circumstance - this to me sounds like a bug in kbuild. It's not (or was not) a bug exactly - it was something introduced in commit 10b63956fce7f369cc37fd4d994f09bd5203efe4 to ease the transition to using the UAPI headers as Linus required the commit for each header dir to go through the submaintainer's tree. It was supposed to be removed, but that never got posted to Linus because t= he next phase of cleanups didn't happen as Linus said he block my email and ne= ver take any more patches from me if I sent him any more:-/ David
[toc] | [prev] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2017-01-13 18:10 +0100 |
| Subject | Re: [PATCH v3 1/8] arm: put types.h in uapi |
| Message-ID | <sZdwt-3x7-11@gated-at.bofh.it> |
| In reply to | #1558211 |
On Fri, Jan 13, 2017 at 11:46:39AM +0100, Nicolas Dichtel wrote: > This header file is exported, thus move it to uapi. I'm taking this patch, but with the following commit log: Due to the way kbuild works, this header was unintentionally exported back in 2013 when it was created, despite it not being in a uapi/ directory. This is very non-intuitive behaviour by Kbuild. However, we've had this include exported to userland for almost four years, and searching google for "ARM types.h __UINTPTR_TYPE__" gives no hint that anyone has complained about it. So, let's make it officially exported in this state. If anyone has any objections, they better shout sooner rather than later. > > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> > --- > arch/arm/include/asm/types.h | 40 --------------------------------------- > arch/arm/include/uapi/asm/types.h | 40 +++++++++++++++++++++++++++++++++++++++ > 2 files changed, 40 insertions(+), 40 deletions(-) > delete mode 100644 arch/arm/include/asm/types.h > create mode 100644 arch/arm/include/uapi/asm/types.h > > diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h > deleted file mode 100644 > index a53cdb8f068c..000000000000 > --- a/arch/arm/include/asm/types.h > +++ /dev/null > @@ -1,40 +0,0 @@ > -#ifndef _ASM_TYPES_H > -#define _ASM_TYPES_H > - > -#include <asm-generic/int-ll64.h> > - > -/* > - * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as > - * unambiguous on ARM as you would expect. For the types below, there is a > - * difference on ARM between GCC built for bare metal ARM, GCC built for glibc > - * and the kernel itself, which results in build errors if you try to build with > - * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' > - * in order to use NEON intrinsics) > - * > - * As the typedefs for these types in 'stdint.h' are based on builtin defines > - * supplied by GCC, we can tweak these to align with the kernel's idea of those > - * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same > - * source file (provided that -ffreestanding is used). > - * > - * int32_t uint32_t uintptr_t > - * bare metal GCC long unsigned long unsigned int > - * glibc GCC int unsigned int unsigned int > - * kernel int unsigned int unsigned long > - */ > - > -#ifdef __INT32_TYPE__ > -#undef __INT32_TYPE__ > -#define __INT32_TYPE__ int > -#endif > - > -#ifdef __UINT32_TYPE__ > -#undef __UINT32_TYPE__ > -#define __UINT32_TYPE__ unsigned int > -#endif > - > -#ifdef __UINTPTR_TYPE__ > -#undef __UINTPTR_TYPE__ > -#define __UINTPTR_TYPE__ unsigned long > -#endif > - > -#endif /* _ASM_TYPES_H */ > diff --git a/arch/arm/include/uapi/asm/types.h b/arch/arm/include/uapi/asm/types.h > new file mode 100644 > index 000000000000..9435a42f575e > --- /dev/null > +++ b/arch/arm/include/uapi/asm/types.h > @@ -0,0 +1,40 @@ > +#ifndef _UAPI_ASM_TYPES_H > +#define _UAPI_ASM_TYPES_H > + > +#include <asm-generic/int-ll64.h> > + > +/* > + * The C99 types uintXX_t that are usually defined in 'stdint.h' are not as > + * unambiguous on ARM as you would expect. For the types below, there is a > + * difference on ARM between GCC built for bare metal ARM, GCC built for glibc > + * and the kernel itself, which results in build errors if you try to build with > + * -ffreestanding and include 'stdint.h' (such as when you include 'arm_neon.h' > + * in order to use NEON intrinsics) > + * > + * As the typedefs for these types in 'stdint.h' are based on builtin defines > + * supplied by GCC, we can tweak these to align with the kernel's idea of those > + * types, so 'linux/types.h' and 'stdint.h' can be safely included from the same > + * source file (provided that -ffreestanding is used). > + * > + * int32_t uint32_t uintptr_t > + * bare metal GCC long unsigned long unsigned int > + * glibc GCC int unsigned int unsigned int > + * kernel int unsigned int unsigned long > + */ > + > +#ifdef __INT32_TYPE__ > +#undef __INT32_TYPE__ > +#define __INT32_TYPE__ int > +#endif > + > +#ifdef __UINT32_TYPE__ > +#undef __UINT32_TYPE__ > +#define __UINT32_TYPE__ unsigned int > +#endif > + > +#ifdef __UINTPTR_TYPE__ > +#undef __UINTPTR_TYPE__ > +#define __UINTPTR_TYPE__ unsigned long > +#endif > + > +#endif /* _UAPI_ASM_TYPES_H */ > -- > 2.8.1 > -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | [PATCH v3 6/8] Makefile.headersinst: remove destination-y option |
| Message-ID | <sZ7Kv-8gB-23@gated-at.bofh.it> |
| In reply to | #1554233 |
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]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | [PATCH v3 8/8] uapi: export all arch specifics directories |
| Message-ID | <sZ7Kv-8gB-17@gated-at.bofh.it> |
| In reply to | #1554233 |
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 51c072049e45..87a3d7d86776 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -48,7 +48,6 @@ This document describes the Linux kernel Makefiles. --- 7.2 genhdr-y --- 7.3 generic-y --- 7.4 generated-y - --- 7.5 subdir-y === 8 Kbuild Variables === 9 Makefile language @@ -1264,7 +1263,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 @@ -1331,18 +1330,6 @@ See subsequent chapter for the syntax of the Kbuild file. #arch/x86/include/asm/Kbuild generated-y += syscalls_32.h - --- 7.5 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 5f1a84735ff6..a35098157b69 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 16ac3e71050e..cafaca2d9a23 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)) genhdr-files := $(notdir $(wildcard $(srctree)/$(gen)/*.h)) -- 2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | [PATCH v3 2/8] h8300: put bitsperlong.h in uapi |
| Message-ID | <sZ7Kv-8gB-29@gated-at.bofh.it> |
| In reply to | #1554233 |
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 | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-13 12:00 +0100 |
| Subject | [PATCH v3 0/8] uapi: export all headers under uapi directories |
| Message-ID | <sZ7AJ-8dm-7@gated-at.bofh.it> |
| In reply to | #1554233 |
Here is the v3 of this series. The first 5 patches are just cleanup: some exported headers were still under a non-uapi directory or (x86 case) were wrongly exported. The patch 6 was spotted by code review: there is no in-tree user of this functionality. 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 ;-) 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]
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2017-01-09 13:10 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sXGVX-40B-11@gated-at.bofh.it> |
| In reply to | #1552645 |
On Fri, Jan 06, 2017 at 10:43:59AM +0100, Nicolas Dichtel wrote: > diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild > index 46a76cd6acb6..607f702c2d62 100644 > --- a/arch/arm/include/uapi/asm/Kbuild > +++ b/arch/arm/include/uapi/asm/Kbuild > @@ -1,23 +1,6 @@ > # UAPI Header export list > include include/uapi/asm-generic/Kbuild.asm > > -header-y += auxvec.h > -header-y += byteorder.h > -header-y += fcntl.h > -header-y += hwcap.h > -header-y += ioctls.h > -header-y += kvm_para.h > -header-y += mman.h > -header-y += perf_regs.h > -header-y += posix_types.h > -header-y += ptrace.h > -header-y += setup.h > -header-y += sigcontext.h > -header-y += signal.h > -header-y += stat.h > -header-y += statfs.h > -header-y += swab.h > -header-y += unistd.h > genhdr-y += unistd-common.h > genhdr-y += unistd-oabi.h > genhdr-y += unistd-eabi.h Acked-by: Russell King <rmk+kernel@armlinux.org.uk> -- 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.
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-01-09 14:00 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sXHIl-4hX-13@gated-at.bofh.it> |
| In reply to | #1552645 |
On Fri, Jan 06, 2017 at 10:43:59AM +0100, Nicolas Dichtel wrote: > Regularly, when a new header is created in include/uapi/, the developer > forgets to add it in the corresponding Kbuild file. This error is usually > detected after the release is out. > > In fact, all headers under uapi directories should be exported, thus it's > useless to have an exhaustive list. > > After this patch, the following files, which were not exported, are now > exported (with make headers_install_all): ... snip ... > linux/genwqe/.install > linux/genwqe/..install.cmd > linux/cifs/.install > linux/cifs/..install.cmd I'm pretty sure these should not be exported!
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-12 17:00 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sYPXc-5KY-21@gated-at.bofh.it> |
| In reply to | #1554286 |
Le 09/01/2017 à 13:56, Christoph Hellwig a écrit : > On Fri, Jan 06, 2017 at 10:43:59AM +0100, Nicolas Dichtel wrote: >> Regularly, when a new header is created in include/uapi/, the developer >> forgets to add it in the corresponding Kbuild file. This error is usually >> detected after the release is out. >> >> In fact, all headers under uapi directories should be exported, thus it's >> useless to have an exhaustive list. >> >> After this patch, the following files, which were not exported, are now >> exported (with make headers_install_all): > > ... snip ... > >> linux/genwqe/.install >> linux/genwqe/..install.cmd >> linux/cifs/.install >> linux/cifs/..install.cmd > > I'm pretty sure these should not be exported! > Those files are created in every directory: $ find usr/include/ -name '\.\.install.cmd' | wc -l 71 $ find usr/include/ -name '\.install' | wc -l 71 See also http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/Makefile.headersinst#n32 Thank you, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Jan Engelhardt <jengelh@inai.de> |
|---|---|
| Date | 2017-01-12 17:40 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sYQzU-6d7-17@gated-at.bofh.it> |
| In reply to | #1557548 |
On Thursday 2017-01-12 16:52, Nicolas Dichtel wrote: >Le 09/01/2017 à 13:56, Christoph Hellwig a écrit : >> On Fri, Jan 06, 2017 at 10:43:59AM +0100, Nicolas Dichtel wrote: >>> Regularly, when a new header is created in include/uapi/, the developer >>> forgets to add it in the corresponding Kbuild file. This error is usually >>> detected after the release is out. >>> >>> In fact, all headers under uapi directories should be exported, thus it's >>> useless to have an exhaustive list. >>> >>> After this patch, the following files, which were not exported, are now >>> exported (with make headers_install_all): >> >> ... snip ... >> >>> linux/genwqe/.install >>> linux/genwqe/..install.cmd >>> linux/cifs/.install >>> linux/cifs/..install.cmd >> >> I'm pretty sure these should not be exported! >> >Those files are created in every directory: >$ find usr/include/ -name '\.\.install.cmd' | wc -l >71 That still does not mean they should be exported. Anything but headers (and directories as a skeleton structure) is maximally suspicious.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Dichtel <nicolas.dichtel@6wind.com> |
|---|---|
| Date | 2017-01-12 17:40 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sYQzU-6d7-15@gated-at.bofh.it> |
| In reply to | #1557584 |
Le 12/01/2017 à 17:28, Jan Engelhardt a écrit : > On Thursday 2017-01-12 16:52, Nicolas Dichtel wrote: > >> Le 09/01/2017 à 13:56, Christoph Hellwig a écrit : >>> On Fri, Jan 06, 2017 at 10:43:59AM +0100, Nicolas Dichtel wrote: >>>> Regularly, when a new header is created in include/uapi/, the developer >>>> forgets to add it in the corresponding Kbuild file. This error is usually >>>> detected after the release is out. >>>> >>>> In fact, all headers under uapi directories should be exported, thus it's >>>> useless to have an exhaustive list. >>>> >>>> After this patch, the following files, which were not exported, are now >>>> exported (with make headers_install_all): >>> >>> ... snip ... >>> >>>> linux/genwqe/.install >>>> linux/genwqe/..install.cmd >>>> linux/cifs/.install >>>> linux/cifs/..install.cmd >>> >>> I'm pretty sure these should not be exported! >>> >> Those files are created in every directory: >> $ find usr/include/ -name '\.\.install.cmd' | wc -l >> 71 > > That still does not mean they should be exported. > > Anything but headers (and directories as a skeleton structure) is maximally suspicious. > What I was trying to say is that I export those directories like other are. Removing those files is not related to that series. Regards, Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Jeff Epler <jepler@unpythonic.net> |
|---|---|
| Date | 2017-01-13 02:40 +0100 |
| Subject | Re: [PATCH v2 7/7] uapi: export all headers under uapi directories |
| Message-ID | <sYZ0u-2Wc-9@gated-at.bofh.it> |
| In reply to | #1557587 |
On Thu, Jan 12, 2017 at 05:32:09PM +0100, Nicolas Dichtel wrote: > What I was trying to say is that I export those directories like other are. > Removing those files is not related to that series. Perhaps the correct solution is to only copy files matching "*.h" to reduce the risk of copying files incidentally created by kbuild but which shouldn't be installed as uapi headers. jeff
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web