arm64: compat: Reduce address limit for 64K pages
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 29 Apr 2019 17:27:13 +0000 (18:27 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 30 Apr 2019 10:04:50 +0000 (11:04 +0100)
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).

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/processor.h

index 228af56..fcd0e69 100644 (file)
@@ -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.