Re: [PATCH 06/23] mnt: Use generic ns_common::count

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 02:59:52PM +0300, Kirill Tkhai wrote: > Convert mount namespace to use generic counter. > > Signed-off-by: Kirill Tkhai > --- Looks good! Acked-by: Christian Brauner > fs/mount.h |3 +-- > fs/namespace.c |4 ++-- > 2 files change

Re: [PATCH 07/23] cgroup: Use generic ns_common::count

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 02:59:57PM +0300, Kirill Tkhai wrote: > Convert cgroup namespace to use generic counter. > > Signed-off-by: Kirill Tkhai > --- Looks good! Acked-by: Christian Brauner > include/linux/cgroup.h|5 ++--- > kernel/cgroup/cgroup.c|2 +

Re: [PATCH 08/23] time: Use generic ns_common::count

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 03:00:03PM +0300, Kirill Tkhai wrote: > Convert time namespace to use generic counter. > > Signed-off-by: Kirill Tkhai > --- Looks good! Acked-by: Christian Brauner > include/linux/time_namespace.h |9 - > kernel/time/namespa

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 04:22:50PM +0100, Matthew Wilcox wrote: > On Mon, Jul 27, 2020 at 10:11:22AM -0700, Anthony Yznaga wrote: > > This patchset adds support for preserving an anonymous memory range across > > exec(3) using a new madvise MADV_DOEXEC argument. The primary benefit for > > sharing

Re: [RFC PATCH 0/5] madvise MADV_DOEXEC

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 04:34:50PM +0100, Matthew Wilcox wrote: > On Thu, Jul 30, 2020 at 05:27:05PM +0200, Christian Brauner wrote: > > On Thu, Jul 30, 2020 at 04:22:50PM +0100, Matthew Wilcox wrote: > > > On Mon, Jul 27, 2020 at 10:11:22AM -0700, Anthony Yznaga wrote: > >

Re: [PATCH 01/23] ns: Add common refcount into ns_common add use it as counter for net_ns

2020-07-30 Thread Christian Brauner
On Thu, Jul 30, 2020 at 05:07:05PM +0300, Kirill Tkhai wrote: > On 30.07.2020 16:35, Christian Brauner wrote: > > On Thu, Jul 30, 2020 at 02:59:25PM +0300, Kirill Tkhai wrote: > >> Currently, every type of namespaces has its own counter, > >> which is stored in ns-s

[PATCH net-next] ipv6/route: inherit max_sizes from current netns

2020-05-20 Thread Christian Brauner
e than the container it was created in. 4. Inherit the limit from the current network namespace. This to means we don't fully namespace max_sizes but allow the current network namespace to choose a limit it is comfortable with inheriting. [1]: https://nsec.io/ Signed-off-by: Christian Brau

Re: [PATCH net-next] ipv6/route: inherit max_sizes from current netns

2020-05-20 Thread Christian Brauner
On Wed, May 20, 2020 at 10:54:21AM -0600, David Ahern wrote: > On 5/20/20 8:58 AM, Christian Brauner wrote: > > During NorthSec (cf. [1]) a very large number of unprivileged > > containers and nested containers are run during the competition to > > provide a safe environment

Re: [PATCH net-next] ipv6/route: inherit max_sizes from current netns

2020-05-20 Thread Christian Brauner
On Wed, May 20, 2020 at 07:24:18PM +0200, Christian Brauner wrote: > On Wed, May 20, 2020 at 10:54:21AM -0600, David Ahern wrote: > > On 5/20/20 8:58 AM, Christian Brauner wrote: > > > During NorthSec (cf. [1]) a very large number of unprivileged > > > containers an

Re: file metadata via fs API (was: [GIT PULL] Filesystem Information)

2020-08-11 Thread Christian Brauner
On Tue, Aug 11, 2020 at 09:05:22AM -0700, Linus Torvalds wrote: > On Tue, Aug 11, 2020 at 8:30 AM Miklos Szeredi wrote: > > > > What's the disadvantage of doing it with a single lookup WITH an enabling > > flag? > > > > It's definitely not going to break anything, so no backward > > compatibility

Re: file metadata via fs API (was: [GIT PULL] Filesystem Information)

2020-08-11 Thread Christian Brauner
On Tue, Aug 11, 2020 at 09:31:05PM +0200, Lennart Poettering wrote: > On Di, 11.08.20 20:49, Miklos Szeredi (mik...@szeredi.hu) wrote: > > > On Tue, Aug 11, 2020 at 6:05 PM Linus Torvalds > > wrote: > > > > > and then people do "$(srctree)/". If you haven't seen that kind of > > > pattern where t

Re: pidfd and O_NONBLOCK

2020-08-11 Thread Christian Brauner
On Tue, Aug 11, 2020 at 11:12:36AM -0700, Josh Triplett wrote: > As far as I can tell, O_NONBLOCK has no effect on a pidfd. When calling > waitid on a pidfd for a running process, it always blocks unless you > provide WNOHANG. > > I don't think anything depends on that behavior. Would it be possib

Re: [Linux-kernel-mentees] [PATCH v3] ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info()

2020-08-01 Thread Christian Brauner
gt; $ _ > > > > include/uapi/linux/ptrace.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h > > index a71b6e3b03eb..83ee45fa634b 100644 > > --- a/include/uapi/linux/ptrace.

[GIT PULL] thread fix v5.8-rc8

2020-08-01 Thread Christian Brauner
Hey Linus, /* Summary */ This contains a simple spelling fix for dequeue_synchronous_signal(). /* Testing */ All patches have seen exposure in linux-next and are based on v5.8-rc7. /* Conflicts */ At the time of creating this pr no merge conflicts were reported. The following changes since comm

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 includes

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 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 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 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 writ

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 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 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 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 than

Re: [GIT PULL] fork cleanup for v5.9

2020-08-05 Thread Christian Brauner
On Wed, Aug 05, 2020 at 05:17:08PM +0200, Christian Brauner wrote: > On Wed, Aug 05, 2020 at 09:31:28AM +0100, Christoph Hellwig wrote: > > On Tue, Aug 04, 2020 at 01:28:01PM +0200, Christian Brauner wrote: > > > High-level this does two main things: > > > 1. Remov

Re: [GIT PULL] fork cleanup for v5.9

2020-08-05 Thread Christian Brauner
On Tue, Aug 04, 2020 at 02:56:04PM -0700, Linus Torvalds wrote: > On Tue, Aug 4, 2020 at 4:28 AM Christian Brauner > wrote: > > > > This is a series announced some time back (cf. [2]) when we reworked a > > chunk of > > the process creation paths in the kernel and s

Re: [GIT PULL] fork cleanup for v5.9

2020-08-05 Thread Christian Brauner
On Wed, Aug 05, 2020 at 09:31:28AM +0100, Christoph Hellwig wrote: > On Tue, Aug 04, 2020 at 01:28:01PM +0200, Christian Brauner wrote: > > High-level this does two main things: > > 1. Remove the double export of both do_fork() and _do_fork() where do_fork() > >used t

Re: [PATCH] binder: Remove bogus warning on failed same-process transaction

2020-08-07 Thread Christian Brauner
x27;s > just remove it. > > Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds") > Reported-by: syzbot+e113a0b970b7b3f39...@syzkaller.appspotmail.com > Signed-off-by: Jann Horn > --- Acked-by: Christian Brauner Thanks! Christian

Re: [PATCH] net/scm: Fix typo in SCM_RIGHTS compat refactoring

2020-08-07 Thread Christian Brauner
gularize compat handling of > scm_detach_fds()") > Signed-off-by: Kees Cook > --- Oh fun, Acked-by: Christian Brauner Thanks for fixing this quickly, Kees! I already built stuff on top of the notifier fd injection work we did this cycle so it's great that we don't have to revert

Re: [PATCH 01/17] exec: Move unshare_files to fix posix file locking during exec

2020-08-18 Thread Christian Brauner
org.uk > [14] https://lkml.kernel.org/r/20180827174722.3723-1-jlay...@kernel.org > [15] https://lkml.kernel.org/r/20180830172423.21964-1-jlay...@kernel.org > [16] https://lkml.kernel.org/r/20180914105310.6454-1-jlay...@kernel.org > [17] https://lkml.kernel.org/r/87a7ohs5ow@xmission.com > [18] https://lkml.kernel.org/r/87pn8c1uj6.fsf...@x220.int.ebiederm.org > Signed-off-by: "Eric W. Biederman" > --- Slightly scary change but it solves a problem. Acked-by: Christian Brauner

Re: [PATCH 02/17] exec: Simplify unshare_files

2020-08-18 Thread Christian Brauner
efore returning from unshare_files. > > Signed-off-by: "Eric W. Biederman" > --- Looks good. Acked-by: Christian Brauner

Re: [PATCH 03/17] exec: Remove reset_files_struct

2020-08-18 Thread Christian Brauner
On Mon, Aug 17, 2020 at 05:04:11PM -0500, Eric W. Biederman wrote: > Now that exec no longer needs to restore the previous value of current->files > on error there are no more callers of reset_files_struct so remove it. > > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 15/17] file: In f_dupfd read RLIMIT_NOFILE once.

2020-08-18 Thread Christian Brauner
fd. As f_dupfd is the only > caller of alloc_fd this changing alloc_fd is trivially safe. > > Further this causes alloc_fd to take all of the same arguments as > __alloc_fd except for the files_struct argument. > > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 14/17] file: Merge __fd_install into fd_install

2020-08-18 Thread Christian Brauner
fd_install() for binder") > [2] 44d8047f1d87 ("binder: use standard functions to allocate fds") > Signed-off-by: "Eric W. Biederman" > --- +1 on __fd_install() going away. Acked-by: Christian Brauner

Re: [PATCH 16/17] file: Merge __alloc_fd into alloc_fd

2020-08-18 Thread Christian Brauner
44d8047f1d87 ("binder: use standard functions to allocate fds") > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 17/17] file: Rename __close_fd to close_fd and remove the files parameter

2020-08-18 Thread Christian Brauner
r-related part of close() to file.c") > [2] 44d8047f1d87 ("binder: use standard functions to allocate fds") > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 08/17] proc/fd: In proc_fd_link use fcheck_task

2020-08-18 Thread Christian Brauner
performance. > > Using fcheck_task instead of get_files_struct simplifies proc_fd_link by > removing unnecessary locking, and reference counting. > > [1] https://lkml.kernel.org/r/20180915160423.ga31...@redhat.com > Suggested-by: Oleg Nesterov > Signed-off-by: "Eric W. Bied

Re: [PATCH 07/17] proc/fd: In tid_fd_mode use fcheck_task

2020-08-18 Thread Christian Brauner
performance. > > Using fcheck_task instead of get_files_struct clarifies tid_fd_mode by > removing a step. > > [1] https://lkml.kernel.org/r/20180915160423.ga31...@redhat.com > Suggested-by: Oleg Nesterov > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 06/17] file: Implement fcheck_task

2020-08-18 Thread Christian Brauner
On Mon, Aug 17, 2020 at 05:04:14PM -0500, Eric W. Biederman wrote: > As a companion to fget_task implement fcheck_task for use for querying > a process about a specific file. > > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 13/17] file: Remove get_files_struct

2020-08-18 Thread Christian Brauner
d-by: Oleg Nesterov > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 12/17] proc/fd: In fdinfo seq_show don't use get_files_struct

2020-08-18 Thread Christian Brauner
gt; count. > > [1] https://lkml.kernel.org/r/20180915160423.ga31...@redhat.com > Suggested-by: Oleg Nesterov > Signed-off-by: "Eric W. Biederman" > --- Acked-by: Christian Brauner

Re: [PATCH 09/17] file: Implement fnext_task

2020-08-18 Thread Christian Brauner
On Mon, Aug 17, 2020 at 06:17:35PM -0700, Linus Torvalds wrote: > On Mon, Aug 17, 2020 at 6:06 PM Eric W. Biederman > wrote: > > > > I struggle with the fcheck name as I have not seen or at least not > > registed on the the user that just checks to see if the result is NULL. > > So the name fchec

Re: [PATCH -next] binderfs: make symbol 'binderfs_fs_parameters' static

2020-08-18 Thread Christian Brauner
f binderfs.c, so this commit > marks it static. > > Fixes: 095cf502b31e ("binderfs: port to new mount api") > Reported-by: Hulk Robot > Signed-off-by: Wei Yongjun > --- Thanks! Acked-by: Christian Brauner

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. > > Containe

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. > > Containe

[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

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

2020-08-18 Thread Christian Brauner
ne, we can 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-b

[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 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 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 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 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 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 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 00/11] Introduce kernel_clone(), kill _do_fork()

2020-08-18 Thread Christian Brauner
el_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

[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

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 &g

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 is &g

[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

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

2020-08-19 Thread Christian Brauner
ctures I have done 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 B

[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 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 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 --- a

[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 01/11] fork: introduce kernel_clone()

2020-08-19 Thread Christian Brauner
e _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: Matthew Wilcox (Oracle) Cc: "Peter Zijlstra (Intel)" Sig

[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

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,

Re: [PATCH] kthread: remove comments about old _do_fork() helper

2021-01-11 Thread Christian Brauner
On Mon, Jan 11, 2021 at 06:48:07PM +0800, yanfei...@windriver.com wrote: > From: Yanfei Xu > > The old _do_fork() helper has been removed in favor of kernel_clone(). > Here correct some comments which still contain _do_fork() > > Signed-off-by: Yanfei Xu > --- Acked-

Re: [PATCH] files: rcu free files_struct

2020-12-10 Thread Christian Brauner
On Thu, Dec 10, 2020 at 09:36:24PM +, Al Viro wrote: > On Thu, Dec 10, 2020 at 01:29:01PM -0600, Eric W. Biederman wrote: > > Al Viro writes: > > > > What are the users of that thing and is there any chance to replace it > > > with something saner? IOW, what *is* realistically called for eac

Re: [patch] close_range.2: new page documenting close_range(2)

2020-12-12 Thread Christian Brauner
On Thu, Dec 10, 2020 at 03:36:42PM +0100, Alejandro Colomar (man-pages) wrote: > Hi Christian, Hi Alex, > > Thanks for confirming that behavior. Seems reasonable. > > I was wondering... > If this call is equivalent to unshare(2)+{close(2) in a loop}, > shouldn't it fail for the same reasons th

Re: [PATCH v2] close_range.2: new page documenting close_range(2)

2020-12-12 Thread Christian Brauner
On Thu, Dec 10, 2020 at 01:24:28AM +0100, Alejandro Colomar (man-pages) wrote: > Hi Stephen, > > A few more comments below. > > Michael, please have a look at them too. > > Christian, do you have any program that you used to test the syscall > that could be added as an example program to the pag

Re: [PATCH] Kernel: Fixed two bracket problems in fork.c

2020-12-21 Thread Christian Brauner
On Mon, Dec 21, 2020 at 04:05:02PM +0100, Alexander Guril wrote: > This fixes two bracket problems in kernel/fork.c > > Signed-off-by: Alexander Guril > --- Thanks for the patch. Unfortunately, there's no real rationale for the change in the commit message. You probably want to mention that our

Re: [PATCH pidfd] signal: Add missing __user annotation to copy_siginfo_from_user_any

2020-12-07 Thread Christian Brauner
On Mon, Dec 07, 2020 at 01:02:52AM +0100, Jann Horn wrote: > copy_siginfo_from_user_any() takes a userspace pointer as second > argument; annotate the parameter type accordingly. > > Signed-off-by: Jann Horn > --- > I'm messing around with clang's version of __user annotation checking > and it sp

Re: [PATCH] signal: propagate __user annotations properly

2020-12-07 Thread Christian Brauner
On Mon, Dec 07, 2020 at 01:36:10PM +0100, Lukas Bulwahn wrote: > Commit 3eb39f47934f ("signal: add pidfd_send_signal() syscall") introduced > copy_siginfo_from_user_any(), but missed to add the __user annotation to > the user pointer that is passed as second argument. > > Hence, when copy_siginfo_

Re: [PATCH] sh: Remove unused HAVE_COPY_THREAD_TLS macro

2021-01-19 Thread Christian Brauner
On Mon, Oct 12, 2020 at 11:50:24AM +0800, Jinyang He wrote: > Fixes:e1cc9d8d596e ("sh: switch to copy_thread_tls()") > Signed-off-by: Jinyang He > --- Acked-by: Christian Brauner weird that I missed to remove this during the conversion. Thanks! Christian

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Christian Brauner
, we > >> currently don't have any other global attributes > >> that we are planning to expose but those could of > >> course come up in the future. > > > > Ah, I missed the fact that this is a kobj_attribute, not a > > device_attribute. Maybe KERNEL

Bug in __mmdrop() triggered by io-uring on v5.11-rc1

2020-12-28 Thread Christian Brauner
Hey everyone, The following oops can be triggered on a pristine v5.11-rc1 which I discovered while rebasing my idmapped mount patchset onto v5.11-rc1: [ 577.716339][ T7216] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009)/LXD, BIOS 0.0.0 02/06/2015 [ 577.718584][ T7216] Call Trace: [ 577.71

Re: [PATCH] Kernel: fork.c: Fix coding style: Do not use {} around single-line statements

2020-12-29 Thread Christian Brauner
On Sat, Dec 26, 2020 at 12:40:21PM +0100, Alexander Guril wrote: > Fixed two coding style issues in kernel/fork.c > Do not use {} around single-line statements. > > Signed-off-by: Alexander Guril > --- Acked-by: Christian Brauner I'll pick this up, thanks!

Re: Bug in __mmdrop() triggered by io-uring on v5.11-rc1

2020-12-29 Thread Christian Brauner
On Mon, Dec 28, 2020 at 05:00:53PM -0700, Jens Axboe wrote: > On 12/28/20 9:54 AM, Christian Brauner wrote: > > Hey everyone, > > > > The following oops can be triggered on a pristine v5.11-rc1 which I > > discovered > > while rebasing my idmap

Re: split receive_fd_replace from __receive_fd

2021-03-25 Thread Christian Brauner
On Thu, Mar 25, 2021 at 09:22:08AM +0100, Christoph Hellwig wrote: > The receive_fd_replace case shares almost no logic with the more general > __receive_fd case, so split it into a separate function. > > BTW, I'm not sure if receive_fd_replace is such a useful primitive to > start with, why not j

[PATCH] fanotify_user: use upper_32_bits() to verify mask

2021-03-25 Thread Christian Brauner
From: Christian Brauner I don't see an obvious reason why the upper 32 bit check needs to be open-coded this way. Switch to upper_32_bits() which is more idiomatic and should conceptually be the same check. Cc: Amir Goldstein Cc: Jan Kara Signed-off-by: Christian Brauner --- fs/n

Re: [PATCH v4 08/11] evm: Allow setxattr() and setattr() for unmodified metadata

2021-03-25 Thread Christian Brauner
On Thu, Mar 25, 2021 at 10:53:43AM +, Roberto Sassu wrote: > > From: Roberto Sassu > > Sent: Friday, March 5, 2021 4:19 PM > > With the patch to allow xattr/attr operations if a portable signature > > verification fails, cp and tar can copy all xattrs/attrs so that at the > > end of the process

Re: [PATCH v4 08/11] evm: Allow setxattr() and setattr() for unmodified metadata

2021-03-25 Thread Christian Brauner
On Thu, Mar 25, 2021 at 01:13:41PM +0100, Christian Brauner wrote: > On Thu, Mar 25, 2021 at 10:53:43AM +, Roberto Sassu wrote: > > > From: Roberto Sassu > > > Sent: Friday, March 5, 2021 4:19 PM > > > With the patch to allow xattr/attr operations if a portabl

Re: [PATCH] fs/dcache: fix typos and sentence disorder

2021-03-18 Thread Christian Brauner
On Thu, Mar 18, 2021 at 04:35:34PM +, Al Viro wrote: > On Thu, Mar 18, 2021 at 03:00:20PM +, Matthew Wilcox wrote: > > On Thu, Mar 18, 2021 at 10:31:53PM +0800, Xiaofeng Cao wrote: > > > change 'sould' to 'should' > > > change 'colocated' to 'collocated' > > > > uh. collocated is incorrec

Re: seccomp: Delay filter activation

2021-03-19 Thread Christian Brauner
On Thu, Mar 18, 2021 at 08:39:13PM +, Sargun Dhillon wrote: > On Thu, Mar 18, 2021 at 03:54:54PM +0100, Christian Brauner wrote: > > Sorry, I just found that mail. > > > > On Mon, Mar 01, 2021 at 03:44:06PM -0800, Kees Cook wrote: > > > On Mon, Mar 01, 2021

Re: [PATCH 1/3] posic_acl: Add a helper determine if SGID should be cleared

2021-03-20 Thread Christian Brauner
On Fri, Mar 19, 2021 at 11:42:48PM +0100, Andreas Grünbacher wrote: > Hi, > > Am Fr., 19. März 2021 um 20:58 Uhr schrieb Vivek Goyal : > > posix_acl_update_mode() determines what's the equivalent mode and if SGID > > needs to be cleared or not. I need to make use of this code in fuse > > as well.

Re: [PATCH] kernel/signal: Modify the comment of function check_kill_permission

2021-03-23 Thread Christian Brauner
On Tue, Mar 23, 2021 at 01:03:56AM -0700, zhouchuangao wrote: > Maybe it's easier for us to understand the function of > check_kill_permission. > > Signed-off-by: zhouchuangao > --- > kernel/signal.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/kernel/signal.c

Re: [PATCH] kernel/sys.c: Fix a typo

2021-03-23 Thread Christian Brauner
On Tue, Mar 23, 2021 at 06:49:09AM +0530, Bhaskar Chowdhury wrote: > > s/concurent/concurrent/ > > Signed-off-by: Bhaskar Chowdhury > --- Looks good, Reviewed-by: Christian Brauner

Re: [PATCH] hfs/hfsplus: use WARN_ON for sanity check

2021-03-23 Thread Christian Brauner
/* panic? */; > | ^ > > panic() is probably not the correct choice here, but a WARN_ON > seems appropriate and avoids the compile-time warning. > > Signed-off-by: Arnd Bergmann > --- Thanks! Reviewed-by: Christian Brauner

Re: [PATCH 1/3] posic_acl: Add a helper determine if SGID should be cleared

2021-03-23 Thread Christian Brauner
On Mon, Mar 22, 2021 at 01:01:11PM -0400, Vivek Goyal wrote: > On Sat, Mar 20, 2021 at 11:03:22AM +0100, Christian Brauner wrote: > > On Fri, Mar 19, 2021 at 11:42:48PM +0100, Andreas Grünbacher wrote: > > > Hi, > > > > > > Am Fr., 19. März 2

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Christian Brauner
On Mon, Mar 22, 2021 at 03:33:38PM -0700, Darrick J. Wong wrote: > On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > > There's a substantial amount of boilerplate in filesystems handling > > FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. > > > > Also due to userspace buffers bein

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Christian Brauner
On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > There's a substantial amount of boilerplate in filesystems handling > FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. > > Also due to userspace buffers being involved in the ioctl API this is > difficult to stack, as shown by overl

Re: [PATCH v6 09/40] xattr: handle idmapped mounts

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 01:24:02PM +, David Howells wrote: > Christian Brauner wrote: > > > diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c > > index 72e42438f3d7..a591b5e09637 100644 > > --- a/fs/cachefiles/xattr.c > > +++ b/fs/cachefiles/xat

Re: [PATCH v6 09/40] xattr: handle idmapped mounts

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 02:45:07PM +, David Howells wrote: > Christian Brauner wrote: > > > In order to answer this more confidently I need to know a bit more about > > how cachefiles are supposed to work. > > > > From what I gather here it seemed what this cod

Re: [GIT PULL] idmapped mounts for v5.12

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 01:36:31PM -0600, Eric W. Biederman wrote: > Christian Brauner writes: > > > Hi Linus, Hi Eric, > > > This series comes with an extensive xfstests suite covering both ext4 and > > xfs > > https://git.kernel.org/brauner/xfstests-de

Re: [PATCH] posix-acl: avoid -Wempty-body warning

2021-03-22 Thread Christian Brauner
st architectures, we could just drop the if() entirely, but > in some cases this causes a different warning. And you don't see the warning for the second unconditional cmpxchg(p, sentinel, ACL_NOT_CACHED); below? > > Signed-off-by: Arnd Bergmann > --- In any case that should be fine, Reviewed-by: Christian Brauner

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