Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
On Fri, 29 Mar 2024 at 14:57, Heinrich Schuchardt wrote: > > On 3/29/24 13:25, Mark Kettenis wrote: > >> From: Ilias Apalodimas > >> Date: Fri, 29 Mar 2024 09:19:27 +0200 > >> > >> When EFI variables are stored on file we don't allow SetVariableRT, > >> since the OS doesn't know how to access or

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Heinrich Schuchardt
On 3/29/24 13:25, Mark Kettenis wrote: From: Ilias Apalodimas Date: Fri, 29 Mar 2024 09:19:27 +0200 When EFI variables are stored on file we don't allow SetVariableRT, since the OS doesn't know how to access or write that file. At the same time keeping the U-Boot drivers alive in runtime secti

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
Hi Heinrich, > > > > > > + struct efi_var_entry *var; > > > + efi_uintn_t ret; > > > + bool append, delete; > > > + u64 time = 0; > > > + > > > + /* Authenticated variables are not supported */ > > > + if (attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) >

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
Hi Mark, [...] > > > > Open questions: > > Looking at the EFI spec, I can't find a documented way of notifying the OS > > that the storage is volatile. I would like to send a hint to the OS about > > that and I was thinking of adding a configuration table with the filename, > > which U-Boot expec

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
[...] > > > > +config EFI_RT_VOLATILE_STORE > > + bool "Allow variable runtime services in volatile storage (e.g RAM)" > > + depends on EFI_VARIABLE_FILE_STORE > > + help > > + When EFI variables are stored on file we don't allow SetVariableRT, > > + since the OS doesn't kn

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Mark Kettenis
> From: Ilias Apalodimas > Date: Fri, 29 Mar 2024 09:19:27 +0200 > > When EFI variables are stored on file we don't allow SetVariableRT, > since the OS doesn't know how to access or write that file. At the same > time keeping the U-Boot drivers alive in runtime sections and performing > writes f

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Heinrich Schuchardt
On 3/29/24 08:19, Ilias Apalodimas wrote: When EFI variables are stored on file we don't allow SetVariableRT, since the OS doesn't know how to access or write that file. At the same time keeping the U-Boot drivers alive in runtime sections and performing writes from the firmware is dangerous --

Re: [RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
+cc Peter On Fri, 29 Mar 2024 at 09:19, Ilias Apalodimas wrote: > > When EFI variables are stored on file we don't allow SetVariableRT, > since the OS doesn't know how to access or write that file. At the same > time keeping the U-Boot drivers alive in runtime sections and performing > writes fr

[RFC PATCH] efi_loader: conditionally enable SetvariableRT

2024-03-29 Thread Ilias Apalodimas
When EFI variables are stored on file we don't allow SetVariableRT, since the OS doesn't know how to access or write that file. At the same time keeping the U-Boot drivers alive in runtime sections and performing writes from the firmware is dangerous -- if at all possible. For GetVariableRT we c