* [PATCH v3 00/13] nommu UML
2024-11-11 6:27 [RFC PATCH v2 " Hajime Tazaki
@ 2024-12-03 4:22 ` Hajime Tazaki
2024-12-04 16:20 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Hajime Tazaki @ 2024-12-03 4:22 UTC (permalink / raw)
To: linux-um; +Cc: thehajime, ricarkol, Liam.Howlett
This is a series of patches of nommu arch addition to UML. It would
be nice to ask comments/opinions on this.
There are still several limitations/issues which we already found;
here is the list of those issues.
- there are no mechanism implemented to cache for mapped memory of
exec(2) thus, always read files from filesystem upon every exec,
which makes slow on some benchmark (lmbench).
- memory mapped by loadable modules are not distinguished from
userspace memory.
-- Hajime
v3:
- add seccomp-based syscall hook in addition to zpoline [06/13]
- remove RFC, add a line to MAINTAINERS file
- fix kernel test robot warnings [02/13,08/13,10/13]
- add base-commit tag to cover letter
- pull the latest uml/next
- clean up SIGSEGV handling [10/13]
- detect fsgsbase availability with elf aux vector [08/13]
- simplify vdso code with macros [09/13]
RFC v2:
- https://lore.kernel.org/linux-um/cover.1731290567.git.thehajime@gmail.com/
- base branch is now uml/linux.git instead of torvalds/linux.git.
- reorganize the patch series to clean up
- fixed various coding styles issues
- clean up exec code path [07/13]
- fixed the crash/SIGSEGV case on userspace programs [10/13]
- add seccomp filter to limit syscall caller address [06/13]
- detect fsgsbase availability with sigsetjmp/siglongjmp [08/13]
- removes unrelated changes
- removes unneeded ifndef CONFIG_MMU
- convert UML_CONFIG_MMU to CONFIG_MMU as using uml/linux.git
- proposed a patch of maple-tree issue (resolving a limitation in RFC v1)
https://lore.kernel.org/linux-mm/20241108222834.3625217-1-thehajime@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehajime@gmail.com/
Hajime Tazaki (13):
fs: binfmt_elf_efpic: add architecture hook elf_arch_finalize_exec
x86/um: nommu: elf loader for fdpic
um: nommu: memory handling
x86/um: nommu: syscall handling
x86/um: nommu: syscall translation by zpoline
um: nommu: syscalls handler from userspace by seccomp filter
x86/um: nommu: process/thread handling
um: nommu: configure fs register on host syscall invocation
x86/um/vdso: nommu: vdso memory update
x86/um: nommu: signal handling
um: change machine name for uname output
um: nommu: add documentation of nommu UML
um: nommu: plug nommu code into build system
Documentation/virt/uml/nommu-uml.rst | 230 +++++++++++++++++++++++
MAINTAINERS | 1 +
arch/um/Kconfig | 14 +-
arch/um/Makefile | 6 +
arch/um/configs/x86_64_nommu_defconfig | 64 +++++++
arch/um/include/asm/Kbuild | 1 +
arch/um/include/asm/futex.h | 4 +
arch/um/include/asm/mmu.h | 8 +
arch/um/include/asm/mmu_context.h | 13 +-
arch/um/include/asm/ptrace-generic.h | 6 +
arch/um/include/asm/tlbflush.h | 22 +++
arch/um/include/asm/uaccess.h | 7 +-
arch/um/include/shared/kern_util.h | 2 +
arch/um/include/shared/os.h | 15 ++
arch/um/kernel/Makefile | 3 +-
arch/um/kernel/mem.c | 12 +-
arch/um/kernel/physmem.c | 6 +
arch/um/kernel/process.c | 33 +++-
arch/um/kernel/skas/Makefile | 4 +-
arch/um/kernel/trap.c | 16 ++
arch/um/kernel/um_arch.c | 4 +
arch/um/os-Linux/main.c | 5 +
arch/um/os-Linux/process.c | 96 +++++++++-
arch/um/os-Linux/signal.c | 38 +++-
arch/um/os-Linux/skas/process.c | 4 +
arch/um/os-Linux/start_up.c | 20 ++
arch/um/os-Linux/util.c | 3 +-
arch/x86/um/Makefile | 18 ++
arch/x86/um/asm/elf.h | 11 +-
arch/x86/um/asm/module.h | 24 ---
arch/x86/um/asm/processor.h | 12 ++
arch/x86/um/do_syscall_64.c | 109 +++++++++++
arch/x86/um/entry_64.S | 108 +++++++++++
arch/x86/um/os-Linux/mcontext.c | 22 +++
arch/x86/um/shared/sysdep/mcontext.h | 4 +
arch/x86/um/shared/sysdep/syscalls_64.h | 6 +
arch/x86/um/signal.c | 37 +++-
arch/x86/um/syscalls_64.c | 69 +++++++
arch/x86/um/vdso/um_vdso.c | 41 ++--
arch/x86/um/vdso/vma.c | 14 ++
arch/x86/um/zpoline.c | 238 ++++++++++++++++++++++++
fs/Kconfig.binfmt | 2 +-
fs/binfmt_elf_fdpic.c | 10 +
include/linux/elf-fdpic.h | 3 +
44 files changed, 1307 insertions(+), 58 deletions(-)
create mode 100644 Documentation/virt/uml/nommu-uml.rst
create mode 100644 arch/um/configs/x86_64_nommu_defconfig
delete mode 100644 arch/x86/um/asm/module.h
create mode 100644 arch/x86/um/do_syscall_64.c
create mode 100644 arch/x86/um/entry_64.S
create mode 100644 arch/x86/um/zpoline.c
base-commit: bed2cc482600296fe04edbc38005ba2851449c10
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 00/13] nommu UML
2024-12-03 4:22 ` [PATCH v3 " Hajime Tazaki
@ 2024-12-04 16:20 ` Johannes Berg
2024-12-05 13:41 ` Hajime Tazaki
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2024-12-04 16:20 UTC (permalink / raw)
To: Hajime Tazaki, linux-um; +Cc: ricarkol, Liam.Howlett
On Tue, 2024-12-03 at 13:22 +0900, Hajime Tazaki wrote:
> This is a series of patches of nommu arch addition to UML.
Please next time you resend this, don't hide it in the old thread :)
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 00/13] nommu UML
2024-12-04 16:20 ` Johannes Berg
@ 2024-12-05 13:41 ` Hajime Tazaki
0 siblings, 0 replies; 5+ messages in thread
From: Hajime Tazaki @ 2024-12-05 13:41 UTC (permalink / raw)
To: johannes; +Cc: linux-um, ricarkol, Liam.Howlett
Thanks Johannes,
On Thu, 05 Dec 2024 01:20:04 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:22 +0900, Hajime Tazaki wrote:
> > This is a series of patches of nommu arch addition to UML.
>
> Please next time you resend this, don't hide it in the old thread :)
ah, my bad.
I thought adding in-reply-to is a must but the document says it should
not for multiple patches.
I will fix it.
-- Hajime
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 00/13] nommu UML
@ 2024-12-08 10:13 Hajime Tazaki
2024-12-08 10:15 ` Hajime Tazaki
0 siblings, 1 reply; 5+ messages in thread
From: Hajime Tazaki @ 2024-12-08 10:13 UTC (permalink / raw)
To: linux-um; +Cc: thehajime, ricarkol, Liam.Howlett
This is a series of patches of nommu arch addition to UML. It would
be nice to ask comments/opinions on this.
There are still several limitations/issues which we already found;
here is the list of those issues.
- memory mapped by loadable modules are not distinguished from
userspace memory.
-- Hajime
v4:
- add arch/um/nommu, arch/x86/um/nommu to contain !MMU specific codes
- remove zpoline patch
- drop binfmt_elf_fdpic patch
- reduce ifndef CONFIG_MMU if possible
- split to elf header cleanup patch [01/13]
- fix kernel test robot warnings [06/13]
- fix coding styles [07/13]
- move task_top_of_stack definition [05/13]
v3:
- https://lore.kernel.org/linux-um/cover.1733199769.git.thehajime@gmail.com/
- add seccomp-based syscall hook in addition to zpoline [06/13]
- remove RFC, add a line to MAINTAINERS file
- fix kernel test robot warnings [02/13,08/13,10/13]
- add base-commit tag to cover letter
- pull the latest uml/next
- clean up SIGSEGV handling [10/13]
- detect fsgsbase availability with elf aux vector [08/13]
- simplify vdso code with macros [09/13]
RFC v2:
- https://lore.kernel.org/linux-um/cover.1731290567.git.thehajime@gmail.com/
- base branch is now uml/linux.git instead of torvalds/linux.git.
- reorganize the patch series to clean up
- fixed various coding styles issues
- clean up exec code path [07/13]
- fixed the crash/SIGSEGV case on userspace programs [10/13]
- add seccomp filter to limit syscall caller address [06/13]
- detect fsgsbase availability with sigsetjmp/siglongjmp [08/13]
- removes unrelated changes
- removes unneeded ifndef CONFIG_MMU
- convert UML_CONFIG_MMU to CONFIG_MMU as using uml/linux.git
- proposed a patch of maple-tree issue (resolving a limitation in RFC v1)
https://lore.kernel.org/linux-mm/20241108222834.3625217-1-thehajime@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehajime@gmail.com/
Hajime Tazaki (13):
x86/um: clean up elf specific definitions
x86/um: nommu: elf loader for fdpic
um: decouple MMU specific code from the common part
um: nommu: memory handling
x86/um: nommu: syscall handling
um: nommu: seccomp syscalls hook
x86/um: nommu: process/thread handling
um: nommu: configure fs register on host syscall invocation
x86/um/vdso: nommu: vdso memory update
x86/um: nommu: signal handling
um: change machine name for uname output
um: nommu: add documentation of nommu UML
um: nommu: plug nommu code into build system
Documentation/virt/uml/nommu-uml.rst | 177 ++++++++++++++++++++++
MAINTAINERS | 1 +
arch/um/Kconfig | 14 +-
arch/um/Makefile | 10 ++
arch/um/configs/x86_64_nommu_defconfig | 64 ++++++++
arch/um/include/asm/Kbuild | 1 +
arch/um/include/asm/futex.h | 4 +
arch/um/include/asm/mmu.h | 8 +
arch/um/include/asm/mmu_context.h | 2 +
arch/um/include/asm/ptrace-generic.h | 6 +
arch/um/include/asm/uaccess.h | 7 +-
arch/um/include/shared/kern_util.h | 8 +
arch/um/include/shared/mem.h | 8 +
arch/um/include/shared/os.h | 16 ++
arch/um/kernel/Makefile | 5 +-
arch/um/kernel/mem-pgtable.c | 175 ++++++++++++++++++++++
arch/um/kernel/mem.c | 152 +------------------
arch/um/kernel/process.c | 25 ++++
arch/um/kernel/skas/process.c | 27 ----
arch/um/kernel/um_arch.c | 3 +
arch/um/nommu/Makefile | 3 +
arch/um/nommu/os-Linux/Makefile | 7 +
arch/um/nommu/os-Linux/signal.c | 15 ++
arch/um/nommu/trap.c | 188 ++++++++++++++++++++++++
arch/um/os-Linux/Makefile | 8 +-
arch/um/os-Linux/internal.h | 5 +
arch/um/os-Linux/mem.c | 4 +
arch/um/os-Linux/process.c | 149 ++++++++++++++++++-
arch/um/os-Linux/seccomp.c | 87 +++++++++++
arch/um/os-Linux/signal.c | 12 ++
arch/um/os-Linux/skas/process.c | 132 -----------------
arch/um/os-Linux/start_up.c | 20 +++
arch/um/os-Linux/util.c | 3 +-
arch/x86/um/Makefile | 7 +-
arch/x86/um/asm/elf.h | 8 +-
arch/x86/um/asm/module.h | 24 ---
arch/x86/um/nommu/Makefile | 8 +
arch/x86/um/nommu/do_syscall_64.c | 100 +++++++++++++
arch/x86/um/nommu/entry_64.S | 111 ++++++++++++++
arch/x86/um/nommu/os-Linux/Makefile | 6 +
arch/x86/um/nommu/os-Linux/mcontext.c | 26 ++++
arch/x86/um/nommu/process.c | 35 +++++
arch/x86/um/nommu/signal.c | 43 ++++++
arch/x86/um/nommu/syscalls.h | 16 ++
arch/x86/um/nommu/syscalls_64.c | 115 +++++++++++++++
arch/x86/um/shared/sysdep/mcontext.h | 4 +
arch/x86/um/shared/sysdep/signal.h | 22 +++
arch/x86/um/shared/sysdep/syscalls_64.h | 7 +
arch/x86/um/signal.c | 17 ++-
arch/x86/um/vdso/vma.c | 17 ++-
fs/Kconfig.binfmt | 2 +-
51 files changed, 1564 insertions(+), 350 deletions(-)
create mode 100644 Documentation/virt/uml/nommu-uml.rst
create mode 100644 arch/um/configs/x86_64_nommu_defconfig
create mode 100644 arch/um/kernel/mem-pgtable.c
create mode 100644 arch/um/nommu/Makefile
create mode 100644 arch/um/nommu/os-Linux/Makefile
create mode 100644 arch/um/nommu/os-Linux/signal.c
create mode 100644 arch/um/nommu/trap.c
create mode 100644 arch/um/os-Linux/seccomp.c
delete mode 100644 arch/x86/um/asm/module.h
create mode 100644 arch/x86/um/nommu/Makefile
create mode 100644 arch/x86/um/nommu/do_syscall_64.c
create mode 100644 arch/x86/um/nommu/entry_64.S
create mode 100644 arch/x86/um/nommu/os-Linux/Makefile
create mode 100644 arch/x86/um/nommu/os-Linux/mcontext.c
create mode 100644 arch/x86/um/nommu/process.c
create mode 100644 arch/x86/um/nommu/signal.c
create mode 100644 arch/x86/um/nommu/syscalls.h
create mode 100644 arch/x86/um/nommu/syscalls_64.c
create mode 100644 arch/x86/um/shared/sysdep/signal.h
base-commit: bed2cc482600296fe04edbc38005ba2851449c10
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 00/13] nommu UML
2024-12-08 10:13 [PATCH v3 00/13] nommu UML Hajime Tazaki
@ 2024-12-08 10:15 ` Hajime Tazaki
0 siblings, 0 replies; 5+ messages in thread
From: Hajime Tazaki @ 2024-12-08 10:15 UTC (permalink / raw)
To: linux-um; +Cc: ricarkol, Liam.Howlett
On Sun, 08 Dec 2024 19:13:11 +0900,
Hajime Tazaki wrote:
>
> This is a series of patches of nommu arch addition to UML. It would
> be nice to ask comments/opinions on this.
sorry for the noise. this is my mistake for resending patch. please
ignore this.
-- Hajime
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-08 10:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-08 10:13 [PATCH v3 00/13] nommu UML Hajime Tazaki
2024-12-08 10:15 ` Hajime Tazaki
-- strict thread matches above, loose matches on Subject: below --
2024-11-11 6:27 [RFC PATCH v2 " Hajime Tazaki
2024-12-03 4:22 ` [PATCH v3 " Hajime Tazaki
2024-12-04 16:20 ` Johannes Berg
2024-12-05 13:41 ` Hajime Tazaki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.