Patch "arm64: move TASK_* definitions to <asm/processor.h>" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
arm64: move TASK_* definitions to <asm/processor.h>
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-move-task_-definitions-to-asm-processor.h.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Feb 14 14:44:54 CET 2018
From: Yury Norov <[email protected]>
Date: Thu, 31 Aug 2017 11:30:50 +0300
Subject: arm64: move TASK_* definitions to <asm/processor.h>
From: Yury Norov <[email protected]>
Commit eef94a3d09aa upstream.
ILP32 series [1] introduces the dependency on <asm/is_compat.h> for TASK_SIZE macro. Which in turn requires <asm/thread_info.h>, and <asm/thread_info.h> include <asm/memory.h>, giving a circular dependency, because TASK_SIZE is currently located in <asm/memory.h>.
In other architectures, TASK_SIZE is defined in <asm/processor.h>, and moving TASK_SIZE there fixes the problem.
Discussion: https://patchwork.kernel.org/patch/9929107/
[1] https://github.com/norov/linux/tree/ilp32-next
--- arch/arm64/include/asm/memory.h | 15 --------------- arch/arm64/include/asm/processor.h | 21 +++++++++++++++++++++ arch/arm64/kernel/entry.S | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-)
arch/arm64/include/asm/memory.h +0 -15
@@ -61,8 +61,6 @@* KIMAGE_VADDR - the virtual address of the start of the kernel image * VA_BITS - the maximum number of bits for virtual addresses. * VA_START - the first kernel virtual address. -* TASK_SIZE - the maximum size of a user space task. -* TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. */ #define VA_BITS (CONFIG_ARM64_VA_BITS)#define VA_START (UL(0xffffffffffffffff) - \
@@ -77,19 +75,6 @@#define PCI_IO_END (VMEMMAP_START - SZ_2M)#define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE)#define FIXADDR_TOP (PCI_IO_START - SZ_2M) -#define TASK_SIZE_64 (UL(1) << VA_BITS) - -#ifdef CONFIG_COMPAT -#define TASK_SIZE_32 UL(0x100000000) -#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ - TASK_SIZE_32 : TASK_SIZE_64) -#define TASK_SIZE_OF (tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ - TASK_SIZE_32 : TASK_SIZE_64) -#else -#define TASK_SIZE TASK_SIZE_64 -#endif /* CONFIG_COMPAT */ - -#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 4))#define KERNEL_START _text#define KERNEL_END _end
arch/arm64/include/asm/processor.h +21 -0
@@ -19,6 +19,10 @@#ifndef __ASM_PROCESSOR_H#define __ASM_PROCESSOR_H +#define TASK_SIZE_64 (UL(1) << VA_BITS) + +#ifndef __ASSEMBLY__ +/* * Default implementation of macro that returns current * instruction pointer ("program counter").
@@ -37,6 +41,22 @@#include <asm/ptrace.h> #include <asm/types.h> +/* +* TASK_SIZE - the maximum size of a user space task. +* TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. +*/ +#ifdef CONFIG_COMPAT +#define TASK_SIZE_32 UL(0x100000000) +#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) +#define TASK_SIZE_OF (tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) +#else +#define TASK_SIZE TASK_SIZE_64 +#endif /* CONFIG_COMPAT */ + +#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 4)) +#define STACK_TOP_MAX TASK_SIZE_64#ifdef CONFIG_COMPAT #define AARCH32_VECTORS_BASE 0xffff0000
@@ -194,4 +214,5 @@ static inline void spin_lock_prefetch(coint cpu_enable_pan (void *__unused);int cpu_enable_cache_maint_trap (void *__unused); +#endif /* __ASSEMBLY__ */ #endif /* __ASM_PROCESSOR_H */
arch/arm64/kernel/entry.S +1 -1
@@ -28,7 +28,7 @@ #include <asm/errno.h> #include <asm/esr.h> #include <asm/irq.h> -#include <asm/memory.h> +#include <asm/processor.h> #include <asm/ptrace.h> #include <asm/thread_info.h> #include <asm/asm-uaccess.h>
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/arm64-move-task_-definitions-to-asm-processor.h.patch