Re: [PATCH 2/3] efivarfs: Remove unused internal struct members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Mar 2024 at 01:27, Tim Schumacher <timschumi@xxxxxx> wrote:
>
> The structure was moved to the efivarfs internals in commit 2d82e6227ea1
> ("efi: vars: Move efivar caching layer into efivarfs") after previously
> being used as the data ABI for efivars until its removal in commit
> 0f5b2c69a4cb ("efi: vars: Remove deprecated 'efivars' sysfs interface").
>
> As efivarfs only uses the structure for the variable name caching layer,
> the data-related members were never in use. Remove them to avoid
> implying that efivarfs is bound by the same restrictions that efivars
> once had.
>
> Since we are changing the last copy of "struct efi_variable", document
> the former layout in the ABI documentation of /sys/firmware/efi/vars
> that is still left over.
>
> Signed-off-by: Tim Schumacher <timschumi@xxxxxx>
> ---
> I'm unsure if this is how documentation of removed interfaces is/should
> be handled, input on this would be greatly appreciated. Of course, the
> alternative to what I did here is to remove the documentation
> completely. If someone is running a kernel old enough to have this
> interface, then the matching kernel source will still contain said
> documentation.
> ---
>  Documentation/ABI/stable/sysfs-firmware-efi-vars | 12 ++++++++++--
>  fs/efivarfs/internal.h                           |  3 ---
>  2 files changed, 10 insertions(+), 5 deletions(-)
>

Please just rip out the doc (but in a separate patch and cc the
Documentation maintainers)


> diff --git a/Documentation/ABI/stable/sysfs-firmware-efi-vars b/Documentation/ABI/stable/sysfs-firmware-efi-vars
> index 46ccd233e359..461b9139cedb 100644
> --- a/Documentation/ABI/stable/sysfs-firmware-efi-vars
> +++ b/Documentation/ABI/stable/sysfs-firmware-efi-vars
> @@ -41,8 +41,16 @@ Description:
>                 raw_var:        A binary file that can be read to obtain
>                                 a structure that contains everything
>                                 there is to know about the variable.
> -                               For structure definition see "struct
> -                               efi_variable" in the kernel sources.
> +
> +                               The structure is defined as follows:
> +                               struct efi_variable {
> +                                       efi_char16_t VariableName[512];
> +                                       efi_guid_t VendorGuid;
> +                                       unsigned long DataSize;
> +                                       __u8 Data[1024];
> +                                       efi_status_t Status;
> +                                       __u32 Attributes;
> +                               } __attribute__((packed));
>
>                                 This file can also be written to in
>                                 order to update the value of a variable.
> diff --git a/fs/efivarfs/internal.h b/fs/efivarfs/internal.h
> index f7206158ee81..971560a01320 100644
> --- a/fs/efivarfs/internal.h
> +++ b/fs/efivarfs/internal.h
> @@ -24,9 +24,6 @@ struct efivarfs_fs_info {
>  struct efi_variable {
>         efi_char16_t  VariableName[EFI_VAR_NAME_LEN/sizeof(efi_char16_t)];
>         efi_guid_t    VendorGuid;
> -       unsigned long DataSize;
> -       __u8          Data[1024];
> -       efi_status_t  Status;
>         __u32         Attributes;
>  } __attribute__((packed));
>

I suppose we can drop the packed attribute too, given that this is no
longer external ABI.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux