From: Ard Biesheuvel <ardb@kernel.org>
To: Tim Schumacher <timschumi@gmx.de>
Cc: linux-efi@vger.kernel.org, Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH 2/3] efivarfs: Remove unused internal struct members
Date: Fri, 15 Mar 2024 10:19:15 +0100 [thread overview]
Message-ID: <CAMj1kXFf8tmTkO+xn4PwumJ3pQQUQ7TUMtEBNBMc+HXb4ab5dQ@mail.gmail.com> (raw)
In-Reply-To: <20240315002616.422802-2-timschumi@gmx.de>
On Fri, 15 Mar 2024 at 01:27, Tim Schumacher <timschumi@gmx.de> 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@gmx.de>
> ---
> 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.
next prev parent reply other threads:[~2024-03-15 9:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 0:25 [PATCH 1/3] efi: pstore: Request at most 512 bytes for variable names Tim Schumacher
2024-03-15 0:25 ` [PATCH 2/3] efivarfs: Remove unused internal struct members Tim Schumacher
2024-03-15 9:19 ` Ard Biesheuvel [this message]
2024-03-15 18:52 ` Tim Schumacher
2024-03-15 0:26 ` [PATCH 3/3] efi: Clear up misconceptions about a maximum variable name size Tim Schumacher
2024-03-15 9:20 ` Ard Biesheuvel
2024-03-15 19:45 ` Tim Schumacher
2024-03-15 9:16 ` [PATCH 1/3] efi: pstore: Request at most 512 bytes for variable names Ard Biesheuvel
2024-03-15 19:02 ` Tim Schumacher
2024-03-15 19:45 ` Guilherme G. Piccoli
2024-03-29 7:34 ` Ard Biesheuvel
2024-03-29 21:32 ` Guilherme G. Piccoli
2024-03-28 20:50 ` [PATCH v2 1/4] " Tim Schumacher
2024-03-28 20:50 ` [PATCH v2 2/4] Documentation: Mark the 'efivars' sysfs interface as removed Tim Schumacher
2024-03-28 20:50 ` [PATCH v2 3/4] efivarfs: Remove unused internal struct members Tim Schumacher
2024-03-28 20:50 ` [PATCH v2 4/4] efi: Clear up misconceptions about a maximum variable name size Tim Schumacher
2024-03-29 7:42 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMj1kXFf8tmTkO+xn4PwumJ3pQQUQ7TUMtEBNBMc+HXb4ab5dQ@mail.gmail.com \
--to=ardb@kernel.org \
--cc=jk@ozlabs.org \
--cc=linux-efi@vger.kernel.org \
--cc=timschumi@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).