Hi,
On Thu, 2024-09-19 at 16:37 +0200, Benjamin Beichler wrote:
> Am 19.09.2024 um 16:22 schrieb Benjamin Berg:
> > > Could this also eliminate/address the busy-loop hack in timer_read in
> > > time.c?
> > Hmm, I was considering changing the other hack in handle_syscall to
> > also use this approa
Am 19.09.2024 um 16:22 schrieb Benjamin Berg:
Could this also eliminate/address the busy-loop hack in timer_read in
time.c?
Hmm, I was considering changing the other hack in handle_syscall to
also use this approach.
But, I don't think the timer_read hack can be removed. In the case of
userspace
Hi,
On Thu, 2024-09-19 at 16:11 +0200, Benjamin Beichler wrote:
> Could this also eliminate/address the busy-loop hack in timer_read in
> time.c?
Hmm, I was considering changing the other hack in handle_syscall to
also use this approach.
But, I don't think the timer_read hack can be removed. In
Hi,
Could this also eliminate/address the busy-loop hack in timer_read in
time.c?
And another question: Why you remove only 1 extra jiffy in the timer
callbacks and not all the extra jiffies? Is there always only 1 or could
there be multiple?
regards
Benjamin Beichler
Am 13.09.2024 um 22
From: Benjamin Berg
Instead of using the current stack pointer, we can also use the current
instruction to calculate where the stub data is. With this the stub data
only needs to be aligned to a full page boundary.
Changing this has the advantage that we do not have a hole in the memory
space ab
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
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
---
v9:
- Drop support for 3 level
From: Benjamin Berg
With the change to use execve() we can now safely clear the memory up to
STUB_START as rseq will not be trying to use memory in that region. Also,
on 64 bit the previous changes should mean that there is no usable
memory range above the stub.
Make the change and remove the co
From: Benjamin Berg
The code assumes that the stub code can fit into a single page. This is
unlikely to ever change, but add a link time assert instead so that
there will be no hard to debug error.
Signed-off-by: Benjamin Berg
---
arch/um/kernel/dyn.lds.S | 3 +++
1 file changed, 3 insertions(
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 on 64-bit. Guard against that by
clipping the maximum TASK_SIZE to the maximum addressable area.
Signed-off-by: Benjamin Berg
---
v9: This patch is technically not
From: Benjamin Berg
The winch "thread" is really a separate process. Using prctl to set
PR_SET_PDEATHSIG ensures that this separate thread will be killed if the
UML kernel itself dies unexpectedly and does not perform proper cleanup.
Signed-off-by: Benjamin Berg
---
arch/um/drivers/chan_user.c
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
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
From: Benjamin Berg
Enable PR_SET_PDEATHSIG so that the UML userspace process will be killed
when the kernel exits unexpectedly.
Signed-off-by: Benjamin Berg
---
arch/um/kernel/skas/stub_exe.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/um/kernel/skas/stub_exe.c b/arch/um/kerne
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
On 2024/7/5 03:05, Benjamin Berg wrote:
[...]
> static int userspace_tramp(void *stack)
> {
> - struct sigaction sa;
> - void *addr;
> - int fd;
> + char *const argv[] = { "uml-userspace", NULL };
> + int pipe_fds[2];
> unsigned long long offset;
> - unsigned long se
On 2024/7/5 03:05, Benjamin Berg wrote:
[...]
> diff --git a/arch/x86/um/os-Linux/task_size.c
> b/arch/x86/um/os-Linux/task_size.c
> index 1dc9adc20b1c..a91599799b1a 100644
> --- a/arch/x86/um/os-Linux/task_size.c
> +++ b/arch/x86/um/os-Linux/task_size.c
> @@ -1,151 +1,19 @@
> // SPDX-License-Ide
* Mike Rapoport [240909 02:49]:
> From: "Mike Rapoport (Microsoft)"
>
> Using large pages to map text areas reduces iTLB pressure and improves
> performance.
>
> Extend execmem_alloc() with an ability to use huge pages with ROX
> permissions as a cache for smaller allocations.
>
> To populate
On 2024/9/19 15:22, Benjamin Berg wrote:
> On Thu, 2024-09-19 at 08:54 +0200, Johannes Berg wrote:
>> On Wed, 2024-09-18 at 14:17 +0800, Tiwei Bie wrote:
>>> The highmem support has been removed by commit a98a6d864d3b ("um:
>>> Remove broken highmem support"). The 2-level page table is
>>> sufficie
On Thu, 2024-09-19 at 08:54 +0200, Johannes Berg wrote:
> On Wed, 2024-09-18 at 14:17 +0800, Tiwei Bie wrote:
> > The highmem support has been removed by commit a98a6d864d3b ("um:
> > Remove broken highmem support"). The 2-level page table is
> > sufficient
> > on UML/i386 now. Remove the 3-level p
20 matches
Mail list logo