Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-17 Thread David Gow
On Thu, 17 Oct 2024 at 20:05, Benjamin Berg wrote: > > Hi, > > On Thu, 2024-10-17 at 10:18 +0200, Johannes Berg wrote: > > [SNIP] > > > > I wonder now if the SSE instructions generated are memset() and that > > goes away with the patches that Nathan just sent to not have the memset > > (which was

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-17 Thread Benjamin Berg
Hi, On Thu, 2024-10-17 at 10:18 +0200, Johannes Berg wrote: > [SNIP] > > I wonder now if the SSE instructions generated are memset() and that > goes away with the patches that Nathan just sent to not have the memset > (which was due to -ftrivial-auto-var-init) in the first place? I am guessing i

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-17 Thread Benjamin Berg
Hi, On Thu, 2024-10-17 at 15:17 +0800, David Gow wrote: > On Thu, 19 Sept 2024 at 20:45, Benjamin Berg > wrote: > > > > [SNIP] > > It turns out that this breaks the KUnit user alloc helpers on x86_64, > at least on my machine. > > This can be reproduced with: > ./tools/testing/kunit/kunit.py

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-17 Thread Johannes Berg
On Thu, 2024-10-17 at 15:17 +0800, David Gow wrote: > It turns out that this breaks the KUnit user alloc helpers on x86_64, > at least on my machine. Yay, second bug from this ;-) > This can be reproduced with: > ./tools/testing/kunit/kunit.py run usercopy > > Though the 32-bit version works: >

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-17 Thread David Gow
On Thu, 19 Sept 2024 at 20:45, Benjamin Berg wrote: > > 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 > stan

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-16 Thread Berg, Benjamin
Hi Nathan, On Tue, 2024-10-15 at 19:34 -0700, Nathan Chancellor wrote: > On Thu, Sep 19, 2024 at 02:45:03PM +0200, Benjamin Berg wrote: > ... > > diff --git a/arch/um/kernel/skas/Makefile > > b/arch/um/kernel/skas/Makefile > > index 6f86d53e3d69..fbb61968055f 100644 > > --- a/arch/um/kernel/skas/M

Re: [PATCH v9 02/10] um: use execveat to create userspace MMs

2024-10-15 Thread Nathan Chancellor
Hi Benjamin, On Thu, Sep 19, 2024 at 02:45:03PM +0200, Benjamin Berg wrote: ... > diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile > index 6f86d53e3d69..fbb61968055f 100644 > --- a/arch/um/kernel/skas/Makefile > +++ b/arch/um/kernel/skas/Makefile > @@ -3,14 +3,43 @@ > # Co

[PATCH v9 02/10] um: use execveat to create userspace MMs

2024-09-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