On Mon, Jan 04, 2021 at 02:43:45PM -0800, Siddharth Gupta wrote:The userspace program is in the android userspace which listens to a uevent from the firmware loader and then loads the firmware using sendfile[1].
Hi all,What userspace program are you using to load firmware?
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.
Are you not using the in-kernel firmware loader for some reason?We have certain non-standard firmware paths that should not be added to the linux kernel, and the firmware_class.path only supports a single path.
I am not aware of this fix, could you provide me a link for reference? I will try it out.
Since the binary attributes don't support splice_{read,write} functions theHave you tried fixing this with a patch much like what we did for 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.
proc files that needed this? If not, can you?
I use it because it is easier on the eyes when looking at diffs :D
[1]: https://github.com/torvalds/linux/commit/36e2c7421f02a22f71c9283e55fdb672a9eb58e7#diff-70c49af2ed5805fc1406ed6e6532d6a029ada1abd90cca6442711b9cecd4d523kernel development is on git.kernel.org, not github :)
[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
Thanks,
thanks,
greg k-h