da:
KVM: selftests: Fix build on on non-x86 architectures (2024-10-21 15:49:33
-0700)
are available in the Git repository at:
https://github.com/thehajime/linux 82a7ee8b31c51edb47e144922581824a3b5e371d
https://github.com/thehajime/linux/tree/um-nommu-v6.12-rc4-rfc
Hajime Tazaki (13):
fs:
(2) used by
MMU-full UML.
Signed-off-by: Hajime Tazaki
---
arch/x86/um/asm/elf.h | 3 +
arch/x86/um/zpoline.c | 228 ++
2 files changed, 231 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 | 42
arch/x86/um/entry_64.S | 88 +
arch/x86/um/shared/sysdep/syscalls_64.h | 4 ++
3 files changed, 134 insertions(+)
create mode 1
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 219 +++
1 file changed, 219 insertions(+)
create mode 100644 Documentation/virt/uml/nommu-uml.rst
diff --git a/Documentation/virt
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 | 13 -
arch/um/configs/x86_64_nommu_defconfig | 64 +
arch/um/include/shared/common-offsets.h | 3
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
contents should be restored before
vfork/parent returns. this is done in do_syscall_64().
Signed-off-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/kernel/process.c| 22 +-
arch/x86/um/do_syscall_64.c | 36
2 files changed, 5
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 | 17 +
arch/x86
-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 | 11
arch/um/os-Linux/start_up.c | 47 +++
arch/um/os-Linux/time.c | 3 +-
arch/x86/um
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 | 14 --
arch/um/include/asm/tlbflush.h| 23
me of registers (fs segment register for TLS, etc) on every
contex 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/exec.c
This commit updates the behavior of signal handling under !MMU
environment. 1) the stack preparation for the signal handlers and
2) retoration of stack after rt_sigreturn(2) syscall. Those are needed
as the stack usage on vfork(2) syscall is different.
Signed-off-by: Hajime Tazaki
---
arch/x86
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 ++
1 file changed, 10 insertions(+)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 4fe5bb9f1b1f..ab16fdf475b0
Hello,
On Mon, 28 Oct 2024 22:32:43 +0900,
Benjamin Berg wrote:
> > > > - a crash on userspace programs crashes a UML kernel, not signaling
> > > > with SIGSEGV to the program.
> > > > - commit c27e618 (during v6.12-rc1 merge) introduces invalid access to
> > > > a vma structure for our cas
Hello,
this is a great clean up I think.
I've also applied my tentative nommu patch and works fine with minor
modifications.
On Mon, 04 Nov 2024 00:05:34 +0900,
Benjamin Berg wrote:
> diff --git a/arch/um/include/asm/current.h b/arch/um/include/asm/current.h
> new file mode 100644
> index 000
On Mon, 04 Nov 2024 17:17:05 +0900,
Berg, Benjamin wrote:
> > with this include, I guess is now in a
> > circular dependency.
> >
> > after only applying this patch onto uml/next, and make mrproper
> > ARCH=um, I cannot build UML kernel with defconfig.
>
> Oh. Probably the easiest is to just
Hello,
On Sun, 27 Oct 2024 18:45:39 +0900,
Johannes Berg wrote:
>
> On Sat, 2024-10-26 at 16:36 +0900, Hajime Tazaki wrote:
> >
> > Originally our patchset had a whitelist-based seccomp filter (w/
> > SCMP_ACT_ALLOW), but dropped from this RFC as I found that 1)
On Fri, 25 Oct 2024 18:19:25 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +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 Fri, 25 Oct 2024 18:14:19 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote:
> >
> > +++ b/arch/x86/um/do_syscall_64.c
> > @@ -0,0 +1,42 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include
&
On Fri, 25 Oct 2024 18:29:07 +0900,
Johannes Berg wrote:
>
>
> > oom:
> > - printk(KERN_ERR "Cannot allocate vdso\n");
> > + pr_err("Cannot allocate vdso");
>
> kind of unrelated change
thanks, will fix it.
-- Hajime
On Fri, 25 Oct 2024 18:28:01 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote:
> >
> > +static void sigill(int sig, siginfo_t *si, void *ctx_void)
> > +{
> > + longjmp(jmpbuf, 1);
> > +}
>
> Should this c
Hello Johannes,
On Fri, 25 Oct 2024 17:56:51 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote:
> >
> > +#ifndef CONFIG_MMU
> > +#include
>
> Not sure that makes so much sense in the middle of the file, no harm
> alway
On Fri, 25 Oct 2024 18:33:06 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote:
> >
> > config MMU
> > - bool
> > + bool "MMU-based Paged Memory Management Support"
> > default y
>
> "if !64
Hello Benjamin,
thank you for your time looking at this.
On Sat, 26 Oct 2024 19:19:08 +0900,
Benjamin Berg wrote:
> > - a crash on userspace programs crashes a UML kernel, not signaling
> > with SIGSEGV to the program.
> > - commit c27e618 (during v6.12-rc1 merge) introduces invalid access t
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
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 | 3 +++
arch/um/kernel/trap.c | 10
arch/um/os-Linux/signal.c | 18 ++-
arch/x86/um
This commit adds an initial documentation for !MMU mode of UML.
Signed-off-by: Hajime Tazaki
---
Documentation/virt/uml/nommu-uml.rst | 221 +++
1 file changed, 221 insertions(+)
create mode 100644 Documentation/virt/uml/nommu-uml.rst
diff --git a/Documentation/virt
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
/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 fdpic
um: nommu: memory handling
x86/um: nommu: syscall handling
x86/um: nommu: syscall translation by zpoline
um
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 ++
1 file changed, 10 insertions(+)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 4fe5bb9f1b1f..ab16fdf475b0
-by: Hajime Tazaki
Signed-off-by: Ricardo Koller
---
arch/um/include/shared/os.h | 5
arch/um/os-Linux/Makefile | 4 +--
arch/um/os-Linux/cpu.c | 50
arch/um/os-Linux/internal.h | 5
arch/um/os-Linux/main.c | 5
arch/um/os-Linux
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
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
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
code.
Signed-off-by: Hajime Tazaki
---
arch/um/include/shared/os.h | 3 ++
arch/um/kernel/um_arch.c| 4 ++
arch/um/os-Linux/process.c | 76 +
3 files changed, 83 insertions(+)
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index
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
) 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
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
On Fri, 25 Oct 2024 18:11:01 +0900,
Johannes Berg wrote:
>
> (I should say, I'm still reading through this, and haven't formed an
> overall opinion. Just nitpicking on the details as I see them for now)
thanks anyway. looking forward to any opinions.
> > +#endif
> > +
> >
> > #include
>
On Fri, 25 Oct 2024 18:22:29 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote:
> > Since ptrace facility isn't used under !MMU of UML, there is different
> > code path to invoke proceeses/threads; on an entry to the syscall
>
>
On Fri, 25 Oct 2024 18:30:41 +0900,
Johannes Berg wrote:
>
> On Thu, 2024-10-24 at 21:09 +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) r
On Sat, 26 Oct 2024 00:15:06 +0900,
Johannes Berg wrote:
>
> On Fri, 2024-10-25 at 21:55 +0900, Hajime Tazaki wrote:
> > >
> > > Should that really do _nothing_? Perhaps it's not called at all in no-
> > > MMU, but then you don't need it, but othe
On Sat, 26 Oct 2024 00:27:08 +0900,
Johannes Berg wrote:
>
> On Fri, 2024-10-25 at 22:05 +0900, Hajime Tazaki wrote:
> > On Fri, 25 Oct 2024 18:33:06 +0900,
> > Johannes Berg wrote:
> > >
> > > On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki
On Sat, 26 Oct 2024 00:20:49 +0900,
Johannes Berg wrote:
>
> On Fri, 2024-10-25 at 21:58 +0900, Hajime Tazaki wrote:
> >
> > > > + if (down_write_killable(&mm->mmap_lock)) {
> > > > + err = -EINTR;
> > > > +
On Sat, 26 Oct 2024 00:22:48 +0900,
Johannes Berg wrote:
>
> On Fri, 2024-10-25 at 22:27 +0900, Hajime Tazaki wrote:
> >
> > On Fri, 25 Oct 2024 18:28:01 +0900,
> > Johannes Berg wrote:
> > >
> > > On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki w
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
Hello Geert,
thank you for the message.
On Tue, 12 Nov 2024 21:48:28 +0900,
Geert Uytterhoeven wrote:
>
> On Mon, Nov 11, 2024 at 7:28 AM Hajime Tazaki wrote:
> > As UML supports CONFIG_MMU=n case, it has to use an alternate ELF
> > loader, FDPIC ELF loader. In thi
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, 30 Oct 2024 18:25:18 +0900,
Hajime Tazaki wrote:
>
> > > > > - a crash on userspace programs crashes a UML kernel, not signaling
> > > > > with SIGSEGV to the program.
after investigation with trying to save/restore FP registers, I found
the register
> --- a/arch/um/kernel/process.c
> +++ b/arch/um/kernel/process.c
> @@ -43,7 +43,8 @@
> * cares about its entry, so it's OK if another processor is modifying its
> * entry.
> */
> -struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { NULL } };
> +struct task_struct * cpu_tasks[NR_CPUS];
ditto.
The other part is looking good to me.
Reviewed-by: Hajime Tazaki
-- Hajime
-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 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
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 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
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 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
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
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
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
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
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
) 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
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
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
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
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
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
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
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
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 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
...@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
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
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
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
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 | 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
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
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
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
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 +
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
...@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
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 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
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 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 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
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
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
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
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
1 - 100 of 200 matches
Mail list logo