[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] efi: Drop __grub_efi_api attribute from shim_lock->ve
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 1/2] efi: Drop __grub_efi_api attribute from shim_lock->verify() call |
Date: |
Fri, 30 Jun 2023 16:07:27 +0200 |
On Thu, Jun 29, 2023 at 08:35:17PM -0500, Glenn Washburn wrote:
> On Thu, 29 Jun 2023 20:02:31 +0200
> Daniel Kiper <daniel.kiper@oracle.com> wrote:
>
> > ... because (surprisingly) it uses System V AMD64 ABI on x86-64
> > architecture...
> >
> > Fixes: 6a080b9cd (efi: Add calling convention annotation to all prototypes)
> >
> > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > Acked-by: Ard Biesheuvel <ardb@kernel.org>
> > ---
> > include/grub/efi/api.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
> > index 16161e1f0..f3c50ed5d 100644
> > --- a/include/grub/efi/api.h
> > +++ b/include/grub/efi/api.h
> > @@ -1777,7 +1777,7 @@ typedef struct grub_efi_block_io grub_efi_block_io_t;
> >
> > struct grub_efi_shim_lock_protocol
> > {
> > - grub_efi_status_t (__grub_efi_api *verify) (void *buffer, grub_uint32_t
> > size);
> > + grub_efi_status_t (*verify) (void *buffer, grub_uint32_t size);
>
> I would suggest adding a comment above this line, something like:
>
> The shim_lock_protcol uses System V AMD64 ABI on x86-64 as specified
> in __insert specification reference here__, unlike most UEFI protocol
> methods, which use the MSABI calling convention.
>
> I may have some details wrong in the above, so change as needed. Also,
> I'm confused by your commit message. If this is only on x86-64, what
> about the other EFI architectures? This change's contents suggest it
> applies to all of them. Or is the shim lock protocol itself limited to
> x86-64 architectures?
I have added a comment and updated commit message as you suggested. Sadly
I do not know a link to doc, except source code :-), which describes
shim_lock->verify() calling convention. If we find one we can add it
later...
Daniel