linux-um archives
 help / color / mirror / Atom feed
* [PATCH v7 0/7] Increased address space for 64 bit
@ 2024-07-04 16:27 Benjamin Berg
  2024-07-04 16:27 ` [PATCH v7 1/7] um: Add generic stub_syscall1 function Benjamin Berg
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Benjamin Berg @ 2024-07-04 16:27 UTC (permalink / raw)
  To: linux-um; +Cc: Benjamin Berg

From: Benjamin Berg <benjamin.berg@intel.com>

The new version of the patchset uses execveat on a memfd instead of
cloning twice to disable rseq. This should be much more robust going
forward as it will also avoid issues with other new features like mseal.

This patchset fixes a few bugs, adds a new method of discovering the
host task size and finally adds four level page table support. All of
this means the userspace TASK_SIZE is much larger and in turns permits
userspace applications that need a lot of virtual addresses to work
fine.

One such application is ASAN which uses a fixed address in memory that
would otherwise not be addressable.

v7:
* Plenty of changes to fix 32 bit and improve the logic

v6:
* Apply fixes pointed out by Tiwei Bie
* Add temporary file fallback as memfd is not always supported

v5:
* Use execveat with memfd instead of double clone

v4:
* Do not use WNOHANG in wait for CLONE_VFORK

v3:
* Undo incorrect change in child wait loop

v2:
* Improved double clone logic using CLONE_VFORK
* Kconfig fixes pointed out by Tiwei Bie

Benjamin Berg (7):
  um: Add generic stub_syscall1 function
  um: use execveat to create userspace MMs
  um: Fix stub_start address calculation
  um: Limit TASK_SIZE to the addressable range
  um: Discover host_task_size from envp
  um: clear all memory in new userspace processes
  um: Add 4 level page table support

 arch/um/Kconfig                         |   1 +
 arch/um/include/asm/page.h              |  14 +-
 arch/um/include/asm/pgalloc.h           |  11 +-
 arch/um/include/asm/pgtable-4level.h    | 119 +++++++++++++++
 arch/um/include/asm/pgtable.h           |   6 +-
 arch/um/include/shared/as-layout.h      |   2 +-
 arch/um/include/shared/os.h             |   2 +-
 arch/um/include/shared/skas/stub-data.h |  11 ++
 arch/um/kernel/mem.c                    |  17 ++-
 arch/um/kernel/skas/.gitignore          |   2 +
 arch/um/kernel/skas/Makefile            |  33 ++++-
 arch/um/kernel/skas/mmu.c               |  25 +---
 arch/um/kernel/skas/stub_exe.c          |  86 +++++++++++
 arch/um/kernel/skas/stub_exe_embed.S    |  11 ++
 arch/um/kernel/um_arch.c                |  14 +-
 arch/um/os-Linux/main.c                 |   9 +-
 arch/um/os-Linux/mem.c                  |   2 +-
 arch/um/os-Linux/skas/process.c         | 183 ++++++++++++++++--------
 arch/x86/um/Kconfig                     |  38 +++--
 arch/x86/um/os-Linux/task_size.c        | 152 ++------------------
 arch/x86/um/shared/sysdep/stub_64.h     |  11 ++
 21 files changed, 501 insertions(+), 248 deletions(-)
 create mode 100644 arch/um/include/asm/pgtable-4level.h
 create mode 100644 arch/um/kernel/skas/.gitignore
 create mode 100644 arch/um/kernel/skas/stub_exe.c
 create mode 100644 arch/um/kernel/skas/stub_exe_embed.S

-- 
2.45.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-04 17:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 16:27 [PATCH v7 0/7] Increased address space for 64 bit Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 1/7] um: Add generic stub_syscall1 function Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 2/7] um: use execveat to create userspace MMs Benjamin Berg
2024-07-04 16:49   ` Johannes Berg
2024-07-04 17:39     ` Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 3/7] um: Fix stub_start address calculation Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 4/7] um: Limit TASK_SIZE to the addressable range Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 5/7] um: Discover host_task_size from envp Benjamin Berg
2024-07-04 16:27 ` [PATCH v7 6/7] um: clear all memory in new userspace processes Benjamin Berg
2024-07-04 16:50   ` Johannes Berg
2024-07-04 16:27 ` [PATCH v7 7/7] um: Add 4 level page table support Benjamin Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox