diff mbox series

arm64: compat: Reduce address limit for 64K pages

Message ID 20190429172713.11965-1-vincenzo.frascino@arm.com (mailing list archive)
State Mainlined, archived
Commit 359db57c34af15edf35492944af4d4417f59886c
Headers show
Series arm64: compat: Reduce address limit for 64K pages | expand

Commit Message

Vincenzo Frascino April 29, 2019, 5:27 p.m. UTC
With the introduction of the config option that allows to enable kuser
helpers, it is now possible to reduce TASK_SIZE_32 when these are
disabled and 64K pages are enabled. This extends the compliance with
the section 6.5.8 of the C standard (C99).

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
Depends on:
 - arm64: compat: Reduce address limit
 - arm64: compat: Add kuser helpers config option

 arch/arm64/include/asm/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Catalin Marinas April 30, 2019, 9:42 a.m. UTC | #1
On Mon, Apr 29, 2019 at 06:27:13PM +0100, Vincenzo Frascino wrote:
> With the introduction of the config option that allows to enable kuser
> helpers, it is now possible to reduce TASK_SIZE_32 when these are
> disabled and 64K pages are enabled. This extends the compliance with
> the section 6.5.8 of the C standard (C99).
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Reported-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index 228af56ece48..fcd0e691b1ea 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -57,7 +57,7 @@ 
 #define TASK_SIZE_64		(UL(1) << vabits_user)
 
 #ifdef CONFIG_COMPAT
-#ifdef CONFIG_ARM64_64K_PAGES
+#if defined(CONFIG_ARM64_64K_PAGES) && defined(CONFIG_KUSER_HELPERS)
 /*
  * With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied
  * by the compat vectors page.