Re: [RFC PATCH seccomp 0/2] seccomp: Add bitmap cache of arg-independent filter results that allow syscalls

2020-09-21 Thread Christian Brauner
On Mon, Sep 21, 2020 at 12:35:16AM -0500, YiFei Zhu wrote: > From: YiFei Zhu > > This series adds a bitmap to cache seccomp filter results if the > result permits a syscall and is indepenent of syscall arguments. > This visibly decreases seccomp overhead for most common seccomp > filters with

Re: [PATCH -next] binder: simplify the return expression of binder_mmap

2020-09-21 Thread Christian Brauner
On Mon, Sep 21, 2020 at 04:24:23PM +0800, Liu Shixin wrote: > Simplify the return expression. > > Signed-off-by: Liu Shixin > --- Why not is all I can really say. :) But if this is about simplifying you could get rid of the "ret" and "failure string" variables, and the goto in that function

Re: [PATCH v2 4/4] selftests/clone3: Avoid OS-defined clone_args

2020-09-21 Thread Christian Brauner
; macro names to match UAPI names. > > Signed-off-by: Kees Cook > --- Looks good, thanks! Acked-by: Christian Brauner

Re: [PATCH v2 3/4] selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit

2020-09-21 Thread Christian Brauner
; Suggested-by: Thadeu Lima de Souza Cascardo > Link: > https://lore.kernel.org/linux-kselftest/20200911181012.171027-1-casca...@canonical.com/ > Fixes: 58d0a862f573 ("seccomp: add tests for ptrace hole") > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH v2 2/4] selftests/seccomp: Allow syscall nr and ret value to be set separately

2020-09-21 Thread Christian Brauner
regset > read/write happening once and in one code path. > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH v2 1/4] selftests/seccomp: Record syscall during ptrace entry

2020-09-21 Thread Christian Brauner
if (!entry) > + /* > + * Some architectures only support setting return values during > + * syscall exit under ptrace, and on exit the syscall number may > + * no longer be available. Therefore, save the initial sycall s/sycall/syscall/ Oth

Re: [PATCH 02/15] selftests/seccomp: Provide generic syscall setting macro

2020-09-15 Thread Christian Brauner
ks good either way! Acked-by: Christian Brauner

Re: [PATCH 01/15] selftests/seccomp: Refactor arch register macros to avoid xtensa special case

2020-09-15 Thread Christian Brauner
Looks good! Acked-by: Christian Brauner

Re: [PATCH 03/15] selftests/seccomp: mips: Define SYSCALL_NUM_SET macro

2020-09-15 Thread Christian Brauner
\ (_regs).regs[2] = _nr; \ } while (0) would read better but that's just a matter of taste. :) Looks good! Acked-by: Christian Brauner

Re: [PATCH 04/15] selftests/seccomp: arm: Define SYSCALL_NUM_SET macro

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:09AM -0700, Kees Cook wrote: > Remove the arm special-case in change_syscall(). > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 15/15] selftests/seccomp: Use __NR_mknodat instead of __NR_mknod

2020-09-15 Thread Christian Brauner
> --- Thanks! Looks good. Acked-by: Christian Brauner

Re: [PATCH 10/15] selftests/seccomp: Avoid redundant register flushes

2020-09-15 Thread Christian Brauner
f-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 07/15] selftests/seccomp: Remove syscall setting #ifdefs

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:12AM -0700, Kees Cook wrote: > With all architectures now using the common SYSCALL_NUM_SET() macro, the > arch-specific #ifdef can be removed from change_syscall() itself. > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 09/15] selftests/seccomp: Convert REGSET calls into ARCH_GETREG/ARCH_SETREG

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:14AM -0700, Kees Cook wrote: > Consolidate the REGSET logic into the new ARCH_GETREG() and > ARCH_SETREG() macros, avoiding more #ifdef code in function bodies. > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 14/15] selftests/clone3: Avoid OS-defined clone_args

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:19AM -0700, Kees Cook wrote: > As the UAPI headers start to appear in distros, we need to avoid > outdated versions of struct clone_args to be able to test modern > features. Additionally pull in the syscall numbers correctly. > > Signed-off-by: Kees Cook > --- Hm,

Re: [PATCH 11/15] selftests/seccomp: Remove SYSCALL_NUM_RET_SHARE_REG in favor of SYSCALL_RET_SET

2020-09-15 Thread Christian Brauner
return value (for whatever reason), they can define SYSCALL_RET_SET() > without an associated SYSCALL_RET() macro. This also paves the way for > architectures that need to do special things to set the return value > (e.g. powerpc). > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 08/15] selftests/seccomp: Convert HAVE_GETREG into ARCH_GETREG/ARCH_SETREG

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:13AM -0700, Kees Cook wrote: > Instead of special-casing the get/set-registers routines, move the > HAVE_GETREG logic into the new ARCH_GETREG() and ARCH_SETREG() macros. > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH 06/15] selftests/seccomp: mips: Remove O32-specific macro

2020-09-15 Thread Christian Brauner
> Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner

Re: [PATCH] fork: Use helper function mapping_allow_writable() in dup_mmap()

2020-09-15 Thread Christian Brauner
On Sun, Sep 13, 2020 at 05:24:15AM -0400, Miaohe Lin wrote: > Use helper function mapping_allow_writable() to atomic_inc i_mmap_writable. > > Signed-off-by: Miaohe Lin > --- Hey Miaohe, Thanks for the patch! Per se there's nothing against using a proper helper when it exists. But it has

Re: [PATCH 05/15] selftests/seccomp: arm64: Define SYSCALL_NUM_SET macro

2020-09-15 Thread Christian Brauner
On Sat, Sep 12, 2020 at 04:08:10AM -0700, Kees Cook wrote: > Remove the arm64 special-case in change_syscall(). > > Signed-off-by: Kees Cook > --- We're using iovecs in ptrace()?? Looks good! Acked-by: Christian Brauner

Re: [PATCH][next] binder: remove redundant assignment to pointer n

2020-09-11 Thread Christian Brauner
es-Coverity: ("Unused value") > Signed-off-by: Colin Ian King > --- Thanks! Acked-by: Christian Brauner

Re: [PATCH] selftests/seccomp: Add test for unknown SECCOMP_RET kill behavior

2020-09-08 Thread Christian Brauner
f-by: Kees Cook > --- > (This is going via the seccomp tree.) > --- Thanks! Acked-by: Christian Brauner > tools/testing/selftests/seccomp/seccomp_bpf.c | 43 --- > 1 file changed, 37 insertions(+), 6 deletions(-) > > diff --git a/tools/testing/selftests/seccomp/seccom

Re: [PATCH v6 6/9] kernel: entry: Support Syscall User Dispatch for common syscall entry

2020-09-07 Thread Christian Brauner
On Mon, Sep 07, 2020 at 07:15:52AM -0700, Andy Lutomirski wrote: > > > > On Sep 7, 2020, at 3:15 AM, Christian Brauner > > wrote: > > > > On Fri, Sep 04, 2020 at 04:31:44PM -0400, Gabriel Krisman Bertazi wrote: > >> Syscall User Dispatch (SUD) m

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-07 Thread Christian Brauner
On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: > Convert TIF_SECCOMP into a generic TI flag for any syscall interception > work being done by the kernel. The actual type of work is exposed by a > new flag field outside of thread_info. This ensures that the >

Re: [PATCH v6 2/9] kernel: entry: Support TIF_SYSCAL_INTERCEPT on common entry code

2020-09-07 Thread Christian Brauner
> +#include > > #define CREATE_TRACE_POINTS > #include > @@ -41,6 +42,20 @@ static inline void syscall_enter_audit(struct pt_regs > *regs, long syscall) > } > } > > +static inline long do_syscall_intercept(struct pt_regs *regs) Hey G

Re: [PATCH v6 6/9] kernel: entry: Support Syscall User Dispatch for common syscall entry

2020-09-07 Thread Christian Brauner
On Fri, Sep 04, 2020 at 04:31:44PM -0400, Gabriel Krisman Bertazi wrote: > Syscall User Dispatch (SUD) must take precedence over seccomp, since the > use case is emulation (it can be invoked with a different ABI) such that > seccomp filtering by syscall number doesn't make sense in the first >

Re: [PATCH v6 4/9] signal: Expose SYS_USER_DISPATCH si_code type

2020-09-07 Thread Christian Brauner
Krisman Bertazi > --- Thanks! Acked-by: Christian Brauner

Re: [RFC PATCH] fork: Free per-cpu cached vmalloc'ed thread stacks with

2020-09-07 Thread Christian Brauner
On Sat, Sep 05, 2020 at 12:12:29AM +, Isaac J. Manjarres wrote: > The per-cpu cached vmalloc'ed stacks are currently freed in the > CPU hotplug teardown path by the free_vm_stack_cache() callback, > which invokes vfree(), which may result in purging the list of > lazily freed vmap areas. > >

Re: [PATCH v2 0/4] Support non-blocking pidfds

2020-09-04 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:58:55PM -0700, Josh Triplett wrote: > On Wed, Sep 02, 2020 at 12:21:26PM +0200, Christian Brauner wrote: > > Hi, > > > > Passing a non-blocking pidfd to waitid() currently has no effect, i.e. > > is not supported. There are users whi

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-04 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:56:59PM -0700, Josh Triplett wrote: > On Wed, Sep 02, 2020 at 12:21:28PM +0200, Christian Brauner wrote: > > Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is > > not > > supported. There are users which would like to u

Re: [PATCH v9 3/3] mm/madvise: introduce process_madvise() syscall: an external memory hinting API

2020-09-04 Thread Christian Brauner
On Thu, Sep 03, 2020 at 10:59:49AM -0700, Minchan Kim wrote: > On Thu, Sep 03, 2020 at 07:34:58PM +0200, Florian Weimer wrote: > > * Minchan Kim: > > > > > On Tue, Sep 01, 2020 at 08:46:02PM +0200, Florian Weimer wrote: > > >> * Minchan Kim: > > >> > > >> > ssize_t process_madvise(int

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-03 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:22:42PM +0200, Oleg Nesterov wrote: > On 09/02, Christian Brauner wrote: > > > > It also makes the API more consistent and uniform. In essence, waitid() is > > treated like a read on a non-blocking pidfd or a recvmsg() on a non-blocking > > so

Re: [PATCH v2 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

2020-09-03 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:58:09PM +0200, Oleg Nesterov wrote: > Christian, off-topic question... > > On 09/02, Christian Brauner wrote: > > > > -static int pidfd_create(struct pid *pid) > > +static int pidfd_create(struct pid *pid, unsigned int flags) > >

Re: [PATCH] seccomp: don't leave dangling ->notif if file allocation fails

2020-09-02 Thread Christian Brauner
e > it. > > Reported-by: Kees Cook > Reported-by: Christian Brauner > Signed-off-by: Tycho Andersen > --- Thanks for the patch, Tycho! Looks simple enough to me: Acked-by: Christian Brauner > kernel/seccomp.c | 11 --- > 1 file changed, 8 insertions(+), 3 de

Re: [PATCH] kernel/pid: Rename `find_ge_pid` to `find_get_vpid`.

2020-09-02 Thread Christian Brauner
On Wed, Sep 02, 2020 at 12:23:10PM +, Harley Paterson wrote: > Most PID functions in `kernel/pid.c` are named in the format > [do_something]_pid, and functions with a VPID counterpart have > the corresponding name [do_something]_vpid. > > `find_get_pid` and its VPID counterpart, `find_ge_pid`

[PATCH v2 4/4] tests: add waitid() tests for non-blocking pidfds

2020-09-02 Thread Christian Brauner
: 3 / 3 tests passed. # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- tools/testing/selftests/pidfd/pidfd.h | 4 ++ tools/testing/selftests/pidfd/pidfd_wait.c | 83

[PATCH v2 3/4] tests: port pidfd_wait to kselftest harness

2020-09-02 Thread Christian Brauner
All of the new pidfd selftests already use the new kselftest harness infrastructure. It makes for clearer output, makes the code easier to understand, and makes adding new tests way simpler. Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- /* v2

[PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-02 Thread Christian Brauner
lstra (Intel)" Suggested-by: Josh Triplett Signed-off-by: Christian Brauner --- /* v2 */ - Oleg Nesterov : - Remove the eagain_error and simple set to EAGAIN in kernel_waitid() if pidfd is non-blocking and no child process has yet exited. --- kernel/exit.c | 15 --- 1 fi

[PATCH v2 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

2020-09-02 Thread Christian Brauner
: Sargun Dhillon Cc: Oleg Nesterov Suggested-by: Josh Triplett Signed-off-by: Christian Brauner --- /* v2 */ - Christian Brauner : - Improve commit message. --- include/uapi/linux/pidfd.h | 12 kernel/pid.c | 12 +++- 2 files changed, 19 insertions(+), 5 deletions

[PATCH v2 0/4] Support non-blocking pidfds

2020-09-02 Thread Christian Brauner
! Christian [1]: https://lore.kernel.org/lkml/20200811181236.GA18763@localhost/ Christian Brauner (4): pidfd: support PIDFD_NONBLOCK in pidfd_open() exit: support non-blocking pidfds tests: port pidfd_wait to kselftest harness tests: add waitid() tests for non-blocking pidfds include/uapi

Re: [PATCH 1/2] seccomp: don't leak memory when filter install races

2020-09-02 Thread Christian Brauner
he > failure path when the filter is not attached, but it's a slow failure path > anyway. > > Fixes: 51891498f2da ("seccomp: allow TSYNC and USER_NOTIF together") > Reported-by: syzbot+3ad9614a12f80994c...@syzkaller.appspotmail.com > Signed-off-by: Tycho Andersen > --

Re: [PATCH v3 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-09-02 Thread Christian Brauner
ly > > following the mm_update_next_owner pattern. > > With the combination of (CLONE_VM && !CLONE_THREAD && !CLONE_VFORK) being > > quite rare, the regression is gone after the change is applied. > > > > Fixes: 44a70adec910 ("mm, oom_adj: make sure processes sharing mm have same > > view of oom_score_adj") > > Reported-by: Tim Murray > > Debugged-by: Minchan Kim > > Suggested-by: Michal Hocko > > Signed-off-by: Suren Baghdasaryan > > Acked-by: Michal Hocko Acked-by: Christian Brauner

Re: [PATCH] signal: clean up codestyle

2020-09-02 Thread Christian Brauner
On Wed, Sep 02, 2020 at 01:34:59AM +, linmiaohe wrote: > Christian Brauner wrote: > >On Tue, Sep 01, 2020 at 06:39:05PM +0200, Oleg Nesterov wrote: > >> On 09/01, Christian Brauner wrote: > >> > > >> > On Tue, Sep 01, 2020 at 07:58:00AM -0400, Miaoh

Re: [PATCH 2/2] mailmap, MAINTAINERS: move to tycho.pizza

2020-09-02 Thread Christian Brauner
t; -M: Tycho Andersen > +M: Tycho Andersen Honestly, I'm just acking this because I truly belive we need more pizza in the kernel: Acked-by: Christian Brauner Christian

Re: [PATCH] signal: clean up codestyle

2020-09-01 Thread Christian Brauner
On Tue, Sep 01, 2020 at 06:39:05PM +0200, Oleg Nesterov wrote: > On 09/01, Christian Brauner wrote: > > > > On Tue, Sep 01, 2020 at 07:58:00AM -0400, Miaohe Lin wrote: > > > No functional change intended. > > > > Hey Miaohe, > > > > Thank you f

Re: [PATCH 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

2020-09-01 Thread Christian Brauner
On Tue, Sep 01, 2020 at 06:23:10PM +0200, Oleg Nesterov wrote: > On 08/31, Christian Brauner wrote: > > > > --- /dev/null > > +++ b/include/uapi/linux/pidfd.h > > @@ -0,0 +1,12 @@ > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ >

Re: [PATCH 2/4] exit: support non-blocking pidfds

2020-09-01 Thread Christian Brauner
On Tue, Sep 01, 2020 at 06:11:54PM +0200, Oleg Nesterov wrote: > On 08/31, Christian Brauner wrote: > > > > --- a/kernel/exit.c > > +++ b/kernel/exit.c > > @@ -934,6 +934,7 @@ struct wait_opts { > > > > wait_queue_entry_t child_wait; >

Re: [PATCH v8 1/3] Add a new LSM-supporting anonymous inode interface

2020-09-01 Thread Christian Brauner
On Wed, Aug 26, 2020 at 11:35:20PM -0700, Lokesh Gidra wrote: > From: Daniel Colascione > > This change adds a new function, anon_inode_getfd_secure, that creates > anonymous-node file with individual non-S_PRIVATE inode to which security > modules can apply policy. Existing callers continue

Re: [PATCH] signal: clean up codestyle

2020-09-01 Thread Christian Brauner
On Tue, Sep 01, 2020 at 07:58:00AM -0400, Miaohe Lin wrote: > No functional change intended. Hey Miaohe, Thank you for the patch. I'm sure this is well-intended but afaict the whole file has more or less a consistent style already where e.g. sig-1 without spaces seems to be preferred. The same

Re: memory leak in do_seccomp

2020-09-01 Thread Christian Brauner
On Mon, Aug 31, 2020 at 07:14:59PM -0600, Tycho Andersen wrote: > On Mon, Aug 31, 2020 at 06:09:15PM -0600, Tycho Andersen wrote: > > On Mon, Aug 31, 2020 at 04:25:35PM -0700, Kees Cook wrote: > > > On Sun, Aug 30, 2020 at 08:50:15PM -0700, syzbot wrote: > > > > syzbot has found a reproducer for

[PATCH 2/4] exit: support non-blocking pidfds

2020-08-31 Thread Christian Brauner
: Thomas Gleixner Cc: Ingo Molnar Cc: Oleg Nesterov Cc: "Peter Zijlstra (Intel)" Suggested-by: Josh Triplett Signed-off-by: Christian Brauner --- kernel/exit.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index 73

[PATCH 3/4] tests: port pidfd_wait to kselftest harness

2020-08-31 Thread Christian Brauner
All of the new pidfd selftests already use the new kselftest harness infrastructure. It makes for clearer output, makes the code easier to understand, and makes adding new tests way simpler. Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- tools/testing

[PATCH 4/4] tests: add waitid() tests for non-blocking pidfds

2020-08-31 Thread Christian Brauner
: 3 / 3 tests passed. # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Cc: Shuah Khan Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- tools/testing/selftests/pidfd/pidfd.h | 4 ++ tools/testing/selftests/pidfd/pidfd_wait.c | 83

[PATCH 0/4] Support non-blocking pidfds

2020-08-31 Thread Christian Brauner
! Christian [1]: https://lore.kernel.org/lkml/20200811181236.GA18763@localhost/ Christian Brauner (4): pidfd: support PIDFD_NONBLOCK in pidfd_open() exit: support non-blocking pidfds tests: port pidfd_wait to kselftest harness tests: add waitid() tests for non-blocking pidfds include/uapi

[PATCH 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

2020-08-31 Thread Christian Brauner
/joshtriplett/async-pidfd Cc: Kees Cook Cc: Sargun Dhillon Cc: Oleg Nesterov Suggested-by: Josh Triplett Signed-off-by: Christian Brauner --- include/uapi/linux/pidfd.h | 12 kernel/pid.c | 12 +++- 2 files changed, 19 insertions(+), 5 deletions(-) create mode

LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-08-30 Thread Christian Brauner
r the container. The consensus seemed to have been to implement a first version of this and do performance testing to see what the performance impact of this change would be. Aleksa Sarai and Christian Brauner stated they were interested in taking on this work jointly. 3. Find a way

Re: [PATCH v8 3/4] mm/madvise: introduce process_madvise() syscall: an external memory hinting API

2020-08-28 Thread Christian Brauner
On Fri, Aug 28, 2020 at 8:24 PM Jens Axboe wrote: > > On 8/28/20 11:40 AM, Arnd Bergmann wrote: > > On Mon, Jun 22, 2020 at 9:29 PM Minchan Kim wrote: > >> So finally, the API is as follows, > >> > >> ssize_t process_madvise(int pidfd, const struct iovec *iovec, > >>unsigned

Re: [PATCH] MAINTAINERS: add namespace entry

2020-08-25 Thread Christian Brauner
On Tue, Aug 25, 2020 at 11:26:07AM -0500, Eric W. Biederman wrote: > > A) If we are going to have this discussion in public we really should >include the containers list. Ah, just used the output from get_maintainers.pl. > > B) The challenge is that most of the namespace work has become

[PATCH v2] MAINTAINERS: add namespace entry

2020-08-25 Thread Christian Brauner
and/or regular expressions over time. For now these entries here are sufficient. I intend to route this patch upstream soon. Cc: "Eric W. Biederman" Signed-off-by: Christian Brauner --- /* v2 */ - fix file ordering (passes cleanly through checkpatch.pl now) --- MAINTA

Re: [PATCH] MAINTAINERS: add namespace entry

2020-08-25 Thread Christian Brauner
On Tue, Aug 25, 2020 at 09:01:01AM -0700, Joe Perches wrote: > On Tue, 2020-08-25 at 17:41 +0200, Christian Brauner wrote: > > Namespace maintainership has never been formalized which has led to > > confusion > > when people need to determine where to send patches and who sh

[PATCH] MAINTAINERS: add namespace entry

2020-08-25 Thread Christian Brauner
and/or regular expressions over time. For now these entries here are sufficient. I intend to route this patch upstream soon. Cc: "Eric W. Biederman" Signed-off-by: Christian Brauner --- MAINTAINERS | 20 1 file changed, 20 insertions(+) diff --git a/MAINTAINERS b/M

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Christian Brauner
On Tue, Aug 25, 2020 at 07:24:34AM -0700, Suren Baghdasaryan wrote: > On Tue, Aug 25, 2020 at 4:15 AM Christian Brauner > wrote: > > > > On Mon, Aug 24, 2020 at 08:30:36AM -0700, Suren Baghdasaryan wrote: > > > Currently __set_oom_adj loops through all processes

Re: [PATCH v2 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-25 Thread Christian Brauner
On Mon, Aug 24, 2020 at 08:30:36AM -0700, Suren Baghdasaryan wrote: > Currently __set_oom_adj loops through all processes in the system to > keep oom_score_adj and oom_score_adj_min in sync between processes > sharing their mm. This is done for any task with more that one mm_users, > which

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 06:26:45PM +0200, Michal Hocko wrote: > On Thu 20-08-20 08:56:53, Suren Baghdasaryan wrote: > [...] > > Catching up on the discussion which was going on while I was asleep... > > So it sounds like there is a consensus that oom_adj should be moved to > > mm_struct rather

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 09:49:11AM -0500, Eric W. Biederman wrote: > Tetsuo Handa writes: > > > On 2020/08/20 23:00, Christian Brauner wrote: > >> On Thu, Aug 20, 2020 at 10:48:43PM +0900, Tetsuo Handa wrote: > >>> On 2020/08/20 22:34, Christian Brauner wrote:

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 10:48:43PM +0900, Tetsuo Handa wrote: > On 2020/08/20 22:34, Christian Brauner wrote: > > On Thu, Aug 20, 2020 at 03:26:31PM +0200, Michal Hocko wrote: > >> If you can handle vfork by other means then I am all for it. There were > >> no patches

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 02:41:09PM +0200, Michal Hocko wrote: > On Thu 20-08-20 13:42:56, Michal Hocko wrote: > > On Thu 20-08-20 13:30:23, Christian Brauner wrote: > [...] > > > trying to rely on set_bit() and test_bit() in copy_mm() being atomic and > > > then ca

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 03:26:31PM +0200, Michal Hocko wrote: > On Thu 20-08-20 07:54:44, Eric W. Biederman wrote: > > ebied...@xmission.com (Eric W. Biederman) writes: > > > > 2> Michal Hocko writes: > > > > > >> On Thu 20-08-20 07:34:41, Eric W. Biederman wrote: > > >>> Suren Baghdasaryan

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 01:29:32PM +0200, Michal Hocko wrote: > On Thu 20-08-20 13:13:55, Michal Hocko wrote: > > On Thu 20-08-20 12:55:56, Oleg Nesterov wrote: > > > On 08/19, Suren Baghdasaryan wrote: > > > > > > > > Since the combination of CLONE_VM and !CLONE_SIGHAND is rarely > > > > used the

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 01:13:49PM +0200, Michal Hocko wrote: > On Thu 20-08-20 12:55:56, Oleg Nesterov wrote: > > On 08/19, Suren Baghdasaryan wrote: > > > > > > Since the combination of CLONE_VM and !CLONE_SIGHAND is rarely > > > used the additional mutex lock in that path of the clone() syscall

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Thu, Aug 20, 2020 at 11:09:01AM +0200, Michal Hocko wrote: > On Thu 20-08-20 10:46:54, Christian Brauner wrote: > > On Wed, Aug 19, 2020 at 05:20:53PM -0700, Suren Baghdasaryan wrote: > > > Currently __set_oom_adj loops through all processes in the system to > &

Re: [PATCH 1/1] mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary

2020-08-20 Thread Christian Brauner
On Wed, Aug 19, 2020 at 05:20:53PM -0700, Suren Baghdasaryan wrote: > Currently __set_oom_adj loops through all processes in the system to > keep oom_score_adj and oom_score_adj_min in sync between processes > sharing their mm. This is done for any task with more that one mm_users, > which

Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-19 Thread Christian Brauner
On Wed, Aug 19, 2020 at 08:32:59AM -0500, Eric W. Biederman wrote: > Matthew Wilcox writes: > > > On Wed, Aug 19, 2020 at 10:45:56AM +0200, Christian Brauner wrote: > >> On Wed, Aug 19, 2020 at 09:43:40AM +0200, pet...@infradead.org wrote: > >> > On Tue, Aug 18,

[PATCH v2 01/11] fork: introduce kernel_clone()

2020-08-19 Thread Christian Brauner
() completely and will only be left with kernel_clone(). [1]: 9ba27414f2ec ("Merge tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux") Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Matthew Wilcox (Oracle) Cc: "Peter Zijlstra (Intel)" Signed-off-by: Christia

[PATCH v2 03/11] ia64: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- arch/ia64

[PATCH v2 05/11] nios2: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Ley Foon Tan Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- arch/nios2/kernel/process.c | 2 +- 1 file changed, 1

[PATCH v2 04/11] m68k: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Acked-by: Geert Uytterhoeven Cc: Kars de Jong Cc: linux-m...@lists.linux-m68k.org Signed-off-by: Christian Brauner --- /* v2

[PATCH v2 11/11] sched: remove _do_fork()

2020-08-19 Thread Christian Brauner
Now that all callers of _do_fork() have been switched to kernel_clone() remove the _do_fork() helper. Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- include/linux/sched/task.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/sched/task.h b/include/linux/sched

[PATCH v2 06/11] sparc: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- arch/sp

[PATCH v2 07/11] x86: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Signed-off-by: Christian Brauner --- /* v2 */ unchanged

[PATCH v2 09/11] kgdbts: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
...@lists.sourceforge.net Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- drivers/misc/kgdbts.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index d5d2af4d10e6..945701bce553 100644

[PATCH v2 10/11] tracing: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
Molnar Cc: Steven Rostedt Cc: Xiao Yang Cc: Tom Zanussi Cc: linux-...@vger.kernel.org Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- /* v2 */ unchanged --- Documentation/trace/histogram.rst | 4 ++-- samples/kprobes/kretprobe_example.c

[PATCH v2 08/11] kprobes: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Mauro Carvalho Chehab Cc: Alexandre Chartre Cc: Jonathan Corbet Cc: Masami Hiramatsu Signed-off-by: Christian Brauner --- /* v2

[PATCH v2 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-19 Thread Christian Brauner
a full git rebase v5.9-rc1 -x "make -j31". There were no built failures and the changes were fairly mechanical. The only helpers we have left now are kernel_thread() and kernel_clone() where kernel_thread() just calls kernel_clone(). Thanks! Christian Christian Brauner (11): fork:

[PATCH v2 02/11] h8300: switch to kernel_clone()

2020-08-19 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Greentime Hu Cc: Yoshinori Sato Cc: uclinux-h8-de...@lists.sourceforge.jp Signed-off-by: Christian Brauner --- /* v2 */ unchanged

Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-19 Thread Christian Brauner
On Wed, Aug 19, 2020 at 09:43:40AM +0200, pet...@infradead.org wrote: > On Tue, Aug 18, 2020 at 06:44:47PM +0100, Matthew Wilcox wrote: > > On Tue, Aug 18, 2020 at 07:34:00PM +0200, Christian Brauner wrote: > > > The only remaining function callable outside of kernel/fork.c

Re: [PATCH 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-18 Thread Christian Brauner
On Tue, Aug 18, 2020 at 06:44:47PM +0100, Matthew Wilcox wrote: > On Tue, Aug 18, 2020 at 07:34:00PM +0200, Christian Brauner wrote: > > The only remaining function callable outside of kernel/fork.c is > > _do_fork(). It doesn't really follow the naming of kernel-internal >

[PATCH 04/11] m68k: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Kars de Jong Cc: Geert Uytterhoeven Cc: linux-m...@lists.linux-m68k.org Signed-off-by: Christian Brauner --- arch/m68k/kernel

[PATCH 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-18 Thread Christian Brauner
nel_thread() and kernel_clone() where kernel_thread() just calls kernel_clone(). Thanks! Christian Christian Brauner (11): fork: introduce kernel_clone() h8300: switch to kernel_clone() ia64: switch to kernel_clone() m68k: switch to kernel_clone() nios2: switch to kernel_clone() sparc: switch to ke

[PATCH 02/11] h8300: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Greentime Hu Cc: Yoshinori Sato Cc: uclinux-h8-de...@lists.sourceforge.jp Signed-off-by: Christian Brauner --- arch/h8300/kernel

[PATCH 08/11] kprobes: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Mauro Carvalho Chehab Cc: Alexandre Chartre Cc: Jonathan Corbet Cc: Masami Hiramatsu Signed-off-by: Christian Brauner --- samples

[PATCH 11/11] sched: remove _do_fork()

2020-08-18 Thread Christian Brauner
Now that all callers of _do_fork() have been switched to kernel_clone() remove the _do_fork() helper. Signed-off-by: Christian Brauner --- include/linux/sched/task.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h index d9ef07359c96

[PATCH 09/11] kgdbts: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
...@lists.sourceforge.net Signed-off-by: Christian Brauner --- drivers/misc/kgdbts.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index d5d2af4d10e6..945701bce553 100644 --- a/drivers/misc/kgdbts.c +++ b

[PATCH 10/11] tracing: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
Molnar Cc: Steven Rostedt Cc: Xiao Yang Cc: Tom Zanussi Cc: linux-...@vger.kernel.org Cc: linux-kselft...@vger.kernel.org Signed-off-by: Christian Brauner --- Documentation/trace/histogram.rst | 4 ++-- samples/kprobes/kretprobe_example.c| 4 ++-- .../ftrace

[PATCH 05/11] nios2: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Ley Foon Tan Signed-off-by: Christian Brauner --- arch/nios2/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 01/11] fork: introduce kernel_clone()

2020-08-18 Thread Christian Brauner
remove _do_fork() completely and will only be left with kernel_clone(). [1]: 9ba27414f2ec ("Merge tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux") Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "Peter Zijlstra (Intel)" Signed-off-by: Christian Brauner

[PATCH 06/11] sparc: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Christian Brauner --- arch/sparc/kernel/process.c | 6 +++-

[PATCH 07/11] x86: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Signed-off-by: Christian Brauner --- arch/x86/kernel

[PATCH 03/11] ia64: switch to kernel_clone()

2020-08-18 Thread Christian Brauner
The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Cc: Tony Luck Cc: Fenghua Yu Cc: linux-i...@vger.kernel.org Signed-off-by: Christian Brauner --- arch/ia64/kernel/process.c | 4 ++-- 1

Re: [RFC PATCH 00/30] ima: Introduce IMA namespace

2020-08-18 Thread Christian Brauner
On Tue, Aug 18, 2020 at 05:20:07PM +0200, krzysztof.struczyn...@huawei.com wrote: > From: Krzysztof Struczynski > > IMA has not been designed to work with containers. It handles every > process in the same way, and it cannot distinguish if a process belongs to > a container or not. > >

<    1   2   3   4   5   6   7   8   9   10   >