public inbox for [email protected]
 help / color / mirror / Atom feed
From: Bijan Mottahedeh <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [RFC 0/2] io_uring: disallow overlapping ranges for buffer registration
Date: Thu, 11 Jun 2020 19:23:35 -0700	[thread overview]
Message-ID: <[email protected]> (raw)

This patch set has a couple of RFCs.

The first patch aims to disallow overlapping of user buffers for
registration.  For example, right now it is possible to register the same
identical buffer many times with the same system call which doesn't really
make sense.  I'm not sure if there is a valid use case for overlapping
buffers.  I think this check by itself might not be sufficient and more
restrictions may be needed but I figured to send this out for feedback and
check whether overlapping buffers should be allowed in the first place.

The second patch aims to separate reporting and enforcing of pinned
memory usage.  Reporting the usage seems like a good idea even if no
limit is enforced and ctx->account_mem is zero.

However, I'm clear on the proper setting and usage of
	user->locked_vm
	mm->locked_vm
	mm->pinned_vm

Looking at some other pin_user_page() callers, it seem mm->pinned_vm
should be used by I'm not sure.

Bijan Mottahedeh (2):
  io_uring: disallow overlapping ranges for buffer registration
  io_uring: report pinned memory usage

 fs/io_uring.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

-- 
1.8.3.1


             reply	other threads:[~2020-06-12  2:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  2:23 Bijan Mottahedeh [this message]
2020-06-12  2:23 ` [RFC 1/2] io_uring: disallow overlapping ranges for buffer registration Bijan Mottahedeh
2020-06-12 15:16   ` Jens Axboe
2020-06-12 18:22     ` Bijan Mottahedeh
2020-06-14 15:56       ` Jens Axboe
2020-06-12  2:23 ` [RFC 2/2] io_uring: report pinned memory usage Bijan Mottahedeh
2020-06-12 15:16   ` Jens Axboe
2020-06-12 15:19     ` Jens Axboe
2020-06-12 15:50       ` Jens Axboe
2020-06-13  4:43       ` Bijan Mottahedeh
2020-06-14 15:57         ` Jens Axboe

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=1591928617-19924-1-git-send-email-bijan.mottahedeh@oracle.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /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