lkml.org 
[lkml]   [2020]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [fs] 36e2c7421f: kernel-selftests.splice.short_splice_read.sh.fail
On Fri, Sep 18, 2020 at 02:49:19PM -0700, Kees Cook wrote:
> In response to my recent bug fix for splice vs sysfs binary handler[1],
> I added splice testing for other pseudo filesystems[2], for which the
> test output is seen above.
>
> What is the final verdict on the "should splice have a fallback mode?"
> question[3]? Right now /proc and /sys reject splice attempts (which, as
> I mentioned in the thread, is fine by me, since it would have blocked
> the bug I had to fix from ever being exposed in the first place).

The verdict is: without a set_fs()-like mechanism that allows uaccess
routines to operate on kernel buffers, or even worse a
compat_alloc_user_space-like mechanism we can't have an entirely
generic fallback.

> Should I update the test to _expect_ that splice should fail?

I think so. We can updated individual file operations to support splice
where actually used applications except it (even when they shouldn't),
but I'd rather not do it just for a test case.

\
 
 \ /
  Last update: 2020-09-19 07:07    [W:1.009 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site