From: David Laight <David.Laight@ACULAB.COM>
To: op-tee@lists.trustedfirmware.org
Subject: RE: [PATCH v4] tee: Use iov_iter to better support shared buffer registration
Date: Wed, 06 Dec 2023 11:39:01 +0000 [thread overview]
Message-ID: <7582460ba52e413eaab26d37fb56beed@AcuMS.aculab.com> (raw)
In-Reply-To: <206b634d-1d10-4057-ad8d-93e29fda5d6e@kernel.dk>
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
> > As Jens Wiklander has proposed using iov_iter_ubuf() instead of
> > import_ubuf(), should I propose a patch updating import_ubuf() and
> > import_single_range()? Or would you prefer that we keep the functions
> > unchanged for the time being?
>
> Arguably it should be consistent with iovec imports, which return the
> length (or error). But it might be safer to just check access_ok()
> first and then truncate at least, vs what is there now.
Is the access_ok() check even needed when setting up an iov_iter?
It is always checked again when the actual copy is done.
I looked at this a while back and couldn't see any code paths that
relied on the early access_ok() check.
Maybe it is historic?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
WARNING: multiple messages have this Message-ID (diff)
From: David Laight <David.Laight@ACULAB.COM>
To: 'Jens Axboe' <axboe@kernel.dk>,
Arnaud POULIQUEN <arnaud.pouliquen@foss.st.com>,
Sumit Garg <sumit.garg@linaro.org>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Christoph Hellwig <hch@infradead.org>,
"op-tee@lists.trustedfirmware.org"
<op-tee@lists.trustedfirmware.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Christian Brauner <brauner@kernel.org>,
Christian Brauner <christian@brauner.io>
Subject: RE: [PATCH v4] tee: Use iov_iter to better support shared buffer registration
Date: Wed, 6 Dec 2023 11:38:45 +0000 [thread overview]
Message-ID: <7582460ba52e413eaab26d37fb56beed@AcuMS.aculab.com> (raw)
In-Reply-To: <206b634d-1d10-4057-ad8d-93e29fda5d6e@kernel.dk>
> > As Jens Wiklander has proposed using iov_iter_ubuf() instead of
> > import_ubuf(), should I propose a patch updating import_ubuf() and
> > import_single_range()? Or would you prefer that we keep the functions
> > unchanged for the time being?
>
> Arguably it should be consistent with iovec imports, which return the
> length (or error). But it might be safer to just check access_ok()
> first and then truncate at least, vs what is there now.
Is the access_ok() check even needed when setting up an iov_iter?
It is always checked again when the actual copy is done.
I looked at this a while back and couldn't see any code paths that
relied on the early access_ok() check.
Maybe it is historic?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-12-06 11:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] < <CAFA6WYPGkpVN-XP7eAzLXMReRi7FBp3boKzhMfasasuE=XWBow@mail.gmail.com>
2023-12-04 16:36 ` [PATCH v4] tee: Use iov_iter to better support shared buffer registration Jens Axboe
2023-12-04 16:36 ` Jens Axboe
2023-12-04 16:40 ` Jens Axboe
2023-12-04 16:40 ` Jens Axboe
2023-12-04 17:02 ` Arnaud POULIQUEN
2023-12-04 17:02 ` Arnaud POULIQUEN
2023-12-04 17:13 ` Jens Axboe
2023-12-04 17:13 ` Jens Axboe
2023-12-05 16:55 ` Arnaud POULIQUEN
2023-12-05 16:55 ` Arnaud POULIQUEN
2023-12-05 17:50 ` Jens Axboe
2023-12-05 17:50 ` Jens Axboe
2023-12-06 11:38 ` David Laight [this message]
2023-12-06 11:39 ` David Laight
2023-12-05 12:07 ` Sumit Garg
2023-12-05 12:07 ` Sumit Garg
[not found] < <CAFA6WYMi52WTWho5y=967fm8utqtdq9fuCjVJFA9G0MaHtNYgg@mail.gmail.com>
2023-12-05 13:45 ` Arnaud POULIQUEN
2023-12-05 13:45 ` Arnaud POULIQUEN
2023-11-29 16:44 Arnaud Pouliquen
2023-11-29 16:45 ` Arnaud Pouliquen
2023-11-30 7:54 ` Sumit Garg
2023-11-30 7:54 ` Sumit Garg
2023-11-30 9:08 ` Arnaud POULIQUEN
2023-11-30 9:08 ` Arnaud POULIQUEN
2023-11-30 12:00 ` Sumit Garg
2023-11-30 12:00 ` Sumit Garg
2023-11-30 13:18 ` Arnaud POULIQUEN
2023-11-30 13:18 ` Arnaud POULIQUEN
2023-12-04 12:42 ` Sumit Garg
2023-12-04 12:42 ` Sumit Garg
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=7582460ba52e413eaab26d37fb56beed@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=op-tee@lists.trustedfirmware.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.