Re: [RFC PATCH 3/4] kmod - add call_usermodehelper_ns() helper
From: Oleg Nesterov
Date: Wed Nov 26 2014 - 20:30:45 EST
I didn't have time to follow this thread today, will try tomorrow.
Perhaps this was already answered...
On 11/26, Ian Kent wrote:
>
> On Tue, 2014-11-25 at 22:52 +0100, Oleg Nesterov wrote:
> >
> > and probably we also need this for coredump helpers, we want them
> > to be per-namespace.
>
> To save me some time could you point me to some of the related code
> please. I don't normally play in that area.
See call_usermodehelper_*() in do_coredump(). This has the same problems
(and just in case, of course other problems, starting from the fact that
core_pattern is global). We need the right root to find the binary, etc.
> > > + switch_task_namespaces(current, ns);
> >
> > This doesn't look sane because this won't switch task_active_pid_ns().
>
> I wondered about that too but I didn't design the open()/setns()
No, I don't think we should use setns() in this case...
> > And otoh. If we actually want to use the caller's mnt_ns/namespaces we
> > could simply fork/reparent a child which will do execve ?
>
> Are you saying that the user space program should be modified to do
> this?
No, no, I meant that the kernel could do this (yes, not that trivial)
on behalf of the caller's process.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/