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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACLfguWkYC-60RsxtLjkMcML9WR0ix8ieZH0T8nEZKK_29kisw@mail.gmail.com>
Date: Tue, 15 Oct 2024 14:30:05 +0800
From: Cindy Lu <lulu@...hat.com>
To: Mike Christie <michael.christie@...cle.com>
Cc: jasowang@...hat.com, mst@...hat.com, linux-kernel@...r.kernel.org, 
	virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH v2 6/7] vhost: Add kthread support in function vhost_worker_create

On Tue, 15 Oct 2024 at 05:02, Mike Christie <michael.christie@...cle.com> wrote:
>
> On 10/3/24 8:58 PM, Cindy Lu wrote:
> > +static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev)
> > +{
> > +     if (enforce_inherit_owner)
> > +             return vhost_worker_create_task(dev);
> > +     else
> > +             return vhost_worker_create_kthread(dev);
> > +}
>
> The reason we are in this whole mess is because for vhost-scsi
> we wanted to create multiple worker threads as the single thread
> became a bottleneck. We couldn't use kthreads because they were
> not accounted for under thread that created it and we could
> exceed the NPROC_LIMIT.
>
> So with the above code, we could hit that problem again if userspace
> did the VHOST_NEW_WORKER ioctl and enforce_inherit_owner=false.
>
> You would want a check for enforce_inherit_owner in vhost_worker_ioctl.
>
sure, will add this check
Thanks
cindy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ