free_pages() performs a parameter null check inside
previous code also does zero check as following
if (stack == 0)
goto out;
to_mm->id.stack = stack;
therefore remove double zero check here.
Signed-off-by: shaojiedong
---
Changes in v2:
- EDITME: describe what is new in this se
On Fri, Oct 25, 2024 at 02:03:32PM +0800, shaojiedong wrote:
> free_pages() performs a parameter null check inside
> previous code also does zero check as following
> if (stack == 0)
> goto out;
>
> to_mm->id.stack = stack;
>
> therefore remove double zero check here.
>
> Signed-
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/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(-)
diff
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 ++
The ubd io and write_sigio threads/processes may leak e.g. when
the main process is killed by "kill -9". Fix it by setting the
parent-death signal for them.
Tiwei Bie (4):
um: Add os_set_pdeathsig helper function
um: Set parent-death signal for ubd io thread/process
um: Set parent-death sign
Since we have a helper now, let's switch to using it. It will make
the code slightly more consistent.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/chan_user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 143
The ubd io thread is not really a traditional thread. Set the
parent-death signal for it to ensure that it will be killed if
the UML kernel dies unexpectedly without proper cleanup.
Signed-off-by: Tiwei Bie
---
arch/um/drivers/ubd_kern.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/u
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 fork can only come from libc's vfork, which does this:
popq %%rdx;
call *%rax; // zpoline => __kernel_vsyscall
pushq %%rdx;
%rcx stores the return address which is stored at
pt_regs[HOST_IP] at the moment. As child returns via
userspace() with a jmp instruction (whil
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
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 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
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
interface, the stack pointer should be manipulated to handle vfork(2)
return address, no external process is used, and need to properlly
configure some of registe
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/
FDPIC ELF loader adds an architecture hook at the end of loading
binaries to finalize the mapped memory before moving toward exec
function. The hook is used by UML under !MMU when translating
syscall/sysenter instructions before calling execve.
Cc: Alexander Viro
Cc: Christian Brauner
Cc: Jan K
On 2024/10/23 22:08, Benjamin Berg wrote:
[...]
> diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
> index c663b67c3fd3..a29957e021f3 100644
> --- a/arch/um/os-Linux/skas/process.c
> +++ b/arch/um/os-Linux/skas/process.c
> @@ -16,6 +16,7 @@
> #include
> #include
>
Hi Nathan,
On Mon, Oct 21, 2024 at 03:15:19PM -0700, Nathan Chancellor wrote:
> Hi Mike,
>
> On Wed, Oct 16, 2024 at 03:24:22PM +0300, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)"
> >
> > When module text memory will be allocated with ROX permissions, the
> > memory at the actual
18 matches
Mail list logo