[PATCH v2 6/7] signal: Factor out a helper function to process task_struct exit_code

2015-03-15 Thread Josh Triplett
do_notify_parent includes the code to convert the exit_code field of struct task_struct to the code and status fields that accompany SIGCHLD. Factor that out into a new helper function task_exit_code_status, to allow other methods of task exit notification to share that code. Signed-off-by: Josh

[PATCH v2 7/7] clone4: Add a CLONE_FD flag to get task exit notification via fd

2015-03-15 Thread Josh Triplett
handler or a signalfd. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- include/linux/compat.h | 2 + include/linux/sched.h | 5 ++ include/uapi/linux/sched.h | 16 +- init/Kconfig | 11 + kernel/Makefile| 1 + kernel/clonefd.c

[PATCH v2 3/7] Introduce a new clone4 syscall with more flag bits and extensible arguments

2015-03-15 Thread Josh Triplett
Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- arch/x86/ia32/ia32entry.S | 1 + arch/x86/kernel/entry_64.S| 1 + arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 2 ++ include/linux/compat.h| 12 + include/uapi/a

[PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process

2015-03-15 Thread Josh Triplett
process's signal handling or wait loop. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- include/linux/sched.h | 2 ++ include/uapi/linux/sched.h | 7 ++- kernel/fork.c | 2 ++ kernel/signal.c| 2 ++ 4 files changed, 12 insertions(+), 1 deletion

[PATCH v2 1/7] clone: Support passing tls argument via C rather than pt_regs magic

2015-03-15 Thread Josh Triplett
to sys_clone in favor of the pt_regs captured at kernel entry, and thus will be unable to introduce new versions of the clone syscall. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira Acked-by: Andy Lutomirski --- arch/Kconfig | 7 ++ include/linux/sched.h| 14

[PATCH v2 2/7] x86: Opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit

2015-03-15 Thread Josh Triplett
For 32-bit userspace on a 64-bit kernel, this requires modifying stub32_clone to actually swap the appropriate arguments to match CONFIG_CLONE_BACKWARDS, rather than just leaving the C argument for tls broken. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira Acked-by: Andy Lutomirski

[PATCH v2 0/7] CLONE_FD: Task exit notification via file descriptor

2015-03-15 Thread Josh Triplett
e portable. SEE ALSO clone(2), epoll(7), poll(2), pthreads(7), read(2), select(2) Linux 2015-03-14 CLONE4(2) Josh Triplett and Thiago Macieira (7): clone: Support passing tls argument via C rather than pt_regs magic

[PATCH v2 2/7] x86: Opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit

2015-03-15 Thread Josh Triplett
For 32-bit userspace on a 64-bit kernel, this requires modifying stub32_clone to actually swap the appropriate arguments to match CONFIG_CLONE_BACKWARDS, rather than just leaving the C argument for tls broken. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira

[PATCH v2 1/7] clone: Support passing tls argument via C rather than pt_regs magic

2015-03-15 Thread Josh Triplett
to sys_clone in favor of the pt_regs captured at kernel entry, and thus will be unable to introduce new versions of the clone syscall. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com Acked-by: Andy Lutomirski l...@kernel.org --- arch/Kconfig

[PATCH v2 6/7] signal: Factor out a helper function to process task_struct exit_code

2015-03-15 Thread Josh Triplett
do_notify_parent includes the code to convert the exit_code field of struct task_struct to the code and status fields that accompany SIGCHLD. Factor that out into a new helper function task_exit_code_status, to allow other methods of task exit notification to share that code. Signed-off-by: Josh

[PATCH v2 7/7] clone4: Add a CLONE_FD flag to get task exit notification via fd

2015-03-15 Thread Josh Triplett
handler or a signalfd. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- include/linux/compat.h | 2 + include/linux/sched.h | 5 ++ include/uapi/linux/sched.h | 16 +- init/Kconfig | 11 + kernel

[PATCH v2 3/7] Introduce a new clone4 syscall with more flag bits and extensible arguments

2015-03-15 Thread Josh Triplett
-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- arch/x86/ia32/ia32entry.S | 1 + arch/x86/kernel/entry_64.S| 1 + arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 2 ++ include/linux/compat.h

[PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process

2015-03-15 Thread Josh Triplett
process's signal handling or wait loop. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- include/linux/sched.h | 2 ++ include/uapi/linux/sched.h | 7 ++- kernel/fork.c | 2 ++ kernel/signal.c| 2 ++ 4

[PATCH v2 man-pages] clone4.2: New manpage documenting clone4(2)

2015-03-15 Thread Josh Triplett
Also includes new cross-reference from clone.2. Signed-off-by: Josh Triplett j...@joshtriplett.org --- man2/clone.2 | 1 + man2/clone4.2 | 345 ++ 2 files changed, 346 insertions(+) create mode 100644 man2/clone4.2 diff --git a/man2

[PATCH v2 4/7] kernel/fork.c: Pass arguments to _do_fork and copy_process using clone4_args

2015-03-15 Thread Josh Triplett
structure initializers to only initialize the arguments they care about. Future extensions to clone4_args will thus not need to touch clone4, fork, vfork, or other callers of _do_fork. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- kernel

Re: [PATCH v2 0/7] CLONE_FD: Task exit notification via file descriptor

2015-03-15 Thread Josh Triplett
On Sun, Mar 15, 2015 at 12:59:17AM -0700, Josh Triplett wrote: This patch series also introduces a clone flag CLONE_AUTOREAP, which causes the kernel to automatically reap the child process when it exits, just as it does for processes using SIGCHLD when the parent has SIGCHLD ignored

Re: [PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-15 Thread Josh Triplett
On Sun, Mar 15, 2015 at 10:18:05AM +, David Drysdale wrote: On Sat, Mar 14, 2015 at 7:29 PM, Josh Triplett j...@joshtriplett.org wrote: On Sat, Mar 14, 2015 at 12:03:12PM -0700, Thiago Macieira wrote: On Friday 13 March 2015 18:11:32 Thiago Macieira wrote: On Friday 13 March 2015 14:51

[PATCH v2 0/7] CLONE_FD: Task exit notification via file descriptor

2015-03-15 Thread Josh Triplett
to be portable. SEE ALSO clone(2), epoll(7), poll(2), pthreads(7), read(2), select(2) Linux 2015-03-14 CLONE4(2) Josh Triplett and Thiago Macieira (7): clone: Support passing tls argument via C rather than pt_regs magic x86: Opt

Re: [PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process

2015-03-15 Thread Josh Triplett
On Sun, Mar 15, 2015 at 03:52:23PM +0100, Oleg Nesterov wrote: On 03/15, Josh Triplett wrote: Add a CLONE_AUTOREAP flag to request this behavior unconditionally, Yes, CLONE_AUTOREAP is much better. And I agree (mostly) with that we should rely on do_notify_parent(). Howver the patch

Re: [PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process

2015-03-15 Thread Josh Triplett
On Sun, Mar 15, 2015 at 08:55:06PM +0100, Oleg Nesterov wrote: On 03/15, Josh Triplett wrote: On Sun, Mar 15, 2015 at 03:52:23PM +0100, Oleg Nesterov wrote: On 03/15, Josh Triplett wrote: Add a CLONE_AUTOREAP flag to request this behavior unconditionally, Yes, CLONE_AUTOREAP

Re: [RFC PATCH] sys_membarrier(): system/process-wide memory barrier (x86) (v12)

2015-03-15 Thread Josh Triplett
(default y) in the EXPERT menu to disable this? You actually seem to already have it marked as a cond_syscall. Also, a very minor nit: flags in kernel APIs aren't typically named with a _FLAG suffix. With the syscall made optional, and with or without that naming nit fixed: Reviewed-by: Josh Triplett j

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 09:30:29PM +0100, Oleg Nesterov wrote: > On 03/14, Josh Triplett wrote: > > > > What I was proposing was that a task that isn't yet dead, but that is > > going to be autoreaped, is not eligible for waiting either. All the > > various wait* fam

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
So you'd pass a 0 signal, and CLONE_AUTOREAP. And then if you *want* the exit notification, you can get it via the file descriptor. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
to handle job control for a process without touching process-wide signal handling), but that can come later. > At the same time, if we add autoreap then probably it also makes sense to add > WEXITIED_UNLESS_AUTOREAP. Potentially, though for many applications you could also just pass a

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:47:21PM +0100, Oleg Nesterov wrote: > On 03/14, Oleg Nesterov wrote: > > > > On 03/14, Josh Triplett wrote: > > > > > > On Sat, Mar 14, 2015 at 11:38:29AM -0700, Thiago Macieira wrote: > > > > On Saturd

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:18:36PM +0100, Oleg Nesterov wrote: > On 03/14, Josh Triplett wrote: > > > > On Sat, Mar 14, 2015 at 11:38:29AM -0700, Thiago Macieira wrote: > > > On Saturday 14 March 2015 15:32:35 Oleg Nesterov wrote: > > > > It is not

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:24:56PM +0100, Oleg Nesterov wrote: > On 03/14, Josh Triplett wrote: > > > > On Sat, Mar 14, 2015 at 03:35:58PM +0100, Oleg Nesterov wrote: > > > On 03/12, Josh Triplett wrote: > > > > > > > > @@ -598,7 +600,9 @@

Re: [PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-14 Thread Josh Triplett
dedicated syscall, not an ioctl. It's unfortunate that rt_sigqueueinfo doesn't take a flags argument. However, I just realized that it takes a 32-bit "int" for the signal number, yet signal numbers fit in 8 bits. So we could just add flags in the high 24 bits of that argument,

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 03:35:58PM +0100, Oleg Nesterov wrote: > On 03/12, Josh Triplett wrote: > > > > @@ -598,7 +600,9 @@ static void exit_notify(struct task_struct *tsk, int > > group_dead) > > if (group_dead) > > kill_orph

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
nk we need to change wait_consider_task to early-return for ->autoreap just as it does for task_state == EXIT_DEAD. I'll do that in v2. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
as it does for task_state == EXIT_DEAD. I'll do that in v2. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-14 Thread Josh Triplett
in the high 24 bits of that argument, and in particular add a flag indicating that the first argument is a file descriptor rather than a PID. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 03:35:58PM +0100, Oleg Nesterov wrote: On 03/12, Josh Triplett wrote: @@ -598,7 +600,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead) if (group_dead) kill_orphaned_pgrp(tsk-group_leader, NULL); - if (unlikely(tsk

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:47:21PM +0100, Oleg Nesterov wrote: On 03/14, Oleg Nesterov wrote: On 03/14, Josh Triplett wrote: On Sat, Mar 14, 2015 at 11:38:29AM -0700, Thiago Macieira wrote: On Saturday 14 March 2015 15:32:35 Oleg Nesterov wrote: It is not clear to me what

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
, you can get it via the file descriptor. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:18:36PM +0100, Oleg Nesterov wrote: On 03/14, Josh Triplett wrote: On Sat, Mar 14, 2015 at 11:38:29AM -0700, Thiago Macieira wrote: On Saturday 14 March 2015 15:32:35 Oleg Nesterov wrote: It is not clear to me what do_wait() should do with -autoreap child

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 08:24:56PM +0100, Oleg Nesterov wrote: On 03/14, Josh Triplett wrote: On Sat, Mar 14, 2015 at 03:35:58PM +0100, Oleg Nesterov wrote: On 03/12, Josh Triplett wrote: @@ -598,7 +600,9 @@ static void exit_notify(struct task_struct *tsk, int group_dead

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
. Potentially, though for many applications you could also just pass a signal of 0 and avoid passing __WALL or __WCLONE. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-14 Thread Josh Triplett
On Sat, Mar 14, 2015 at 09:30:29PM +0100, Oleg Nesterov wrote: On 03/14, Josh Triplett wrote: What I was proposing was that a task that isn't yet dead, but that is going to be autoreaped, is not eligible for waiting either. All the various wait* familiy of system calls should pretend

Re: [PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-13 Thread Josh Triplett
On Fri, Mar 13, 2015 at 04:05:29PM +, David Drysdale wrote: > On Fri, Mar 13, 2015 at 1:40 AM, Josh Triplett wrote: > > This patch series introduces a new clone flag, CLONE_FD, which lets the > > caller > > handle child process exit notification via a file descriptor ra

Re: [PATCH 0/6] kbuild: mergeconfig: fix bugs, improve readability, and add generic entry point

2015-03-13 Thread Josh Triplett
objtree) > merge_config.sh: improve indentation > merge_config.sh: rename MAKE to RUNMAKE > kbuild: add generic mergeconfig target, %.config For all six: Reviewed-by: Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-13 Thread Josh Triplett
On Fri, Mar 13, 2015 at 04:05:29PM +, David Drysdale wrote: On Fri, Mar 13, 2015 at 1:40 AM, Josh Triplett j...@joshtriplett.org wrote: This patch series introduces a new clone flag, CLONE_FD, which lets the caller handle child process exit notification via a file descriptor rather

Re: [PATCH 0/6] kbuild: mergeconfig: fix bugs, improve readability, and add generic entry point

2015-03-13 Thread Josh Triplett
MAKE to RUNMAKE kbuild: add generic mergeconfig target, %.config For all six: Reviewed-by: Josh Triplett j...@joshtriplett.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] clone4.2: New manpage documenting clone4(2)

2015-03-12 Thread Josh Triplett
Also includes new cross-reference from clone.2. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- man2/clone.2 | 1 + man2/clone4.2 | 332 ++ 2 files changed, 333 insertions(+) create mode 100644 man2/clone4.2 diff

[PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-12 Thread Josh Triplett
it. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- include/linux/sched.h | 5 ++ include/uapi/linux/sched.h | 23 - init/Kconfig | 11 kernel/Makefile| 1 + kernel/clonefd.c | 123

[PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-12 Thread Josh Triplett
) is Linux-specific and should not be used in programs intended to be portable. SEE ALSO clone(2), epoll(7), poll(2), pthreads(7), read(2), select(2) Linux 2015-03-01 CLONE4(2) Josh Triplett and Thiago Macieira (6): clone: Suppo

[PATCH 1/6] clone: Support passing tls argument via C rather than pt_regs magic

2015-03-12 Thread Josh Triplett
to sys_clone in favor of the pt_regs captured at kernel entry, and thus will be unable to introduce new versions of the clone syscall. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- arch/Kconfig | 7 ++ include/linux/sched.h| 14 include/linux

[PATCH 4/6] signal: Factor out a helper function to process task_struct exit_code

2015-03-12 Thread Josh Triplett
do_notify_parent includes the code to convert the exit_code field of struct task_struct to the code and status fields that accompany SIGCHLD. Factor that out into a new helper function task_exit_code_status, to allow other methods of task exit notification to share that code. Signed-off-by: Josh

[PATCH 2/6] x86: Opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit

2015-03-12 Thread Josh Triplett
For 32-bit userspace on a 64-bit kernel, this requires modifying stub32_clone to actually swap the appropriate arguments to match CONFIG_CLONE_BACKWARDS, rather than just leaving the C argument for tls broken. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- arch/x86/Kconfig

[PATCH 5/6] fs: Make alloc_fd non-private

2015-03-12 Thread Josh Triplett
This allows callers to allocate a file descriptor with a defined minimum value, without directly calling the lower-level __alloc_fd. Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- fs/file.c| 2 +- include/linux/file.h | 1 + 2 files changed, 2 insertions(+), 1

[PATCH 3/6] Introduce a new clone4 syscall with more flag bits and extensible arguments

2015-03-12 Thread Josh Triplett
Signed-off-by: Josh Triplett Signed-off-by: Thiago Macieira --- arch/x86/ia32/ia32entry.S| 1 + arch/x86/kernel/entry_64.S | 1 + arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 2 ++ include/linux/compat.h | 12 include/uapi/lin

[PATCH 3/6] Introduce a new clone4 syscall with more flag bits and extensible arguments

2015-03-12 Thread Josh Triplett
-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- arch/x86/ia32/ia32entry.S| 1 + arch/x86/kernel/entry_64.S | 1 + arch/x86/syscalls/syscall_32.tbl | 1 + arch/x86/syscalls/syscall_64.tbl | 2 ++ include/linux/compat.h | 12

[PATCH 0/6] CLONE_FD: Task exit notification via file descriptor

2015-03-12 Thread Josh Triplett
-specific and should not be used in programs intended to be portable. SEE ALSO clone(2), epoll(7), poll(2), pthreads(7), read(2), select(2) Linux 2015-03-01 CLONE4(2) Josh Triplett and Thiago Macieira (6): clone: Support

[PATCH 1/6] clone: Support passing tls argument via C rather than pt_regs magic

2015-03-12 Thread Josh Triplett
to sys_clone in favor of the pt_regs captured at kernel entry, and thus will be unable to introduce new versions of the clone syscall. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- arch/Kconfig | 7 ++ include/linux

[PATCH 4/6] signal: Factor out a helper function to process task_struct exit_code

2015-03-12 Thread Josh Triplett
do_notify_parent includes the code to convert the exit_code field of struct task_struct to the code and status fields that accompany SIGCHLD. Factor that out into a new helper function task_exit_code_status, to allow other methods of task exit notification to share that code. Signed-off-by: Josh

[PATCH 2/6] x86: Opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit

2015-03-12 Thread Josh Triplett
For 32-bit userspace on a 64-bit kernel, this requires modifying stub32_clone to actually swap the appropriate arguments to match CONFIG_CLONE_BACKWARDS, rather than just leaving the C argument for tls broken. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira

[PATCH 5/6] fs: Make alloc_fd non-private

2015-03-12 Thread Josh Triplett
This allows callers to allocate a file descriptor with a defined minimum value, without directly calling the lower-level __alloc_fd. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- fs/file.c| 2 +- include/linux/file.h

[PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task exit notification via fd

2015-03-12 Thread Josh Triplett
it. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- include/linux/sched.h | 5 ++ include/uapi/linux/sched.h | 23 - init/Kconfig | 11 kernel/Makefile| 1 + kernel/clonefd.c

[PATCH] clone4.2: New manpage documenting clone4(2)

2015-03-12 Thread Josh Triplett
Also includes new cross-reference from clone.2. Signed-off-by: Josh Triplett j...@joshtriplett.org Signed-off-by: Thiago Macieira thiago.macie...@intel.com --- man2/clone.2 | 1 + man2/clone4.2 | 332 ++ 2 files changed, 333 insertions

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-22 Thread Josh Triplett
g about malicious compromise here; malicious code could just remove the write protection. However, write-protecting kernel read-only data also protects against a class of bugs. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-22 Thread Josh Triplett
. However, write-protecting kernel read-only data also protects against a class of bugs. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-21 Thread Josh Triplett
ommand line option, so that I don't > have > to recompile between measurements and thus am completely oranges-to-oranges) > > [0.031768] Write protecting the kernel read-only data: 10240k > > which, in percentage, is an 18% improvement. Nice improvement, but that suggests that w

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-21 Thread Josh Triplett
) [0.031768] Write protecting the kernel read-only data: 10240k which, in percentage, is an 18% improvement. Nice improvement, but that suggests that we're spending far too much time waiting on RCU grace periods at boot time. - Josh Triplett -- To unsubscribe from this list: send the line

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-20 Thread Josh Triplett
all_rcu() doesn't actually help if it still has to finish a grace period before it can allow later bits to run. Ideally, we ought to be able to work out the "depth" of boot in grace-periods. Has anyone wired initcall_debug up to a bootchart-like graph? - Josh Triplett -- To unsubscribe f

Re: [PATCH tip/core/rcu 0/4] Programmatic nestable expedited grace periods

2015-02-20 Thread Josh Triplett
it can allow later bits to run. Ideally, we ought to be able to work out the depth of boot in grace-periods. Has anyone wired initcall_debug up to a bootchart-like graph? - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: scsi: Implement per-cpu logging buffer

2015-02-15 Thread Josh Triplett
On Sat, Feb 14, 2015 at 03:29:37PM +0100, Hannes Reinecke wrote: > On 02/13/2015 04:45 PM, Josh Triplett wrote: > > On Fri, Feb 13, 2015 at 09:48:36AM +0100, Hannes Reinecke wrote: > >> On 02/12/2015 06:18 PM, Josh Triplett wrote: > >>> On Thu, Feb 12, 2015 at 02:

Re: scsi: Implement per-cpu logging buffer

2015-02-15 Thread Josh Triplett
On Sat, Feb 14, 2015 at 03:29:37PM +0100, Hannes Reinecke wrote: On 02/13/2015 04:45 PM, Josh Triplett wrote: On Fri, Feb 13, 2015 at 09:48:36AM +0100, Hannes Reinecke wrote: On 02/12/2015 06:18 PM, Josh Triplett wrote: On Thu, Feb 12, 2015 at 02:29:35PM +0100, Hannes Reinecke wrote

Re: scsi: Implement per-cpu logging buffer

2015-02-13 Thread Josh Triplett
On Fri, Feb 13, 2015 at 09:48:36AM +0100, Hannes Reinecke wrote: > On 02/12/2015 06:18 PM, Josh Triplett wrote: > > On Thu, Feb 12, 2015 at 02:29:35PM +0100, Hannes Reinecke wrote: > >> On 02/12/2015 01:36 PM, Geert Uytterhoeven wrote: > >>> On Wed, Feb 11, 2015 at

Re: scsi: Implement per-cpu logging buffer

2015-02-13 Thread Josh Triplett
On Fri, Feb 13, 2015 at 09:48:36AM +0100, Hannes Reinecke wrote: On 02/12/2015 06:18 PM, Josh Triplett wrote: On Thu, Feb 12, 2015 at 02:29:35PM +0100, Hannes Reinecke wrote: On 02/12/2015 01:36 PM, Geert Uytterhoeven wrote: On Wed, Feb 11, 2015 at 8:16 PM, Linux Kernel Mailing List linux

Re: scsi: Implement per-cpu logging buffer

2015-02-12 Thread Josh Triplett
ous CPUs overwriting each other and _not_ introduce additional > latency by locking a single buffer, then yes. > > We can possibly reduce it to, say, 1KiB or even lower by imposing > stricter rules on the logging functions. > But I don't see a way around the per-CPU buffer. It seems

Re: scsi: Implement per-cpu logging buffer

2015-02-12 Thread Josh Triplett
go away when !SMP, or !PRINTK, or if users don't actually care about message ordering. Also, this doesn't seem to be configurable at all. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 05/10] drivers/char: Support compiling out /dev/zero

2015-01-31 Thread Josh Triplett
llow those to be disabled at all, which saves even more > on Kconfig noise. Please don't. > > Personally, I'm hoping that we eventually end up with a disableable > > CONFIG_CHAR similar to CONFIG_BLOCK. > > If we ditch DEVMEM_RANDOM i.e. make certain devices undisableable then > it seems CONFIG_CHAR wouldn't be possible either. An excellent reason not to ditch it, then. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 05/10] drivers/char: Support compiling out /dev/zero

2015-01-31 Thread Josh Triplett
end up with a disableable CONFIG_CHAR similar to CONFIG_BLOCK. If we ditch DEVMEM_RANDOM i.e. make certain devices undisableable then it seems CONFIG_CHAR wouldn't be possible either. An excellent reason not to ditch it, then. - Josh Triplett -- To unsubscribe from this list: send the line

Re: [PATCH v2] kernel: Conditionally support non-root users, groups and capabilities

2015-01-30 Thread Josh Triplett
em that scales, such that if you need more functionality, you can turn on a few more options without rewriting all your code for another environment? Why not use an OS that will definitely run on your next piece of hardware too, without needing a total rewrite? I would hope that I'm preaching to the

Re: [PATCH v2] kernel: Conditionally support non-root users, groups and capabilities

2015-01-30 Thread Josh Triplett
>> Also, groups.c is compiled out completely. > >>> > >>> This change saves about 25 KB on a defconfig build. > >>> > >>> The kernel was booted in Qemu. All the common functionalities work. Adding > >>> users/groups is not possible, failing

Re: [PATCH v2] kernel: Conditionally support non-root users, groups and capabilities

2015-01-30 Thread Josh Triplett
) Signed-off-by: Iulia Manda iulia.mand...@gmail.com Reviewed-by: Josh Triplett j...@joshtriplett.org v2 does nothing to address the longstanding position of the community that disabling the traditional user based access controls is unacceptable. So far that longstanding position

Re: [PATCH v2] kernel: Conditionally support non-root users, groups and capabilities

2015-01-30 Thread Josh Triplett
for another environment? Why not use an OS that will definitely run on your next piece of hardware too, without needing a total rewrite? I would hope that I'm preaching to the choir here. Let's take a step back from the philosophy for a moment, and go back to reviewing code and patches. - Josh Triplett

Re: [PATCH] kernel: Conditionally support non-root users, groups and capabilities

2015-01-20 Thread Josh Triplett
On Tue, Jan 20, 2015 at 05:23:06PM -0800, Casey Schaufler wrote: > On 1/20/2015 4:50 PM, Josh Triplett wrote: > > On Tue, Jan 20, 2015 at 04:05:00PM -0800, Casey Schaufler wrote: > >> On 1/20/2015 3:33 PM, Iulia Manda wrote: > >>> There are a lot of embedde

Re: [PATCH] kernel: Conditionally support non-root users, groups and capabilities

2015-01-20 Thread Josh Triplett
gt; This change saves about 25 KB on a defconfig build. > > > > Bloat-o-meter output: > > add/remove: 7/66 grow/shrink: 21/421 up/down: 1701/-27172 (-25471) > > > > Signed-off-by: Iulia Manda > > Reviewed-by: Josh Triplett > > Authoritative LSM hook

Re: [PATCH] kernel: Conditionally support non-root users, groups and capabilities

2015-01-20 Thread Josh Triplett
(-25471) Signed-off-by: Iulia Manda iulia.mand...@gmail.com Reviewed-by: Josh Triplett j...@joshtriplett.org Authoritative LSM hooks were loudly rejected in or about 1999. One of the primary reasons they were rejected was because you could use them do exactly what this patch does, which

Re: [PATCH] kernel: Conditionally support non-root users, groups and capabilities

2015-01-20 Thread Josh Triplett
On Tue, Jan 20, 2015 at 05:23:06PM -0800, Casey Schaufler wrote: On 1/20/2015 4:50 PM, Josh Triplett wrote: On Tue, Jan 20, 2015 at 04:05:00PM -0800, Casey Schaufler wrote: On 1/20/2015 3:33 PM, Iulia Manda wrote: There are a lot of embedded systems that run most or all

Re: [PATCH 0/3] epoll: Add epoll_pwait1 syscall

2015-01-12 Thread Josh Triplett
On Mon, Jan 12, 2015 at 04:24:00PM +0800, Fam Zheng wrote: > On Thu, 01/08 21:21, Josh Triplett wrote: > > On Fri, Jan 09, 2015 at 12:49:08PM +0800, Fam Zheng wrote: > > > On Thu, 01/08 18:24, Andy Lutomirski wrote: > > > > On Thu, Jan 8, 2015 at 5:52 PM, Fam Zheng

Re: [PATCH 0/3] epoll: Add epoll_pwait1 syscall

2015-01-12 Thread Josh Triplett
On Mon, Jan 12, 2015 at 04:24:00PM +0800, Fam Zheng wrote: On Thu, 01/08 21:21, Josh Triplett wrote: On Fri, Jan 09, 2015 at 12:49:08PM +0800, Fam Zheng wrote: On Thu, 01/08 18:24, Andy Lutomirski wrote: On Thu, Jan 8, 2015 at 5:52 PM, Fam Zheng f...@redhat.com wrote: On Thu, 01/08

Re: [PATCH] ALSA: lx6464es: lx_core: Remove some unused functions

2015-01-11 Thread Josh Triplett
e / fix anything. Easy enough to get it back out of version control if so. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] ALSA: lx6464es: lx_core: Remove some unused functions

2015-01-11 Thread Josh Triplett
control if so. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/3] epoll: Add epoll_pwait1 syscall

2015-01-08 Thread Josh Triplett
CK_MONOTONIC, if it needs extending in the future, it'd be painful to have to remap new CLOCK_* constants into the EPOLL_FL_* namespace. (I do think dropping timeouts in favor of timerfds makes things more nicely orthogonal, but epoll_wait already has a timeout parameter, so *shrug*.) Also, I think t

Re: [PATCH 0/3] epoll: Add epoll_pwait1 syscall

2015-01-08 Thread Josh Triplett
either making flags a top-level parameter or putting it at the start of the structure, to make future extension easier. /bikeshed - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Josh Triplett
+linux-sparse On Fri, Jan 02, 2015 at 09:51:25AM -0500, Murali Karicheri wrote: > On 12/16/2014 01:23 PM, Murali Karicheri wrote: > >netdev maintainers, > > > >I got a comment to address CHECK warning and wondering how to address > >'warning: testing a 'safe expression' which appears when using >

Re: How to fix CHECK warning: testing a 'safe expression'

2015-01-02 Thread Josh Triplett
+linux-sparse On Fri, Jan 02, 2015 at 09:51:25AM -0500, Murali Karicheri wrote: On 12/16/2014 01:23 PM, Murali Karicheri wrote: netdev maintainers, I got a comment to address CHECK warning and wondering how to address 'warning: testing a 'safe expression' which appears when using

Re: [PATCH v2 1/2] x86, platform, xen, kconfig: clarify kvmconfig is for kvm

2014-12-09 Thread Josh Triplett
On Tue, Dec 09, 2014 at 03:35:37PM -0800, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > We'll be adding options for xen as well. > > Cc: Josh Triplett > Cc: Borislav Petkov > Cc: Pekka Enberg > Cc: David Rientjes > Cc: Michal Marek > Cc

Re: [PATCH v2 1/2] x86, platform, xen, kconfig: clarify kvmconfig is for kvm

2014-12-09 Thread Josh Triplett
On Tue, Dec 09, 2014 at 03:35:37PM -0800, Luis R. Rodriguez wrote: From: Luis R. Rodriguez mcg...@suse.com We'll be adding options for xen as well. Cc: Josh Triplett j...@joshtriplett.org Cc: Borislav Petkov b...@suse.de Cc: Pekka Enberg penb...@kernel.org Cc: David Rientjes rient

Re: [PATCH v3 0/2]: x86/arm64: add xenconfig

2014-12-08 Thread Josh Triplett
mconfig is for kvm > x86, arm, platform, xen, kconfig: add xen defconfig helper For both: Reviewed-by: Josh Triplett > arch/x86/configs/xen.config | 6 ++ > kernel/configs/xen.config | 32 > scripts/kconfig/Makefile| 7 ++- > 3 files c

Re: [PATCH v3 0/2]: x86/arm64: add xenconfig

2014-12-08 Thread Josh Triplett
, kconfig: add xen defconfig helper For both: Reviewed-by: Josh Triplett j...@joshtriplett.org arch/x86/configs/xen.config | 6 ++ kernel/configs/xen.config | 32 scripts/kconfig/Makefile| 7 ++- 3 files changed, 44 insertions(+), 1 deletion

Re: [PATCH] tinification: Make SRCU optional by using CONFIG_SRCU

2014-12-04 Thread Josh Triplett
se for testing purposes, but I don't think it makes sense for the final patch. I'd suggest making it a completely automatic symbol with no title. > > > >>> +def_bool n You already say "bool" above, and "default n" is the default default, so you can

Re: [RFC PATCH v2] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-04 Thread Josh Triplett
atch combined with a few selects. The code looks good to me. Assuming it compiles on x86, with tinyconfig and with allyesconfig minus SRCU (and whatever requires it), this seems reasonable. Thanks for working on this! - Josh Triplett > v2: > - handle cpufreq, devfreq and notifier > - build

Re: [RFC PATCH v2] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-04 Thread Josh Triplett
and with allyesconfig minus SRCU (and whatever requires it), this seems reasonable. Thanks for working on this! - Josh Triplett v2: - handle cpufreq, devfreq and notifier - build tested tinyconfig on powerpc arch/arm/kvm/Kconfig | 1 + arch/arm64/kvm/Kconfig | 1 + arch/ia64/kvm/Kconfig| 1

Re: [PATCH] tinification: Make SRCU optional by using CONFIG_SRCU

2014-12-04 Thread Josh Triplett
it a completely automatic symbol with no title. +def_bool n You already say bool above, and default n is the default default, so you can omit this line entirely. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH v6] selftest: size: Add size test for Linux kernel

2014-12-03 Thread Josh Triplett
v6 looks good to me. Reviewed-by: Josh Triplett Should this go through the tinification tree or the selftests tree? - Josh Triplett > Changes from v5: > - remove #ifdef in Makefile (doh!) > - use variables in build command > - use different num_to_str, with less conversions &

Re: [PATCH v6] selftest: size: Add size test for Linux kernel

2014-12-03 Thread Josh Triplett
. Reviewed-by: Josh Triplett j...@joshtriplett.org Should this go through the tinification tree or the selftests tree? - Josh Triplett Changes from v5: - remove #ifdef in Makefile (doh!) - use variables in build command - use different num_to_str, with less conversions Changes from v4

Re: [PATCH v4] selftest: size: Add size test for Linux kernel

2014-11-26 Thread Josh Triplett
On Wed, Nov 26, 2014 at 08:27:23PM -0800, Tim Bird wrote: > --- /dev/null > +++ b/tools/testing/selftests/size/Makefile [...] > +LIBGCC=$(shell $(CC) -print-libgcc-file-name) > + > +get_size: get_size.c > + $(CC) --static -ffreestanding -nostartfiles \ > + -Wl,--entry=_start

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