On Tue, Jan 05, 2021 at 05:00:58PM -0800, Siddharth Gupta wrote:Unfortunately they are not, and we understand that such changes shouldn't make it to upstream hence it was not a part of the request. If the firmware loader fallback mechanism was being deprecated then we would have to look into our options. As of now the series of changes breaking the sysfs bin attributes is the only bug that affects us.
On 1/4/2021 10:36 PM, Greg KH wrote:That option is just for a single override, which should be all that you
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
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.
from the firmware loader and then loads the firmware using sendfile[1].
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.
need if the other paths that are built into the kernel do not work.
Surely one of the 5 different paths here are acceptable?
We need 2 paths.
If not, how many more do you need?
In our discussion with the Android team that is not the case currently. In the future yes, but not now :)
And last I looked, Android wants you to use the built-in kernel firmware
loader, and NOT an external firmware binary anymore. So this shouldn't
be an issue for your newer systems anyway :)
I tried to follow these fixes, but I am unfamiliar with fs code. I don't see the generic_file_splice_write function anymore on newer kernels, also AFAICT kernfs_ops does not define {read,write}_iter operations. If the solution is simple and someone could provide the patches I would be happy to test them out. If not, some more information about how to proceed would be nice.
Look at the series of commits starting at fe33850ff798 ("proc: wire upI am not aware of this fix, could you provide me a link for reference? ISince 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?
will try it out.
generic_file_splice_read for iter ops") for how this was fixed in procfs
as an example of what also needs to be done for binary sysfs files.
thanks,
greg k-h