Re: [PATCH] fs: btrfs: fix reading when length specified

2023-11-17 Thread Tom Rini
On Sat, Nov 11, 2023 at 08:19:04AM -0700, Sam Edwards wrote: > The btrfs read function limits the read length to ensure that it > and the read offset do not together exceed the size of the file. > However, this size was only being queried if the read length was > passed a value of zero (meaning "w

Re: [PATCH] fs: btrfs: fix reading when length specified

2023-11-16 Thread Sam Edwards
On 11/15/23 21:43, Qu Wenruo wrote: I'm not sure why this happend for the EFI environment. Doesn't the EFI runtime should also try to read the whole file? Or that EFI environment has specified the length to read instead? Hi Qu, The Linux EFISTUB file loading routine (handle_cmdline_files) r

Re: [PATCH] fs: btrfs: fix reading when length specified

2023-11-15 Thread Qu Wenruo
On 2023/11/12 01:49, Sam Edwards wrote: The btrfs read function limits the read length to ensure that it and the read offset do not together exceed the size of the file. However, this size was only being queried if the read length was passed a value of zero (meaning "whole file"), and the size

[PATCH] fs: btrfs: fix reading when length specified

2023-11-11 Thread Sam Edwards
The btrfs read function limits the read length to ensure that it and the read offset do not together exceed the size of the file. However, this size was only being queried if the read length was passed a value of zero (meaning "whole file"), and the size is defaulted to 0 otherwise. This means the