Am 20. Januar 2025 00:25:35 MEZ schrieb Glenn Washburn
:
>Hi Benjamin,
>
>After applying the close_range patch, I'm now getting a failure at
>runtime where the last line printed from UML is "Failed to initialize
>default registers". The host is on Debian 11 at kernel 5.10.216. I've
>bisected th
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(-
As userspace on UML/!MMU also need to configure %fs register when it is
running to correctly access thread structure, host syscalls implemented
in os-Linux drivers may be puzzled when they are called. Thus it has to
configure %fs register via arch_prctl(SET_FS) on every host syscalls.
Signed-off-
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/kernel
Since ptrace facility isn't used under !MMU of UML, there is different
code path to invoke processes/threads; there are no external process
used, and need to properly configure some of registers (fs segment
register for TLS, etc) on every context switch, etc.
Signals aren't delivered in non-ptrace
As UML supports CONFIG_MMU=n case, it has to use an alternate ELF
loader, FDPIC ELF loader. In this commit, we added necessary
definitions in the arch, as UML has not been used so far. It also
updates Kconfig file to use BINFMT_ELF_FDPIC under !MMU environment.
Cc: Eric Biederman
Cc: Kees Cook
This commit introduces an entry point of syscall interface for !MMU
mode. It uses an entry function, __kernel_vsyscall, a kernel-wide global
symbol accessible from any locations.
Although it isn't in the scope of this commit, it can be also exposed
via vdso image which is directly accessible from
This commit adds memory operations on UML under !MMU environment.
Some part of the original UML code relying on CONFIG_MMU are excluded
from compilation when !CONFIG_MMU. Additionally, generic functions such as
uaccess, futex, memcpy/strnlen/strncpy can be used as user- and
kernel-space share the
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/nom
This commit updates the behavior of signal handling under !MMU
environment. It adds the alignment code for signal frame as the frame
is used in userspace as-is.
floating point register is carefully handling upon entry/leave of
syscall routine so that signal handlers can read/write the contents of
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/x
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(-)
diff
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 opinions on that.
There are still several limitations/issues which we already found;
here is the list of those issues.
- m
This commit adds syscall hook with seccomp.
Using seccomp raises SIGSYS to UML process, which is captured in the
(UML) kernel, then jumps to the syscall entry point, __kernel_vsyscall,
to hook the original syscall instructions.
The SIGSYS signal is raised upon the execution from uml_reserved and
Hi Benjamin,
After applying the close_range patch, I'm now getting a failure at
runtime where the last line printed from UML is "Failed to initialize
default registers". The host is on Debian 11 at kernel 5.10.216. I've
bisected the issue and it looks like the bad commit is: 3f17fed2149
("um: swit
On Mon, 13 Jan 2025 10:41:07 +0100
Benjamin Berg wrote:
> From: Benjamin Berg
>
> The stub execution uses the somewhat new close_range and execveat
> syscalls. Of these two, the execveat call is essential, but the
> close_range call is more about stub process hygiene rather than safety
> (and i
- Ursprüngliche Mail -
> Von: "Al Viro"
> An: "richard"
> CC: "linux-um" , "linux-fsdevel"
>
> Gesendet: Samstag, 18. Januar 2025 00:09:13
> Betreff: [PATCH] hostfs: fix string handling in __dentry_name()
> [in viro/vfs.git#fixes, going to Linus unless anyone objects]
>
> strcpy() sho
18 matches
Mail list logo