>CC: Andrew Hunter
>CC: Peter Zijlstra
>CC: Andy Lutomirski
>CC: Andi Kleen
>CC: Dave Watson
>CC: Chris Lameter
>CC: Ingo Molnar
>CC: Ben Maurer
>CC: Steven Rostedt
>CC: "Paul E. McKenney"
>CC: Josh Triplett
>CC: Linus Torvalds
>C
On Thu, Dec 10, 2015 at 04:33:29PM -0500, Jessica Yu wrote:
> +++ Josh Poimboeuf [10/12/15 08:28 -0600]:
> >On Wed, Dec 09, 2015 at 02:10:14PM -0500, Jessica Yu wrote:
> >>+++ Josh Poimboeuf [08/12/15 12:38 -0600]:
> >>>>+ /* For each _
hdrs, pmod->core_strtab,
> > > + pmod->index.sym, relindex, pmod);
> >
> > It is more appropiate to test the ret.
>
> And if error is encountered ... then you'd propose to do what?
>
> The code is correct as is; the return value
On Wed, Dec 09, 2015 at 03:05:23PM -0500, Jessica Yu wrote:
> +++ Josh Poimboeuf [08/12/15 12:32 -0600]:
> >On Mon, Nov 30, 2015 at 11:21:15PM -0500, Jessica Yu wrote:
> >>For livepatch modules, copy Elf section, symbol, and string information
> >>from the load_info
On Wed, Dec 09, 2015 at 02:10:14PM -0500, Jessica Yu wrote:
> +++ Josh Poimboeuf [08/12/15 12:38 -0600]:
> >>+ /* For each __klp_rela section for this object */
> >>+ klp_for_each_reloc_sec(obj, reloc_sec) {
> >>+ relindex = reloc_sec->index;
> >
eing NULL means vmlinux */
> .funcs = funcs,
> + .reloc_secs = reloc_secs,
> }, { }
> };
>
> @@ -89,3 +94,4 @@ static void livepatch_exit(void)
> module_init(livepatch_init);
> module_exit(livepatch_exit);
> MODULE_LICENSE("GPL"
lue)?
> + }
> }
> + ret = apply_relocate_add(pmod->sechdrs, pmod->core_strtab,
> + pmod->index.sym, relindex, pmod);
> }
>
> - return 0;
> + return ret;
> }
>
milar to the is_livepatch_module() function I suggested, this can be
put in a function so that mod->klp can be abstracted away for the
!LIVEPATCH case. Maybe there should be a check_livepatch_modinfo()
function:
1. the !LIVEPATCH version of the function could return an error if
modinfo has "livepa
the benefit of caching the klp_rela
section indices. What problem does it solve? It seems simpler to just
iterate over all the sections in klp_write_object_relocations().
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a mess
o module loader.
>
>has been
>
> I would personally merge this with the 3rd patch. It will be more
> clear what code has been replaced there. But it is a matter of taste.
Ditto.
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe lin
,
> @@ -741,12 +751,23 @@ static int klp_init_object_loaded(struct klp_patch
> *patch,
> struct klp_object *obj)
> {
> struct klp_func *func;
> + struct module *pmod;
> int ret;
>
> - if (obj->relocs) {
> -
er. I think we don't need klp_reloc_sec
> if there is only one dynrela section for patched object (and I currently
> cannot see why this is not possible. It is possible even with one dynrela
> section for whole patch module, that is for all patched objects.).
I think I agree that we
< 0)
> goto bug_cleanup;
>
> +#ifdef CONFIG_LIVEPATCH
> + /*
> + * Save sechdrs, indices, and other data from info
> + * in order to patch to-be-loaded modules.
> + * Do not call free_copy() for livepatch modules.
> + */
> + if (get_modinfo((struct load_info *)info, "livepatch"))
> + klp_prepare_patch_module(mod, info);
> + else
> + free_copy(info);
> +#else
> /* Get rid of temporary copy. */
> free_copy(info);
> +#endif
>
> /* Done! */
> trace_module_load(mod);
> --
> 2.4.3
>
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ug_cleanup;
>
> +#ifdef CONFIG_LIVEPATCH
> + /*
> + * Save sechdrs, indices, and other data from info
> + * in order to patch to-be-loaded modules.
> + * Do not call free_copy() for livepatch modules.
> + */
> + if (get_modinfo((struct load_info *)i
arch_syminfo struct: 24 bytes by my reckoning.
So between info, info->hdr, and s390 mod_arch_syminfo, we're talking
about 184 bytes on s390 and 160 bytes on x86_64. That seems like
peanuts compared to the size of a typical module. The benefit is that
the code would be simpler because we don
l section indexes */
> #define SHN_UNDEF0
> @@ -295,6 +297,7 @@ typedef struct elf64_phdr {
> #define SHN_ABS 0xfff1
> #define SHN_COMMON 0xfff2
> #define SHN_HIRESERVE0xffff
> +#define SHN_LIVEPATCH 0xff21
Similar question here, why not use 0xff20 (SHN_LO
typedef struct elf32_shdr {
>Elf32_Word sh_name;
For all of these it would be good to re-indent the surrounding macros so
their values are all vertically aligned with the new LIVEPATCH ones.
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
_sympos, then 1 will be used since a unique symbol will be the
> + * first occurrence.
> + */
> return kobject_init_and_add(&func->kobj, &klp_ktype_func,
> - &obj->kobj, "%s", func->old_name);
> +
ime, so this work would simplify
> our effort as well.
I haven't yet reviewed the code in-depth, but overall I think this patch
set is a good idea. It simplifies livepatch itself as well as the patch
creation process (for both kGraft and kpatch-build), so it's a win-win.
tead be an array of klp_reloc_sec
structs, with the last entry being 0, similar to how we do other "lists"
in the klp interface (e.g., klp_patch.objs, klp_object.funcs).
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Nov 10, 2015 at 09:49:09AM +0100, Miroslav Benes wrote:
> On Mon, 9 Nov 2015, Josh Poimboeuf wrote:
>
> > On Mon, Nov 09, 2015 at 05:01:18PM -0600, Chris J Arges wrote:
> > > On 11/09/2015 02:56 PM, Josh Poimboeuf wrote:
> > > > I'd recommend split
On Mon, Nov 09, 2015 at 05:01:18PM -0600, Chris J Arges wrote:
> On 11/09/2015 02:56 PM, Josh Poimboeuf wrote:
> > I'd recommend splitting this up into two separate patches:
> >
> > 1. introduce old_sympos
> > 2. change the sysfs interface
> >
> > On
- return kobject_init_and_add(&func->kobj, &klp_ktype_func,
> - &obj->kobj, "%s", func->old_name);
> + return 0;
> }
The sysfs entry can still be created here, since the function name and
sympos are both already known.
>
> /* parts of the initialization that is done only when the object is loaded */
> @@ -755,6 +765,18 @@ static int klp_init_object_loaded(struct klp_patch
> *patch,
> return ret;
> }
>
> + /*
> + * for each function initialize and add, old_sympos will be already
> + * verified at this point
> + */
> + klp_for_each_func(obj, func) {
> + ret = kobject_init_and_add(&func->kobj, &klp_ktype_func,
> + &obj->kobj, "%s,%lu", func->old_name,
> + func->old_sympos ? func->old_sympos : 0);
> + if (ret)
> + return ret;
> + }
> +
> return 0;
> }
>
> --
> 1.9.1
>
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 05, 2015 at 04:18:12PM +0100, Miroslav Benes wrote:
> On Wed, 4 Nov 2015, Josh Poimboeuf wrote:
>
> > On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote:
> > > On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
> > > > > Object entry would be
On Wed, Nov 04, 2015 at 10:52:52AM +0100, Miroslav Benes wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
> > > Object entry would be empty for not loaded object. I would not
> > > dare to propose to remove such object entries. It would make things
> > > worse.
ate namespace and wouldn't
create a conflict.
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Nov 03, 2015 at 05:09:48PM +0100, Miroslav Benes wrote:
> On Tue, 3 Nov 2015, Josh Poimboeuf wrote:
>
> > On Tue, Nov 03, 2015 at 11:52:08AM +0100, Miroslav Benes wrote:
> > > On Mon, 2 Nov 2015, Chris J Arges wrote:
> > >
> > > [...]
> > >
ere is still a period here and in the documentation :)
and in the subject :-)
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
s have the suffix, so it's
consistent and there are no surprises.
--
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
func->old_addr is either not verified yet or worse it is still 0. This
> means that klp_get_func_pos_callback() never returns 1 and is thus called
> on each symbol. So if you for example patched cmdline_proc_show the
> resulting directory in sysfs would be called cmdline_proc_show,1 becau
On Mon, Nov 02, 2015 at 02:16:16PM -0600, Chris J Arges wrote:
> On Mon, Nov 02, 2015 at 01:52:44PM -0600, Josh Poimboeuf wrote:
> > On Mon, Nov 02, 2015 at 11:58:47AM -0600, Chris J Arges wrote:
> > > The following directory structure will allow for cases when the same
> >
on was
patched.
For example:
$ grep " t_next" /proc/kallsyms
811597d0 t t_next
81163bb0 t t_next
...
In my kernel there are 6 functions named t_next in vmlinux. "t_next 0"
would refer to the function at 0x811597d0. "t_next 1" would
On Sat, Oct 03, 2015 at 02:11:57PM +, Mathieu Desnoyers wrote:
> - On Oct 3, 2015, at 12:38 AM, dvhart dvh...@infradead.org wrote:
>
> > On Mon, Sep 28, 2015 at 03:16:53AM +, Mathieu Desnoyers wrote:
> >> - On Sep 27, 2015, at 10:10 PM, Wang Long long.wangl...@huawei.com
> >> wrot
On Tue, Sep 15, 2015 at 12:42:00PM +0300, Kirill A. Shutemov wrote:
> On Mon, Sep 14, 2015 at 10:19:19PM -0700, Josh Triplett wrote:
> > On Tue, Sep 15, 2015 at 03:23:58AM +0300, Kirill A. Shutemov wrote:
> > > On Mon, Sep 14, 2015 at 03:50:38PM -0700, Palmer Dabbelt wrote:
>
ve an MMU (which is useful for things like fork()), a
system without user separation (for instance, without CONFIG_MULTIUSER)
can reasonably use MAP_UNINITIALIZED.
> P.S. MAP_UNINITIALIZED itself looks very broken to me. I probably need dig
> mailing list on why it was allowed.
That's w
On Fri, Jul 31, 2015 at 09:56:46PM -0700, H. Peter Anvin wrote:
> On 07/31/2015 09:32 PM, Josh Triplett wrote:
> >
> > Sure, agreed. But I really hope we don't create new kernel ABIs that
> > involve constructs like that.
> >
>
> It's worth noting I
st automatically running copy_from_user and
> > copy_param_struct on appropriate sets of __user parameters identified as
> > such in a structured text file seems quite sufficient. (Plus
> > automatically generating syscalls.h from that.)
>
> If a param struct does the trick, then I ag
On Fri, Jul 31, 2015 at 02:19:29PM -0700, Andy Lutomirski wrote:
> On Fri, Jul 31, 2015 at 1:59 PM, wrote:
> > Agreed. I think the proposal above would be a net improvement, but
> > ideally you'd want something that's annotated and generates automatic
> > marshalling code.
> >
>
> I assume this
On Fri, Jul 31, 2015 at 11:56:06AM -0700, Kees Cook wrote:
> On Thu, Jul 30, 2015 at 6:02 PM, Josh Triplett wrote:
> > On Thu, Jul 30, 2015 at 01:03:43PM -0700, Kees Cook wrote:
> >> On Thu, Jul 30, 2015 at 12:04 PM, Josh Triplett
> >> wrote:
> >> > O
d-off-by: David Drysdale
> Reviewed-by: Michael Kerrisk
> Reviewed-by: Eric B Munson
> Reviewed-by: Kees Cook
> Reviewed-by: Randy Dunlap
Other than the change to the mention of capabilities, this now looks
ready to me. With that item fixed:
Reviewed-by: Josh Triplett
> Doc
On Fri, Jul 31, 2015 at 10:48:32AM +0100, David Drysdale wrote:
> On Thu, Jul 30, 2015 at 7:50 PM, Josh Triplett wrote:
> > On Thu, Jul 30, 2015 at 08:52:11AM +0100, David Drysdale wrote:
> >> Add a document describing the process of adding a new system call,
> >> inc
On Thu, Jul 30, 2015 at 06:02:34PM -0700, Josh Triplett wrote:
> On Thu, Jul 30, 2015 at 01:03:43PM -0700, Kees Cook wrote:
> > On Thu, Jul 30, 2015 at 12:04 PM, Josh Triplett
> > wrote:
> > > On Thu, Jul 30, 2015 at 11:21:54AM -0700, Kees Cook wrote:
> > >>
On Thu, Jul 30, 2015 at 01:03:43PM -0700, Kees Cook wrote:
> On Thu, Jul 30, 2015 at 12:04 PM, Josh Triplett wrote:
> > On Thu, Jul 30, 2015 at 11:21:54AM -0700, Kees Cook wrote:
> >> I like this, it's a good description of both options. I'm still biased
> >&g
longer be tampered with).
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Jul 30, 2015 at 08:52:11AM +0100, David Drysdale wrote:
> Add a document describing the process of adding a new system call,
> including the need for a flags argument for future compatibility, and
> covering 32-bit/64-bit concerns (albeit in an x86-centric way).
>
> Signed-off-by: David Dr
stand. If you don't need param_4, don't use the version
of the structure that has param_4. That also means the kernel doesn't
need to copy and read those values. Either approach works, though.
- Josh Triplett
--
To unsubscribe from this list: send the line "uns
thinking of doing with it.
> >
> > How is this possible if it's process-global attribute and glibc or some
> > library in the process starts using it?
> >
>
> glibc will have to expose a way to turn it off, I guess. (ELF flag?)
Or a way to turn it on.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
you pass non-zero, the pointer must be valid or you
get -EFAULT (or an actual segfault).
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ADDR_LIMIT_32BIT or ADDR_LIMIT_3GB?
> + /* Will update *gcp on resume */
> + if (gcp)
Minor nit: you're using the pointer as a boolean here, but comparing it
to NULL elsewhere; you should be consistent. I'd suggest consistently
using gcp and !gcp, without the comparison to NULL.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
re the C argument 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/l
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
ersial
and have acks. I'd like to go ahead and submit these two so that other
architectures can begin building on top of this and opting into
HAVE_COPY_THREAD_TLS. However, I'm also happy to wait and send these through
the next merge window (along with v3 of clone4) if anyone would
hen include any necessary
disambiguating flags/IDs/etc. No need for them to match the current
clonefd_info structure if userspace has opted into a new version.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Apr 06, 2015 at 05:30:35PM +0900, Sergey Senozhatsky wrote:
> On (03/15/15 01:00), Josh Triplett wrote:
> [..]
> > +
> > +/* Handle the CLONE_FD case for copy_process. */
> > +int clonefd_do_clone(u64 clone_flags, struct task_struct *p,
> > +st
e new thing". So, for instance, if you want to
receive SIGSTOP/SIGCONT messages for child processes through this
descriptor, we could add a flag for that.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 23, 2015 at 05:38:45PM +, David Drysdale wrote:
> On Sun, Mar 15, 2015 at 8:00 AM, Josh Triplett wrote:
> > diff --git a/include/linux/sched.h b/include/linux/sched.h
> > index 9daa017..1dc680b 100644
> > --- a/include/linux/sched.h
> > +++ b/include/l
On Mon, Mar 23, 2015 at 02:11:45PM +, David Drysdale wrote:
> On Sun, Mar 15, 2015 at 7:59 AM, Josh Triplett wrote:
> > diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
> > index 0286735..ba28306 100644
> > --- a/arch/x86/ia32/ia32entry.S
> > +++
>
> Quick query: does CLONE_AUTOREAP also affect waiting for non-exit
> events (i.e. WUNTRACED / WCONTINUED), by original parent and/or ptracer?
It shouldn't, no. You can't wait on the process to exit (you'll get
-ECHLD after it wakes up), but you can wait on it to contin
SIGNAL) && (clone_flags && CLONE_AUTOREAP))
> return -EINVAL;
>
> so that we still can change this behaviour later.
I'm fine with that, as it would handle the particular use case we care
about.
However, the reset-signal-on-reparent thing might still mak
t's fine. There's no semantic meaning attached to reading from the
clonefd; you still have to wait on the process if you don't pass
CLONE_AUTOREAP. (Or you can block SIGCHLD or use SA_NOCLDWAIT, if you
control the calling process's signal handling; AUTOREAP just lets you
avoid in
emantics we implemented; you'll *always* get an
exit notification via the clonefd if you have it open, with or without
autoreap and whether or not a wait has occurred yet. And reading from
the clonefd does not serve as a wait; if you don't pass CLONE_AUTOREAP,
you'll still need to wait
On Mon, Mar 16, 2015 at 02:44:20PM -0700, Kees Cook wrote:
> On Sun, Mar 15, 2015 at 12:59 AM, Josh Triplett wrote:
> > - Make poll on a CLONE_FD for an exited task also return POLLHUP, for
> > compatibility with FreeBSD's pdfork. Thanks to David Drysdale for calling
>
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 un
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(
On Sun, Mar 15, 2015 at 10:18:05AM +, David Drysdale wrote:
> On Sat, Mar 14, 2015 at 7:29 PM, Josh Triplett 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 Frid
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 SIGCHL
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
Signed-off-by: Thiago Macieira
---
kernel/fork.c | 77
re the C argument 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/l
he calling 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
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
Also includes new cross-reference from clone.2.
Signed-off-by: Josh Triplett
---
man2/clone.2 | 1 +
man2/clone4.2 | 345 ++
2 files changed, 346 insertions(+)
create mode 100644 man2/clone4.2
diff --git a/man2/clone.2 b/man2/clone.2
ignal 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/clon
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
ned-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
ed in programs intended
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 vi
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
gnal handling is set up. 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-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
criptor instead (to allow a library 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 a
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:3
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
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 @@
> - pdkill: needs an ioctl [or just write()]
I think that should be a 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
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->g
ink 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-api" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
M -0700, Andy Lutomirski wrote:
> >> >> On Thu, Mar 12, 2015 at 6:40 PM, Josh Triplett
> >> >> wrote:
> >> >> > For 32-bit userspace on a 64-bit kernel, this requires modifying
> >> >> > stub32_clone to actually swap the appropriate
On Fri, Mar 13, 2015 at 03:38:31PM -0700, Andy Lutomirski wrote:
> On Fri, Mar 13, 2015 at 3:31 PM, wrote:
> > On Fri, Mar 13, 2015 at 03:01:16PM -0700, Andy Lutomirski wrote:
> >> On Thu, Mar 12, 2015 at 6:40 PM, Josh Triplett
> >> wrote:
> >> > For 32
t; avoid. (We don't want to have magic "reap on read(2)" semantics,
> > because among other things, what if we add a means in the future to get
> > an additional file descriptor corresponding to an existing process?)
>
> Do we not already have a state "dead, successfully
On Fri, Mar 13, 2015 at 03:01:16PM -0700, Andy Lutomirski wrote:
> On Thu, Mar 12, 2015 at 6:40 PM, Josh Triplett wrote:
> > For 32-bit userspace on a 64-bit kernel, this requires modifying
> > stub32_clone to actually swap the appropriate arguments to match
> > CONFIG_CL
process, which we'd like to
avoid. (We don't want to have magic "reap on read(2)" semantics,
because among other things, what if we add a means in the future to get
an additional file descriptor corresponding to an existing process?)
- Josh Triplett
--
To unsubs
On Fri, Mar 13, 2015 at 02:33:44PM -0700, Andy Lutomirski wrote:
> On Fri, Mar 13, 2015 at 12:42 PM, Josh Triplett wrote:
> > On Fri, Mar 13, 2015 at 04:05:29PM +, David Drysdale wrote:
> >> On Fri, Mar 13, 2015 at 1:40 AM, Josh Triplett
> >> wrote:
> >>
On Fri, Mar 13, 2015 at 02:16:07PM -0700, Thiago Macieira wrote:
> On Friday 13 March 2015 12:42:52 Josh Triplett wrote:
> > > Hi Josh,
> > >
> > > From the overall description (i.e. I haven't looked at the code yet)
> > > this looks very interesti
On Fri, Mar 13, 2015 at 05:21:13PM +0100, Oleg Nesterov wrote:
> Josh,
>
> I'll certainly try to read this series, but not before next week.
Thanks for looking at it.
> but a couple of nits right now.
>
> On 03/12, Josh Triplett wrote:
> >
> > When passed
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
FORMING TO
clone4() 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 Mac
ned-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
re the C argument 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 +++
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
can use 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
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
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
1 - 100 of 168 matches
Mail list logo