lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210917074440.qwo6anrtxa7lj657@wittgenstein>
Date:   Fri, 17 Sep 2021 09:44:40 +0200
From:   Christian Brauner <christian.brauner@...ntu.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Mike Christie <michael.christie@...cle.com>, stefanha@...hat.com,
        jasowang@...hat.com, mst@...hat.com, sgarzare@...hat.com,
        virtualization@...ts.linux-foundation.org, axboe@...nel.dk,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] fork: add helper to clone a process

On Fri, Sep 17, 2021 at 07:00:35AM +0100, Christoph Hellwig wrote:
> On Thu, Sep 16, 2021 at 04:20:44PM -0500, Mike Christie wrote:
> > The vhost layer has similar requirements as io_uring where its worker
> > threads need to access the userspace thread's memory, want to inherit the
> > parents's cgroups and namespaces, and be checked against the parent's
> > RLIMITs. Right now, the vhost layer uses the kthread API which has
> > kthread_use_mm for mem access, and those threads can use
> > cgroup_attach_task_all for v1 cgroups, but there are no helpers for the
> > other items.
> > 
> > This adds a helper to clone a process so we can inherit everything we
> > want in one call. It's a more generic version of create_io_thread which
> > will be used by the vhost layer and io_uring in later patches in this set.
> > 
> > This patch also exports __set_task_comm and wake_up_new_task which is
> > needed by modules to use the new helper. io_uring calls these functions
> > already but its always built into the kernel so was not needed before.
> 
> Can you build proper APIs please?  e.g. the set_task_comm users
> generally want a printf-like varargs caling conventions.  I'd also
> much prefer to hide as much as possible in the actual helper.  That is
> build a helper that gets the name, a flag to ignore the singals etc
> instead of exporting all these random low-level helpers.

Yes, I think that's really what we want here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ