Messages in this thread | | | From | Matthew Garrett <> | Date | Tue, 20 Feb 2018 23:39:27 +0000 | Subject | Re: [PATCH 1/2] fs/efivarfs: restrict inode permissions |
| |
On Tue, Feb 20, 2018 at 3:30 PM Luck, Tony <tony.luck@intel.com> wrote: > [1] I didn't dig through the Linux code to check whether we manage to > get those four SMIs from a single EFI call, or whether we make multiple > EFI calls to open/read/close one file. It is possible that we stink a > bit too if we are doing more EFI calls than required.
read() will make two calls - one to obtain the size of the variable, the other to read it. It looks like cat will also trigger an fstat(), so we're probably also making a call for that. There's presumably some optimisation that could be made there if we trust the firmware not to change the size behind our back.
| |