All of lore.kernel.org
 help / color / mirror / Atom feed
* PROBLEM: Firmware loader fallback mechanism no longer works with sendfile
@ 2021-01-04 22:43 Siddharth Gupta
  2021-01-05  6:36 ` Greg KH
  2021-01-20  9:10 ` Christoph Hellwig
  0 siblings, 2 replies; 11+ messages in thread
From: Siddharth Gupta @ 2021-01-04 22:43 UTC (permalink / raw)
  To: mcgrof, gregkh, rafael, viro, linux-fsdevel, Linux Kernel Mailing List
  Cc: psodagud

Hi all,

With the introduction of the filesystem change "fs: don't allow splice 
read/write without explicit ops"[1] the fallback mechanism of the 
firmware loader[2] no longer works when using sendfile[3] from the 
userspace.

Since the binary attributes don't support splice_{read,write} functions 
the calls to splice_{read,write} used the default kernel_{read,write} 
functions. With the above change this results in an -EINVAL return from 
do_splice_from[4].

This essentially means that sendfile will not work for any binary 
attribute in the sysfs.

Thanks,
Siddharth

[1]: 
https://github.com/torvalds/linux/commit/36e2c7421f02a22f71c9283e55fdb672a9eb58e7#diff-70c49af2ed5805fc1406ed6e6532d6a029ada1abd90cca6442711b9cecd4d523
[2]: 
https://github.com/torvalds/linux/blob/master/drivers/base/firmware_loader/main.c#L831
[3]: https://github.com/torvalds/linux/blob/master/fs/read_write.c#L1257
[4]: https://github.com/torvalds/linux/blob/master/fs/splice.c#L753


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-20 20:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 22:43 PROBLEM: Firmware loader fallback mechanism no longer works with sendfile Siddharth Gupta
2021-01-05  6:36 ` Greg KH
2021-01-06  1:00   ` Siddharth Gupta
2021-01-06 10:33     ` Greg KH
2021-01-07 22:03       ` Siddharth Gupta
2021-01-08 14:44         ` Greg KH
2021-01-12 18:31           ` Siddharth Gupta
2021-01-15 16:20             ` Greg KH
2021-01-18  0:59               ` Siddharth Gupta
2021-01-20  9:10 ` Christoph Hellwig
2021-01-20 20:28   ` Siddharth Gupta

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.