Hello Lorenzo,
On Fri, 25 Apr 2025 22:49:31 +0900,
Lorenzo Stoakes wrote:
> It seemed this series died, which is a pity, i'd be very useful to have
> this functionality to aid in easily testing nommu in mm code.
>
> I know that I pushed back a little (or rather - wondering about the status
> o
Hello,
thanks for the update; was waiting for this.
On Tue, 25 Feb 2025 03:18:25 +0900,
Benjamin Berg wrote:
>
> This adds the kernel side of the seccomp based process handling.
>
> Co-authored-by: Johannes Berg
> Signed-off-by: Benjamin Berg
> Signed-off-by: Benjamin Berg
(snip)
> diff --
Hello Richard, Anton,
Cc: Johannes,
On Mon, 20 Jan 2025 15:00:02 +0900,
Hajime Tazaki wrote:
>
> This patchset is another spin of nommu mode addition to UML. It doesn't
> change a lot since the last version (v5), but contain clean ups. It would
> be nice to hear about your
Add nommu kernel for um build. defconfig is also provided.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Kconfig| 14 +-
arch/um/configs/x86_64_nommu_defconfig | 64 ++
2 files changed, 76 insertions(+), 2 deletions
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 6 +++
arch/um/os-Linux/process.c| 6 +++
arch/um/os-Linux/start_up.c | 20 +
arch/x86/um/nommu/do_syscall_64.c | 37
arch/x86/um/nommu/syscalls_64.c | 71
This splits the memory, process related code with common and MMU
specific parts in order to avoid ifdefs in .c file and duplication
between MMU and !MMU.
Signed-off-by: Hajime Tazaki
---
arch/um/kernel/Makefile | 5 +-
arch/um/kernel/mem-pgtable.c| 55 +
arch/um
red in non-ptrace syscall entry/leave so, we also
need to handle pending signal by ourselves.
ptrace related syscalls are not tested yet so, marked
arch_has_single_step() unsupported in !MMU environment.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/ptrace-gene
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan Kara
Cc: linux...@kvack.org
Cc: linux-fsde...@vger.kernel.org
Acked-by: Kees Cook
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/mmu.h| 5 +
arch/um/include/asm/ptrace-generic.h | 6
cture.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/x86/um/Makefile| 4 ++
arch/x86/um/nommu/Makefile | 8 +++
arch/x86/um/nommu/do_syscall_64.c | 37 ++
arch/x86/um/nommu/entry_64.S| 91 +
arc
the address space in !CONFIG_MMU mode.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Makefile | 4
arch/um/include/asm/futex.h | 4
arch/um/include/asm/mmu.h | 3 +++
arch/um/include/asm/mmu_context.h | 2 ++
arch/um/include/asm
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 177 +++
MAINTAINERS | 1 +
2 files changed, 178 insertions(+)
create mode 100644 Documentation/virt/uml
the register.
It also adds the follow up routine for SIGSEGV as a signal delivery runs
in the same stack frame while we have to avoid endless SIGSEGV.
Signed-off-by: Hajime Tazaki
---
arch/um/include/shared/kern_util.h| 4 +
arch/um/nommu/Makefile| 2 +-
arch/um/nommu/os
The file arch/x86/um/asm/module.h is equivalent to the definition of
asm-generic. Thus this commit cleans up to use it.
Signed-off-by: Hajime Tazaki
---
arch/um/include/asm/Kbuild | 1 +
arch/x86/um/asm/module.h | 24
2 files changed, 1 insertion(+), 24 deletions
On !MMU mode, the address of vdso is accessible from userspace. This
commit implements the entry point by pointing a block of page address.
This commit also add memory permission configuration of vdso page to be
executable.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch
This commit tries to display MMU/!MMU mode from the output of uname(2)
so that users can distinguish which mode of UML is running right now.
Signed-off-by: Hajime Tazaki
---
arch/um/Makefile| 6 ++
arch/um/os-Linux/util.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion
hehaj...@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 han
high_physmem, which locates userspace memory.
Signed-off-by: Hajime Tazaki
Signed-off-by: Kenichi Yasukata
---
arch/um/include/shared/kern_util.h| 8 +++
arch/um/include/shared/os.h | 10 +++
arch/um/kernel/um_arch.c | 3 +
arch/um/nommu/Makefile| 3
Hello,
On Wed, 15 Jan 2025 18:30:41 +0900,
Benjamin Berg wrote:
> > > Maybe I am missing it, but I do not yet see proper FP register
> > > handling. This will be needed for task/thread switches and also signal
> > > emission/sigreturn. I am attaching the test program that I used to
> > > verify
Hello,
On Wed, 15 Jan 2025 03:53:36 +0900,
Benjamin Berg wrote:
>
> On Tue, 2025-01-14 at 20:30 +0900, Hajime Tazaki wrote:
> > This patchset is another spin of nommu mode addition to UML. It doesn't
> > change a lot since the last version (v5), but contain clean ups.
red in non-ptrace syscall entry/leave so, we also
need to handle pending signal by ourselves.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/os-Linux/process.c | 6 +
arch/x86/um/Makefile| 3 ++-
arch/x86/um/nommu/Makefile | 2 +-
arch/x86/um/nommu/
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 177 +++
MAINTAINERS | 1 +
2 files changed, 178 insertions(+)
create mode 100644 Documentation/virt/uml
the address space in !CONFIG_MMU mode.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Makefile | 4
arch/um/include/asm/futex.h | 4
arch/um/include/asm/mmu.h | 3 +++
arch/um/include/asm/mmu_context.h | 2 ++
arch/um/include/asm
Add nommu kernel for um build. defconfig is also provided.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Kconfig| 14 +-
arch/um/configs/x86_64_nommu_defconfig | 64 ++
2 files changed, 76 insertions(+), 2 deletions
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 6 +++
arch/um/os-Linux/process.c| 6 +++
arch/um/os-Linux/start_up.c | 20 +
arch/x86/um/nommu/do_syscall_64.c | 37
arch/x86/um/nommu/syscalls_64.c | 71
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan Kara
Cc: linux...@kvack.org
Cc: linux-fsde...@vger.kernel.org
Acked-by: Kees Cook
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/mmu.h| 5 +
arch/um/include/asm/ptrace-generic.h | 6
On !MMU mode, the address of vdso is accessible from userspace. This
commit implements the entry point by pointing a block of page address.
This commit also add memory permission configuration of vdso page to be
executable.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch
high_physmem, which locates userspace memory.
Signed-off-by: Hajime Tazaki
Signed-off-by: Kenichi Yasukata
---
arch/um/include/shared/kern_util.h| 8 +++
arch/um/include/shared/os.h | 10 +++
arch/um/kernel/um_arch.c | 3 +
arch/um/nommu/Makefile| 3
This commit tries to display MMU/!MMU mode from the output of uname(2)
so that users can distinguish which mode of UML is running right now.
Signed-off-by: Hajime Tazaki
---
arch/um/Makefile| 6 ++
arch/um/os-Linux/util.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion
nvert 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-thehaj...@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehaj...@gmail.com/
H
.
Signed-off-by: Hajime Tazaki
---
arch/um/include/shared/kern_util.h| 4 +
arch/um/nommu/Makefile| 2 +-
arch/um/nommu/os-Linux/signal.c | 13 ++
arch/um/nommu/trap.c | 188 ++
arch/um/os-Linux/signal.c | 25
The file arch/x86/um/asm/module.h is equivalent to the definition of
asm-generic. Thus this commit cleans up to use it.
Signed-off-by: Hajime Tazaki
---
arch/um/include/asm/Kbuild | 1 +
arch/x86/um/asm/module.h | 24
2 files changed, 1 insertion(+), 24 deletions
cture.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/x86/um/Makefile| 4 ++
arch/x86/um/nommu/Makefile | 8 +++
arch/x86/um/nommu/do_syscall_64.c | 37 ++
arch/x86/um/nommu/entry_64.S| 91 +
arc
This splits the memory, process related code with common and MMU
specific parts in order to avoid ifdefs in .c file and duplication
between MMU and !MMU.
Signed-off-by: Hajime Tazaki
---
arch/um/kernel/Makefile | 5 +-
arch/um/kernel/mem-pgtable.c| 55 +
arch/um
On Sat, 14 Dec 2024 06:53:44 +0900,
Eric W. Biederman wrote:
> > config BINFMT_ELF
> > bool "Kernel support for ELF binaries"
> > - depends on MMU
> > select ELFCORE
> > default y
> > help
> > @@ -58,7 +57,7 @@ config ARCH_USE_GNU_PROPERTY
> > config BINFM
On Sat, 14 Dec 2024 05:01:58 +0900,
Eric W. Biederman wrote:
> >> Last time I looked the regular binfmt_elf works just fine
> >> without an mmu. I looked again and at a quick skim the
> >> regular elf loader still looks like it will work without
> >> an MMU.
> >
> > I'm wondering how you looked
Hello Eric,
thanks for the feedback.
On Thu, 12 Dec 2024 23:22:47 +0900,
Eric W. Biederman wrote:
>
> Hajime Tazaki writes:
>
> > As UML supports CONFIG_MMU=n case, it has to use an alternate ELF
> > loader, FDPIC ELF loader. In this commit, we added necessary
> &
the address space in !CONFIG_MMU mode.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Makefile | 4
arch/um/include/asm/futex.h | 4
arch/um/include/asm/mmu.h | 3 +++
arch/um/include/asm/mmu_context.h | 2 ++
arch/um/include/asm
This splits the memory, process related code with common and MMU
specific parts in order to avoid ifdefs in .c file and duplication
between MMU and !MMU.
Signed-off-by: Hajime Tazaki
---
arch/um/include/shared/mem.h| 8 ++
arch/um/kernel/Makefile | 5 +-
arch/um/kernel/mem
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 6 +++
arch/um/os-Linux/process.c| 6 +++
arch/um/os-Linux/start_up.c | 20 +
arch/x86/um/nommu/do_syscall_64.c | 37
arch/x86/um/nommu/syscalls_64.c | 71
The file arch/x86/um/asm/module.h is equivalent to the definition of
asm-generic. Thus this commit cleans up to use it.
Signed-off-by: Hajime Tazaki
---
arch/um/include/asm/Kbuild | 1 +
arch/x86/um/asm/module.h | 24
2 files changed, 1 insertion(+), 24 deletions
.
Signed-off-by: Hajime Tazaki
---
arch/um/nommu/Makefile| 2 +-
arch/um/nommu/trap.c | 188 ++
arch/um/os-Linux/signal.c | 6 +
arch/x86/um/nommu/os-Linux/mcontext.c | 11 ++
arch/x86/um/shared/sysdep/mcontext.h | 1
cture.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/x86/um/Makefile| 4 ++
arch/x86/um/nommu/Makefile | 8 +++
arch/x86/um/nommu/do_syscall_64.c | 37 ++
arch/x86/um/nommu/entry_64.S| 91 +
arc
This commit tries to display MMU/!MMU mode from the output of uname(2)
so that users can distinguish which mode of UML is running right now.
Signed-off-by: Hajime Tazaki
---
arch/um/Makefile| 6 ++
arch/um/os-Linux/util.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion
high_physmem, which locates userspace memory.
Signed-off-by: Hajime Tazaki
Signed-off-by: Kenichi Yasukata
---
arch/um/include/shared/kern_util.h| 8 +++
arch/um/include/shared/os.h | 10 +++
arch/um/kernel/um_arch.c | 3 +
arch/um/nommu/Makefile| 3
red in non-ptrace syscall entry/leave so, we also
need to handle pending signal by ourselves.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/os-Linux/process.c | 6 +
arch/x86/um/Makefile| 3 ++-
arch/x86/um/nommu/Makefile | 2 +-
arch/x86/um/nommu/
- proposed a patch of maple-tree issue (resolving a limitation in RFC v1)
https://lore.kernel.org/linux-mm/20241108222834.3625217-1-thehaj...@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehaj...@gmail.com/
Hajime Tazaki (13):
x86/um: clean up elf specific definitions
x86
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 177 +++
MAINTAINERS | 1 +
2 files changed, 178 insertions(+)
create mode 100644 Documentation/virt/uml
Add nommu kernel for um build. defconfig is also provided.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Kconfig| 14 +-
arch/um/configs/x86_64_nommu_defconfig | 64 ++
2 files changed, 76 insertions(+), 2 deletions
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan Kara
Cc: linux...@kvack.org
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/mmu.h| 5 +
arch/um/include/asm/ptrace-generic.h | 6 ++
arch/x86/um/asm/elf.h
On !MMU mode, the address of vdso is accessible from userspace. This
commit implements the entry point by pointing a block of page address.
This commit also add memory permission configuration of vdso page to be
executable.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch
On Sun, 08 Dec 2024 19:15:37 +0900,
Hajime Tazaki wrote:
>
> This commit updates the behavior of signal handling under !MMU
> environment. 1) the stack preparation for the signal handlers and
> 2) restoration of stack after rt_sigreturn(2) syscall. Those are needed
> as the
The file arch/x86/um/asm/module.h is equivalent to the definition of
asm-generic. Thus this commit cleans up to use it.
Signed-off-by: Hajime Tazaki
---
arch/um/include/asm/Kbuild | 1 +
arch/x86/um/asm/module.h | 24
2 files changed, 1 insertion(+), 24 deletions
SIGSEGV as a signal delivery runs
in the same stack frame while we have to avoid endless SIGSEGV.
Signed-off-by: Hajime Tazaki
---
arch/um/nommu/Makefile| 2 +-
arch/um/nommu/trap.c | 188 ++
arch/um/os-Linux/signal.c | 6
This commit tries to display MMU/!MMU mode from the output of uname(2)
so that users can distinguish which mode of UML is running right now.
Signed-off-by: Hajime Tazaki
---
arch/um/Makefile| 6 ++
arch/um/os-Linux/util.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion
Add nommu kernel for um build. defconfig is also provided.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Kconfig| 14 +-
arch/um/configs/x86_64_nommu_defconfig | 64 ++
2 files changed, 76 insertions(+), 2 deletions
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 177 +++
MAINTAINERS | 1 +
2 files changed, 178 insertions(+)
create mode 100644 Documentation/virt/uml
cture.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/x86/um/Makefile| 4 ++
arch/x86/um/nommu/Makefile | 8 +++
arch/x86/um/nommu/do_syscall_64.c | 37 +++
arch/x86/um/nommu/entry_64.S| 87 +
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 6 +++
arch/um/os-Linux/process.c| 6 +++
arch/um/os-Linux/start_up.c | 20 +
arch/x86/um/nommu/do_syscall_64.c | 37
arch/x86/um/nommu/syscalls_64.c | 71
On !MMU mode, the address of vdso is accessible from userspace. This
commit implements the entry point by pointing a block of page address.
This commit also add memory permission configuration of vdso page to be
executable.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch
me of registers (fs segment register for TLS, etc) on every
context switch, etc.
Signals aren't delivered in non-ptrace syscall entry/leave so, we also
need to handle pending signal by ourselves.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/os-Linux/process.c
high_physmem, which locates userspace memory.
Signed-off-by: Hajime Tazaki
Signed-off-by: Kenichi Yasukata
---
arch/um/include/shared/kern_util.h| 8 +++
arch/um/include/shared/os.h | 10 +++
arch/um/kernel/um_arch.c | 3 +
arch/um/nommu/Makefile| 3
the address space in !CONFIG_MMU mode.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Makefile | 4
arch/um/include/asm/futex.h | 4
arch/um/include/asm/mmu.h | 3 +++
arch/um/include/asm/mmu_context.h | 2 ++
arch/um/include/asm
This splits the memory, process related code with common and MMU
specific parts in order to avoid ifdefs in .c file and duplication
between MMU and !MMU.
Signed-off-by: Hajime Tazaki
---
arch/um/include/shared/mem.h| 8 ++
arch/um/kernel/Makefile | 5 +-
arch/um/kernel/mem
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan Kara
Cc: linux...@kvack.org
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/mmu.h| 5 +
arch/um/include/asm/ptrace-generic.h | 6 ++
arch/x86/um/asm/elf.h
...@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehaj...@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
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
...@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehaj...@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
On Thu, 05 Dec 2024 22:54:21 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-12-05 at 22:51 +0900, Hajime Tazaki wrote:
> > >
> > > I don't understand why this behaves differently with and without
> > > zpoline, it seems it shouldn't need to. Anywa
On Thu, 05 Dec 2024 22:58:52 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-12-05 at 22:56 +0900, Hajime Tazaki wrote:
> >
> > > > +++ b/arch/x86/um/asm/processor.h
> > > > @@ -38,6 +38,18 @@ static __always_inline void cpu_relax(void)
> > &
On Thu, 05 Dec 2024 04:31:11 +0900,
Geert Uytterhoeven wrote:
>
> On Wed, Dec 4, 2024 at 5:53 PM Johannes Berg
> wrote:
> > On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> > >
> > > +static int os_x86_arch_prctl(int pid, int option, unsigned lo
On Thu, 05 Dec 2024 01:50:07 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> >
> > +++ b/arch/um/kernel/process.c
> > @@ -117,13 +117,17 @@ void new_thread_handler(void)
> > * callback returns only if the
On Thu, 05 Dec 2024 01:42:11 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> >
> > +#ifndef CONFIG_MMU
> > +extern int um_zpoline_enabled;
> > +#endif
>
> That doesn't make sense, there's no good rea
On Thu, 05 Dec 2024 01:20:51 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> >
> > arch/um/include/asm/Kbuild | 1 +
> >
> > arch/x86/um/asm/module.h | 24
> >
&g
On Thu, 05 Dec 2024 01:37:42 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> > This commit adds a mechanism to hook syscalls for unmodified userspace
> > programs used under UML in !MMU mode. The mechanism, called zpoline,
> >
On Thu, 05 Dec 2024 01:34:49 +0900,
Johannes Berg wrote:
>
> On Tue, 2024-12-03 at 13:23 +0900, Hajime Tazaki wrote:
> >
> > +++ b/arch/um/include/asm/futex.h
> > @@ -8,7 +8,11 @@
> >
> >
> > int arch_futex_atomic_op_inuser(int op, u3
On Thu, 05 Dec 2024 01:37:14 +0900,
Johannes Berg wrote:
> > arch/x86/um/do_syscall_64.c | 37 +++
> > arch/x86/um/entry_64.S | 87 +
> >
>
> As I said before, I think it needs to be something obviously nommu.
> Maybe in a new direct
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 :)
Add nommu kernel for um build. defconfig is also provided.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/Kconfig| 14 +-
arch/um/configs/x86_64_nommu_defconfig | 64 ++
arch/x86/um/Makefile | 18
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 230 +++
MAINTAINERS | 1 +
2 files changed, 231 insertions(+)
create mode 100644 Documentation/virt/uml
This commit tries to display MMU/!MMU mode from the output of uname(2)
so that users can distinguish which mode of UML is running right now.
Signed-off-by: Hajime Tazaki
---
arch/um/Makefile| 6 ++
arch/um/os-Linux/util.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion
SIGSEGV as a signal delivery runs
in the same stack frame while we have to avoid endless SIGSEGV.
Signed-off-by: Hajime Tazaki
---
arch/um/os-Linux/signal.c | 16 +++-
arch/x86/um/signal.c | 37 -
2 files changed, 51 insertions(+), 2 deletions
On !MMU mode, the address of vdso is accessible from userspace. This
commit implements the entry point by pointing a block of page address.
This commit also add memory permission configuration of vdso page to be
executable.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 3 ++
arch/um/os-Linux/main.c | 5
arch/um/os-Linux/process.c | 8 ++
arch/um/os-Linux/start_up.c | 20 +
arch/x86/um/do_syscall_64.c | 36 +++
arch/x86/um
2) JIT-generated code.
The SIGSYS signal is raised upon the execution from uml_reserved and
high_physmem, which locates userspace memory.
Signed-off-by: Hajime Tazaki
Signed-off-by: Kenichi Yasukata
---
arch/um/include/shared/kern_util.h | 2 +
arch/um/include/shared/os.h | 6
me of registers (fs segment register for TLS, etc) on every
context switch, etc.
Signals aren't delivered in non-ptrace syscall entry/leave so, we also
need to handle pending signal by ourselves.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/kernel/process.c
) used by
MMU-full UML.
Signed-off-by: Hajime Tazaki
---
arch/x86/um/asm/elf.h | 3 +
arch/x86/um/zpoline.c | 223 ++
2 files changed, 226 insertions(+)
create mode 100644 arch/x86/um/zpoline.c
diff --git a/arch/x86/um/asm/elf.h b/arch/x86/um/asm/elf.h
cture.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/x86/um/do_syscall_64.c | 37 +++
arch/x86/um/entry_64.S | 87 +
arch/x86/um/shared/sysdep/syscalls_64.h | 6 ++
3 files changed, 130 insertions(+)
create mode 1
the address space in !CONFIG_MMU mode.
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/futex.h | 4
arch/um/include/asm/mmu.h | 3 +++
arch/um/include/asm/mmu_context.h | 13 +++--
arch/um/include/asm/tlbflush.h| 22
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan Kara
Cc: linux...@kvack.org
Cc: linux-fsde...@vger.kernel.org
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/asm/Kbuild | 1 +
arch/um/include/asm/mmu.h| 5 +
arch/um/include/asm
Kara
Cc: Eric Biederman
Cc: Kees Cook
Cc: linux-fsde...@vger.kernel.org
Cc: linux...@kvack.org
Signed-off-by: Hajime Tazaki
---
fs/binfmt_elf_fdpic.c | 10 ++
include/linux/elf-fdpic.h | 3 +++
2 files changed, 13 insertions(+)
diff --git a/fs/binfmt_elf_fdpic.c b/fs
limitation in RFC v1)
https://lore.kernel.org/linux-mm/20241108222834.3625217-1-thehaj...@gmail.com/
RFC:
- https://lore.kernel.org/linux-um/cover.1729770373.git.thehaj...@gmail.com/
Hajime Tazaki (13):
fs: binfmt_elf_efpic: add architecture hook elf_arch_finalize_exec
x86/um: nommu: elf loader for
Hello,
On Thu, 28 Nov 2024 19:37:21 +0900,
Benjamin Berg wrote:
> > +#ifndef CONFIG_MMU
> > + memset(&r, 0, sizeof(r));
> > + /* mark is_user=1 when the IP is from userspace code. */
> > + if (mc && (REGS_IP(mc->gregs) > uml_reserved
> > + && REGS_IP(mc->gregs) < high_physmem))
> > + r.is_us
Thanks Benjamin,
On Wed, 27 Nov 2024 19:36:44 +0900,
Benjamin Berg wrote:
> > @@ -51,9 +65,15 @@ __kernel_old_time_t
> > __vdso_time(__kernel_old_time_t *t)
> > {
> > long secs;
> >
> > +#ifdef CONFIG_MMU
> > asm volatile("syscall"
> > : "=a" (secs)
> > : "0"
On Wed, 27 Nov 2024 19:00:11 +0900,
Benjamin Berg wrote:
> > +
> > + os_info("Checking FSGSBASE instructions...");
> > + if (sigsetjmp(jmpbuf, 0) == 0) {
> > + asm volatile("rdfsbase %0" : "=r" (fsbase) :: "memory");
> > + host_has_fsgsbase = 1;
> > + os_info("O
Hello David,
On Sat, 23 Nov 2024 16:27:27 +0900,
David Gow wrote:
> I had a chance to give this a proper try with KUnit, and think it'd be
> a great options to have available: it's certainly nice to have a fast,
> easy nommu architecture for testing.
thanks for the test.
> I'd echo the commen
Hello Anton,
thanks for the comment.
On Fri, 15 Nov 2024 19:26:07 +0900,
Anton Ivanov wrote:
> > What do others think? Would you use it? What for?
>
> I always thought of it as "another LKL". In that case, it can be compared
> to LKL on merit and if it is equivalent or better - go into kernel
-11 at 15:27 +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.
>
> So I've been thinking about this for a while now...
thank you for your time !
> To be clear, I'm not
Hello Greg,
On Thu, 14 Nov 2024 10:40:03 +0900,
Greg Ungerer wrote:
> I was only interested in the ability to run ELF based static/PIE binaries
> when I did 782f4c5c44e7d99d ("m68knommu: allow elf_fdpic loader to be
> selected").
> I did the same thing for RISC-V in commit 9549fb354ef1 ("riscv
On Wed, 13 Nov 2024 22:55:02 +0900,
Geert Uytterhoeven wrote:
> On Wed, Nov 13, 2024 at 2:17 PM Hajime Tazaki wrote:
> > On Wed, 13 Nov 2024 19:27:08 +0900,
> > Geert Uytterhoeven wrote:
> > > On Wed, Nov 13, 2024 at 9:37 AM Johannes Berg
> > > wrote:
> >
Hello,
thanks for the inputs Geert, Johannes,
On Wed, 13 Nov 2024 19:27:08 +0900,
Geert Uytterhoeven wrote:
>
> Hi Johannes,
>
> On Wed, Nov 13, 2024 at 9:37 AM Johannes Berg
> wrote:
> > On Wed, 2024-11-13 at 09:36 +0100, Johannes Berg wrote:
> > > On Wed, 2024-11-13 at 09:19 +0100, Geert
1 - 100 of 149 matches
Mail list logo