From: Jason Gunthorpe <jgg@ziepe.ca>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: kvm@vger.kernel.org, Alex Williamson <alex.williamson@redhat.com>,
Cornelia Huck <cohuck@redhat.com>
Subject: Re: [PATCH V1 2/8] vfio/type1: dma owner permission
Date: Wed, 7 Dec 2022 11:28:09 -0400 [thread overview]
Message-ID: <Y5CxCS53/aBT14EH@ziepe.ca> (raw)
In-Reply-To: <1670363753-249738-3-git-send-email-steven.sistare@oracle.com>
On Tue, Dec 06, 2022 at 01:55:47PM -0800, Steve Sistare wrote:
> The first task to pin any pages becomes the dma owner, and becomes the only
> task allowed to pin. This prevents an application from exceeding the
> initial task's RLIMIT_MEMLOCK by fork'ing and pinning in children.
We do not need to play games with the RLIMIT here - RLIMIT is
inherently insecure and if fork is available then the process can blow
past the sandbox limit. There is nothing we can do to prevent this in
the kernel, so don't even try.
iommufd offers the user based limit tracking which prevents this
properly.
And we are working on cgroup based limit tracking that is the best
option to solve this problem.
I would rather see us focus on the cgroup stuff than this.
Jason
next prev parent reply other threads:[~2022-12-07 15:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 21:55 [PATCH V1 0/8] vfio virtual address update redo Steve Sistare
2022-12-06 21:55 ` [PATCH V1 1/8] vfio: delete interfaces to update vaddr Steve Sistare
2022-12-06 23:52 ` Alex Williamson
2022-12-07 14:26 ` Steven Sistare
2022-12-07 15:14 ` Alex Williamson
2023-05-17 16:12 ` Jason Gunthorpe
2023-05-17 17:35 ` Steven Sistare
2022-12-07 15:19 ` Jason Gunthorpe
2022-12-08 19:09 ` Steven Sistare
2022-12-08 19:44 ` Alex Williamson
2022-12-07 23:20 ` Jason Gunthorpe
2022-12-08 22:18 ` Alex Williamson
2022-12-06 21:55 ` [PATCH V1 2/8] vfio/type1: dma owner permission Steve Sistare
2022-12-07 15:28 ` Jason Gunthorpe [this message]
2022-12-08 20:13 ` Steven Sistare
2022-12-06 21:55 ` [PATCH V1 3/8] vfio: close dma owner Steve Sistare
2022-12-06 21:55 ` [PATCH V1 4/8] vfio/type1: " Steve Sistare
2022-12-06 21:55 ` [PATCH V1 5/8] vfio/type1: track locked_vm per dma Steve Sistare
2022-12-06 21:55 ` [PATCH V1 6/8] vfio/type1: update vaddr Steve Sistare
2022-12-06 21:55 ` [PATCH V1 7/8] vfio: change dma owner Steve Sistare
2022-12-07 16:58 ` Jason Gunthorpe
2022-12-08 16:48 ` Steven Sistare
2022-12-08 17:15 ` Jason Gunthorpe
2022-12-08 17:39 ` Steven Sistare
2022-12-08 17:46 ` Jason Gunthorpe
2022-12-06 21:55 ` [PATCH V1 8/8] vfio/type1: " Steve Sistare
2022-12-07 17:00 ` Jason Gunthorpe
2022-12-08 7:22 ` Dan Carpenter
2022-12-07 15:23 ` [PATCH V1 0/8] vfio virtual address update redo Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5CxCS53/aBT14EH@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=steven.sistare@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox