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: <a317b7f1-b593-4cf0-a58a-8f375ad64f72@oracle.com>
Date: Mon, 14 Oct 2024 16:02:09 -0500
From: Mike Christie <michael.christie@...cle.com>
To: Cindy Lu <lulu@...hat.com>, 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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ