RFC x86: keep TASK_SIZE in sync with mm->task_size
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm: remove unused TASK_SIZE_OF()arch/ arch/ arch/ +5 more | +3 | 5 replies | |
| 2/4 | x86/thread_info: kill TIF_ADDR32 in favour of ADDR_LIMIT_32BITarch/ arch/ arch/ +2 more | +11 | 1 reply | |
| 3/4 | x86/mm: define TASK_SIZE as current->mm->task_sizearch/ arch/ arch/ +1 more | +23 | 0 replies | |
| 4/4 | x86/arch_prctl: add ARCH_{GET,SET}_TASK_SIZEarch/ arch/ | +16 | 2 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Andy Lutomirski | Heiko Carstens | Kirill A. Shutemov |
|---|---|---|---|
| 1/4 | R-b | A-b | A-b |
| 2/4 | |||
| 3/4 | |||
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [RFC 0/4] x86: keep TASK_SIZE in sync with mm->task_size
At this moment, we have following task_size-related things:
- TASK_SIZE_OF() macro, which is unused;
- current->mm->task_size which is used in half and TASK_SIZE() macro which is used in the other half of code
- TIF_ADDR32, which is used to detect 32-bit address space and is x86-specific, where some other arches misused TIF_32BIT
- personality ADDR_LIMIT_32BIT, which is used on arm/alpha
- ADDR_LIMIT_3GB, which is x86-specific and can be used to change running task's TASK_SIZE 3GB <-> 4GB
This patches set removes unused definition of TASK_SIZE_OF (1), defines TASK_SIZE macro as current->mm->task_size (3). I would suggest define TASK_SIZE this way in generic version, but currently I test it only on x86.
It also frees thread info flag (2) and adds arch_prctl() on x86_64 to get/set current virtual address space size - as it's needed by now only for CRIU, hide it under CHECKPOINT_RESTORE config.
Hope those patches will help to clean task_size-related code at least a bit (and helps me to restore vaddr limits).
Dmitry Safonov (4):
mm: remove unused TASK_SIZE_OF()
x86/thread_info: kill TIF_ADDR32 in favour of ADDR_LIMIT_32BIT x86/mm: define TASK_SIZE as current->mm->task_size x86/arch_prctl: add ARCH_{GET,SET}_TASK_SIZE
arch/arm64/include/asm/memory.h | 2 -- arch/mips/include/asm/processor.h | 3 --- arch/parisc/include/asm/processor.h | 3 +-- arch/powerpc/include/asm/processor.h | 3 +-- arch/s390/include/asm/processor.h | 3 +-- arch/sparc/include/asm/processor_64.h | 3 --- arch/x86/include/asm/elf.h | 7 +++++-- arch/x86/include/asm/processor.h | 19 +++++++++---------- arch/x86/include/asm/thread_info.h | 4 +--- arch/x86/include/uapi/asm/prctl.h | 3 +++ arch/x86/kernel/process_64.c | 17 +++++++++++++++-- arch/x86/kernel/sys_x86_64.c | 4 ++-- arch/x86/um/asm/segment.h | 2 +- arch/x86/xen/mmu.c | 4 ++-- fs/exec.c | 17 +++++++++++------ include/linux/sched.h | 4 ---- 16 files changed, 52 insertions(+), 46 deletions(-)
Signature · 1 line
2.11.0