Re: [RFC PATCH 8/9] um: Implement kernel side of SECCOMP based process handling

2024-10-26 Thread Benjamin Berg
Hi, On Thu, 2024-10-10 at 14:12 +0200, Johannes Berg wrote: > > +++ b/arch/um/os-Linux/skas/process.c > > @@ -1,9 +1,11 @@ > >   // SPDX-License-Identifier: GPL-2.0 > >   /* > > + * Copyright (C) 2021 Benjamin Berg > >    * Copyright (C) 2015 Thomas Meyer (tho...@m3y3r.de) > >    * Copyright (C)

Re: [RFC PATCH 8/9] um: Implement kernel side of SECCOMP based process handling

2024-10-26 Thread Johannes Berg
On Sat, 2024-10-26 at 13:04 +0200, Benjamin Berg wrote: > > > > > > +#include > > > > Hmm. If this works, why do we have UML_CONFIG_64BIT? For ASM stuff? > > So, I just had a quick look. It seems that before commit a95b37e20db9 > ("kbuild: get out of ") doing > this would have caused compilat

Re: [RFC PATCH 8/9] um: Implement kernel side of SECCOMP based process handling

2024-10-26 Thread Tiwei Bie
On 2024/10/26 20:56, Johannes Berg wrote: > On Sat, 2024-10-26 at 13:04 +0200, Benjamin Berg wrote: +#include >>> >>> Hmm. If this works, why do we have UML_CONFIG_64BIT? For ASM stuff? >> >> So, I just had a quick look. It seems that before commit a95b37e20db9 >> ("kbuild: get out of

Re: [RFC PATCH 00/13] nommu UML

2024-10-26 Thread Benjamin Berg
Hi, On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote: > This is a series of patches of nommu arch addition to UML.  It would > be nice to ask comments/opinions on this. > > There are several limitations/issues which we already found; here is > the list of those issues. > > - prompt configu

Re: [RFC PATCH v2 9/9] um: pass FD for memory operations when needed

2024-10-26 Thread Benjamin Berg
Hi, On Thu, 2024-10-24 at 21:52 +0800, Tiwei Bie wrote: > On 2024/10/23 22:08, Benjamin Berg wrote: > [...] > > > It looks the memcpy could trigger a crash when UML_SECCOMP is > enabled: > > [...] > > It can be fixed with changes like below on my machine: > > diff --git a/arch/um/include/shar

Re: [PATCH][next] um: Malloc just enough space for fitting pid file

2024-10-26 Thread Johannes Berg
On Sat, 2024-10-26 at 20:59 +1300, Paulo Miguel Almeida wrote: > > when I said that "umid is already generated during make_umid_init > __initcall", from my humble point of view, I was explaining the 'why' > using UMID_LEN for calculation buffer sizes was redundant. Then again, > once we know the s

Re: [RFC PATCH 03/13] um: nommu: memory handling

2024-10-26 Thread Hajime Tazaki
On Sat, 26 Oct 2024 00:15:06 +0900, Johannes Berg wrote: > > On Fri, 2024-10-25 at 21:55 +0900, Hajime Tazaki wrote: > > > > > > Should that really do _nothing_? Perhaps it's not called at all in no- > > > MMU, but then you don't need it, but otherwise it seems it should do > > > something even

Re: [RFC PATCH 13/13] um: nommu: plug nommu code into build system

2024-10-26 Thread Hajime Tazaki
On Sat, 26 Oct 2024 00:27:08 +0900, Johannes Berg wrote: > > On Fri, 2024-10-25 at 22:05 +0900, Hajime Tazaki wrote: > > On Fri, 25 Oct 2024 18:33:06 +0900, > > Johannes Berg wrote: > > > > > > On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote: > > > > > > > > config MMU > > > > -

Re: [RFC PATCH 05/13] x86/um: nommu: syscall translation by zpoline

2024-10-26 Thread Hajime Tazaki
On Sat, 26 Oct 2024 00:20:49 +0900, Johannes Berg wrote: > > On Fri, 2024-10-25 at 21:58 +0900, Hajime Tazaki wrote: > > > > > > + if (down_write_killable(&mm->mmap_lock)) { > > > > + err = -EINTR; > > > > + return err; > > > > > > ? > > > > the lock isn't ne

Re: [RFC PATCH 07/13] um: nommu: configure fs register on host syscall invocation

2024-10-26 Thread Hajime Tazaki
On Sat, 26 Oct 2024 00:22:48 +0900, Johannes Berg wrote: > > On Fri, 2024-10-25 at 22:27 +0900, Hajime Tazaki wrote: > > > > On Fri, 25 Oct 2024 18:28:01 +0900, > > Johannes Berg wrote: > > > > > > On Thu, 2024-10-24 at 21:09 +0900, Hajime Tazaki wrote: > > > > > > > > +static void sigill(int

Re: [PATCH][next] um: Malloc just enough space for fitting pid file

2024-10-26 Thread Johannes Berg
On Sat, 2024-10-26 at 16:46 +1300, Paulo Miguel Almeida wrote: > umid is already generated during make_umid_init __initcall so there is > no need to allocate UMID_LEN bytes to accommodate the max possible name > for the umid segment of the filepath > > This patch replaces UMID_LEN occurences in wh

Re: [PATCH][next] um: Malloc just enough space for fitting pid file

2024-10-26 Thread Paulo Miguel Almeida
On Sat, Oct 26, 2024 at 09:44:53AM +0200, Johannes Berg wrote: Hi! > On Sat, 2024-10-26 at 16:46 +1300, Paulo Miguel Almeida wrote: > > umid is already generated during make_umid_init __initcall so there is > > no need to allocate UMID_LEN bytes to accommodate the max possible name > > for the um