From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, Jann Horn <[email protected]>
Cc: io-uring <[email protected]>,
kernel list <[email protected]>,
Alexander Viro <[email protected]>,
linux-fsdevel <[email protected]>,
Clay Harris <[email protected]>
Subject: Re: [PATCH 1/2] splice: export do_tee()
Date: Mon, 4 May 2020 07:43:09 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 5/4/20 6:31 AM, Pavel Begunkov wrote:
> On 04/05/2020 14:09, Jann Horn wrote:
>> On Sat, May 2, 2020 at 2:10 PM Pavel Begunkov <[email protected]> wrote:
>>> export do_tee() for use in io_uring
>> [...]
>>> diff --git a/fs/splice.c b/fs/splice.c
>> [...]
>>> * The 'flags' used are the SPLICE_F_* variants, currently the only
>>> * applicable one is SPLICE_F_NONBLOCK.
>>> */
>>> -static long do_tee(struct file *in, struct file *out, size_t len,
>>> - unsigned int flags)
>>> +long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags)
>>> {
>>> struct pipe_inode_info *ipipe = get_pipe_info(in);
>>> struct pipe_inode_info *opipe = get_pipe_info(out);
>>
>> AFAICS do_tee() in its current form is not something you should be
>> making available to anything else, because the file mode checks are
>> performed in sys_tee() instead of in do_tee(). (And I don't see any
>> check for file modes in your uring patch, but maybe I missed it?) If
>> you want to make do_tee() available elsewhere, please refactor the
>> file mode checks over into do_tee().
>
> Overlooked it indeed. Glad you found it
Yeah indeed, that's a glaring oversight on my part too. Will you send
a patch for 5.7-rc as well for splice?
--
Jens Axboe
next prev parent reply other threads:[~2020-05-04 13:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 12:09 [PATCH 0/2] add tee(2) support Pavel Begunkov
2020-05-02 12:09 ` [PATCH 1/2] splice: export do_tee() Pavel Begunkov
2020-05-04 11:09 ` Jann Horn
2020-05-04 12:31 ` Pavel Begunkov
2020-05-04 13:43 ` Jens Axboe [this message]
2020-05-04 14:03 ` Pavel Begunkov
2020-05-04 16:36 ` Pavel Begunkov
2020-05-04 16:39 ` Jens Axboe
2020-05-02 12:09 ` [PATCH 2/2] io_uring: add tee(2) support Pavel Begunkov
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[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