[PATCH v5 7/7] um: Add 4 level page table support

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg The larger memory space is useful to support more applications inside UML. One example for this is ASAN instrumentation of userspace applications which requires addresses that would otherwise not be available. Signed-off-by: Benjamin Berg --- v2: - Do not hide option behin

[PATCH v5 6/7] um: Discover host_task_size from envp

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg When loading the UML binary, the host kernel will place the stack at the highest possible address. It will then map the program name and environment variables onto the start of the stack. As such, an easy way to figure out the host_task_size is to use the highest pointer to a

[PATCH v5 4/7] um: Fix stub_start address calculation

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg The calculation was wrong as it only subtracted one and then rounded down for alignment. However, this is incorrect if host_task_size is not already aligned. This probably worked fine because on 64 bit the host_task_size is bigger than returned by os_get_top_address. Signed-

[PATCH v5 5/7] um: Limit TASK_SIZE to the addressable range

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg We may have a TASK_SIZE from the host that is bigger than UML is able to address with a three-level pagetable. Guard against that by clipping the maximum TASK_SIZE to the maximum addressable area. Signed-off-by: Benjamin Berg --- arch/um/kernel/um_arch.c | 7 ++- 1 file

[PATCH v5 3/7] um: use execveat on memfd to create userspace MMs

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg Using clone will not undo features that have been enabled by libc. An example of this already happening is rseq, which could cause the kernel to read/write memory of the userspace process. In the future the standard library might also use mseal by default to protect itself, wh

[PATCH v5 2/7] um: Add generic stub_syscall1 function

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg The 64bit version did not have a stub_syscall1 function yet. Add it as it will be useful to implement a static binary for stub loading. Signed-off-by: Benjamin Berg --- arch/x86/um/shared/sysdep/stub_64.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch

[PATCH v5 1/7] um: Add generic stub_syscall6 function

2024-06-19 Thread Benjamin Berg
This function will be used by the new static stub binary. Signed-off-by: Benjamin Berg --- arch/x86/um/shared/sysdep/stub_32.h | 22 ++ arch/x86/um/shared/sysdep/stub_64.h | 16 2 files changed, 38 insertions(+) diff --git a/arch/x86/um/shared/sysdep/stub_32

[PATCH v5 0/7] Increased address space for 64 bit

2024-06-19 Thread Benjamin Berg
From: Benjamin Berg The new version of the patchset uses execveat on a memfd instead of cloning twice to disable rseq. This should be much more robust going forward as it will also avoid issues with other new features like mseal. This patchset fixes a few bugs, adds a new method of discovering t

Re: [PATCH 14/26] block: move the nonrot flag to queue_limits

2024-06-19 Thread Simon Fernandez
Hi folks, how can I unsubscribe from this group.? Thanks in advance. S > On 17 Jun 2024, at 07:04, Christoph Hellwig wrote: > > Move the nonrot flag into the queue_limits feature field so that it can > be set atomically with the queue frozen. > > Use the chance to switch to defaulting to non-ro

Re: move features flags into queue_limits v2

2024-06-19 Thread Christoph Hellwig
On Wed, Jun 19, 2024 at 08:21:14AM -0600, Jens Axboe wrote: > Please check for-6.11/block, as I pulled in the changes to the main > block branch and that threw some merge conflicts mostly due to Damien's > changes in for-6.11/block. While fixing those up, I also came across > oddities like: > > (l

Re: move features flags into queue_limits v2

2024-06-19 Thread Jens Axboe
On 6/19/24 8:18 AM, Jens Axboe wrote: > > On Mon, 17 Jun 2024 08:04:27 +0200, Christoph Hellwig wrote: >> this is the third and last major series to convert settings to >> queue_limits for this merge window. After a bunch of prep patches to >> get various drivers in shape, it moves all the queue_

Re: move features flags into queue_limits v2

2024-06-19 Thread Jens Axboe
On Mon, 17 Jun 2024 08:04:27 +0200, Christoph Hellwig wrote: > this is the third and last major series to convert settings to > queue_limits for this merge window. After a bunch of prep patches to > get various drivers in shape, it moves all the queue_flags that specify > driver controlled featu