|
Message-Id: <1499898783-25732-4-git-send-email-mark.rutland@arm.com> Date: Wed, 12 Jul 2017 23:33:00 +0100 From: Mark Rutland <mark.rutland@....com> To: ard.biesheuvel@...aro.org, kernel-hardening@...ts.openwall.com, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org Cc: akashi.takahiro@...aro.org, catalin.marinas@....com, dave.martin@....com, james.morse@....com, labbott@...oraproject.org, will.deacon@....com, keescook@...omium.org, Mark Rutland <mark.rutland@....com> Subject: [RFC PATCH 3/6] arm64: pad stacks to PAGE_SIZE for VMAP_STACK Our THREAD_SIZE may be smaller than PAGE_SIZE. With VMAP_STACK, we can't allow stacks to share a page with anything else, so may as well pad up-to PAGE_SIZE, and have 64K stacks when we have 64K pages. Signed-off-by: Mark Rutland <mark.rutland@....com> --- arch/arm64/include/asm/thread_info.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 6d0c59a..3684f86 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -25,7 +25,13 @@ #include <asm/page.h> -#define THREAD_SHIFT 14 +#define __THREAD_SHIFT 14 + +#if defined(CONFIG_VMAP_STACK) && (__THREAD_SHIFT < PAGE_SHIFT) +#define THREAD_SHIFT PAGE_SHIFT +#else +#define THREAD_SHIFT __THREAD_SHIFT +#endif #if THREAD_SHIFT >= PAGE_SHIFT #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) -- 1.9.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.