Skip to contentSkip to conversation

arm64: asm: Explicitly include linux/personality.h in asm/page.h

PATCH New Mark Brown 5 participants 6 messages Jan 28, 2016 – Feb 2, 2016

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

---
 arch/arm64/include/asm/page.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/include/asm/page.h +2 -0
index 9b2f5a9d019d..9553c39e0655 100644
@@ -19,6 +19,8 @@
 #ifndef __ASM_PAGE_H
 #define __ASM_PAGE_H
 
+#include <linux/personality.h>
+
 /* PAGE_SHIFT determines the page size */
 /* CONT_SHIFT determines the number of pages which can be tracked together  */
 #ifdef CONFIG_ARM64_64K_PAGES
Signature · 1 line
2.7.0.rc3
author
#1 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

Quoted 4 lines · Mark Brown

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

Argh, sorry - this causes problems further down the line with linking
vdso.lds due to enums getting into the linker script and upsetting the
linker (there are several compile errors today so it was masked).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160128/30ed13da/attachment.sig>

maintainer
#2 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

Quoted 9 lines · Mark Brown
Quoted 4 lines · Mark Brown

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

Argh, sorry - this causes problems further down the line with linking vdso.lds due to enums getting into the linker script and upsetting the linker (there are several compile errors today so it was masked).

You can move the include further down after the #ifndef __ASSEMBLY__

Signature · 1 line
Catalin
#3 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Mark Brown
Quoted 4 lines · Mark Brown

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

Quoted 5 lines
Quoted 3 lines

Argh, sorry - this causes problems further down the line with linking vdso.lds due to enums getting into the linker script and upsetting the linker (there are several compile errors today so it was masked).

You can move the include further down after the #ifndef __ASSEMBLY__

Indeed, here's what I've been using to successfully complete ARM64 test builds:

--- >8 ---

arch/arm64/include/asm/page.h +1 -0
index 9b2f5a9d019d..ae615b9d9a55 100644
@@ -39,6 +39,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/personality.h> /* for READ_IMPLIES_EXEC */
 #include <asm/pgtable-types.h>
 
 extern void __cpu_clear_user_page(void *p, unsigned long user);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160128/d01a1452/attachment-0001.sig>

#4 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

Quoted 23 lines · Thierry Reding
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Mark Brown
Quoted 4 lines · Mark Brown

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

Quoted 5 lines
Quoted 3 lines

Argh, sorry - this causes problems further down the line with linking vdso.lds due to enums getting into the linker script and upsetting the linker (there are several compile errors today so it was masked).

You can move the include further down after the #ifndef __ASSEMBLY__

Indeed, here's what I've been using to successfully complete ARM64 test builds:

--- >8 ---

arch/arm64/include/asm/page.h +0 -0
index 9b2f5a9d019d..ae615b9d9a55 100644

arch/arm64/include/asm/page.h line 45

Quoted 7 lines
arch/arm64/include/asm/page.h +1 -0
@@ -39,6 +39,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/personality.h> /* for READ_IMPLIES_EXEC */
 #include <asm/pgtable-types.h>
 
 extern void __cpu_clear_user_page(void *p, unsigned long user);

I see this has ended up in linux-next, but I'm not sure whether or not it's actually queued someplace for 4.6. Any ideas?

If not, I can take it (or some derivative) through arm64 as a fix for -rc3.

Will

#5 lore raw

PATCH 1/1 arm64: asm: Explicitly include linux/personality.h in asm/page.h

Quoted 30 lines · On Tue, 2 Feb 2016 16:48:18 +0000 Will Deacon <[email protected]> wrote:
Quoted 29 lines · Thierry Reding
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Mark Brown
Quoted 4 lines · Mark Brown

asm/page.h uses READ_IMPLIES_EXEC from linux/personality.h but does not explicitly include it causing build failures in -next where whatever was causing it to be implicitly included has changed to remove that inclusion. Add an explicit inclusion to fix this.

Quoted 5 lines
Quoted 3 lines

Argh, sorry - this causes problems further down the line with linking vdso.lds due to enums getting into the linker script and upsetting the linker (there are several compile errors today so it was masked).

You can move the include further down after the #ifndef __ASSEMBLY__

Indeed, here's what I've been using to successfully complete ARM64 test builds:

--- >8 ---

arch/arm64/include/asm/page.h +1 -0
index 9b2f5a9d019d..ae615b9d9a55 100644
@@ -39,6 +39,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/personality.h> /* for READ_IMPLIES_EXEC */
 #include <asm/pgtable-types.h>
 
Quoted 7 lines

arch/arm64/include/asm/page.h line 45

Quoted 1 line
arch/arm64/include/asm/page.h +0 -0
 extern void __cpu_clear_user_page(void *p, unsigned long user);

I see this has ended up in linux-next, but I'm not sure whether or not it's actually queued someplace for 4.6. Any ideas?

If not, I can take it (or some derivative) through arm64 as a fix for -rc3.

It's not actually needed any more because Kirill has tweaked the patch which triggered this build error.

However I think the change still makes sense as a standalone thing - your call.

From: Andrew Morton <[email protected]>
Subject: arm: arch/arm/include/asm/page.h needs personality.h

VM_DATA_DEFAULT_FLAGS uses READ_IMPLIES_EXEC, so page.h should include personality.h to provide this.

This was needed for "mm: warn about VmData over RLIMIT_DATA".

Cc Russell King <[email protected]>
Cc Will Deacon <[email protected]>
Cc Konstantin Khlebnikov <[email protected]>

---

 arch/arm/include/asm/page.h |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/include/asm/page.h renamed from arch/arm/include/asm/page.h~arm-arch-arm-include-asm-pageh-needs-personalityh +2 -0
diff -puN arch/arm/include/asm/page.h~arm-arch-arm-include-asm-pageh-needs-personalityh arch/arm/include/asm/page.h
@@ -17,6 +17,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/personality.h>	/* For READ_IMPLIES_EXEC */
+
 #ifndef CONFIG_MMU
 
 #include <asm/page-nommu.h>

_