Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-07 Thread Jens Axboe
On 5/4/20 1:39 PM, Pavel Begunkov wrote: > do_splice() is used by io_uring, as will be do_tee(). Move f_mode > checks from sys_{splice,tee}() to do_{splice,tee}(), so they're > enforced for io_uring as well. Applied for 5.7, thanks. -- Jens Axboe

Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-05 Thread Clay Harris
On Tue, May 05 2020 at 17:00:32 -0500, Clay Harris quoth thus: > On Wed, May 06 2020 at 00:38:05 +0300, Pavel Begunkov quoth thus: > > > On 06/05/2020 00:10, Clay Harris wrote: > > > On Mon, May 04 2020 at 22:39:35 +0300, Pavel Begunkov quoth thus: > > > > > >> do_splice() is used by io_uring,

Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-05 Thread Pavel Begunkov
On 06/05/2020 01:00, Clay Harris wrote: > On Wed, May 06 2020 at 00:38:05 +0300, Pavel Begunkov quoth thus: > >> On 06/05/2020 00:10, Clay Harris wrote: >>> On Mon, May 04 2020 at 22:39:35 +0300, Pavel Begunkov quoth thus: >>> do_splice() is used by io_uring, as will be do_tee(). Move f_mode

Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-05 Thread Clay Harris
On Wed, May 06 2020 at 00:38:05 +0300, Pavel Begunkov quoth thus: > On 06/05/2020 00:10, Clay Harris wrote: > > On Mon, May 04 2020 at 22:39:35 +0300, Pavel Begunkov quoth thus: > > > >> do_splice() is used by io_uring, as will be do_tee(). Move f_mode > >> checks from sys_{splice,tee}() to

Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-05 Thread Pavel Begunkov
On 06/05/2020 00:10, Clay Harris wrote: > On Mon, May 04 2020 at 22:39:35 +0300, Pavel Begunkov quoth thus: > >> do_splice() is used by io_uring, as will be do_tee(). Move f_mode >> checks from sys_{splice,tee}() to do_{splice,tee}(), so they're >> enforced for io_uring as well. > > I'm not

Re: [PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-05 Thread Clay Harris
On Mon, May 04 2020 at 22:39:35 +0300, Pavel Begunkov quoth thus: > do_splice() is used by io_uring, as will be do_tee(). Move f_mode > checks from sys_{splice,tee}() to do_{splice,tee}(), so they're > enforced for io_uring as well. I'm not seeing any check against splicing a pipe to itself in

[PATCH for-5.7] splice: move f_mode checks to do_{splice,tee}()

2020-05-04 Thread Pavel Begunkov
do_splice() is used by io_uring, as will be do_tee(). Move f_mode checks from sys_{splice,tee}() to do_{splice,tee}(), so they're enforced for io_uring as well. Fixes: 7d67af2c0134 ("io_uring: add splice(2) support") Reported-by: Jann Horn Signed-off-by: Pavel Begunkov --- fs/splice.c | 45