[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/6] efi: Make EFI PXE protocol methods non-callable
From: |
Ard Biesheuvel |
Subject: |
[PATCH v2 2/6] efi: Make EFI PXE protocol methods non-callable |
Date: |
Thu, 11 May 2023 14:06:36 +0200 |
The grub_efi_pxe_t struct definition has placeholders for the various
protocol method pointers, given that they are never called in the code,
and the prototypes have been omitted, and therefore do not comply with
the UEFI spec.
So let's convert them into void* pointers, so they cannot be called
inadvertently.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
include/grub/efi/api.h | 24 ++++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index b4c4646651cd53f5..da1a80ca3a94fe1c 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -1539,18 +1539,18 @@ typedef struct grub_efi_pxe_mode
typedef struct grub_efi_pxe
{
grub_uint64_t rev;
- void (*start) (void);
- void (*stop) (void);
- void (*dhcp) (void);
- void (*discover) (void);
- void (*mftp) (void);
- void (*udpwrite) (void);
- void (*udpread) (void);
- void (*setipfilter) (void);
- void (*arp) (void);
- void (*setparams) (void);
- void (*setstationip) (void);
- void (*setpackets) (void);
+ void *start;
+ void *stop;
+ void *dhcp;
+ void *discover;
+ void *mftp;
+ void *udpwrite;
+ void *udpread;
+ void *setipfilter;
+ void *arp;
+ void *setparams;
+ void *setstationip;
+ void *setpackets;
struct grub_efi_pxe_mode *mode;
} grub_efi_pxe_t;
--
2.39.2
- [PATCH v2 0/6] efi: Implement generic EFI boot for x86, Ard Biesheuvel, 2023/05/11
- [PATCH v2 2/6] efi: Make EFI PXE protocol methods non-callable,
Ard Biesheuvel <=
- [PATCH v2 3/6] efi: Add calling convention annotation to all prototypes, Ard Biesheuvel, 2023/05/11
- [PATCH v2 5/6] efi: Remove x86_64 call wrappers, Ard Biesheuvel, 2023/05/11
- [PATCH v2 1/6] ia64: Remove support, Ard Biesheuvel, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, John Paul Adrian Glaubitz, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, Ard Biesheuvel, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, Steve McIntyre, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, John Paul Adrian Glaubitz, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, Ard Biesheuvel, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, matoro, 2023/05/11
- Re: [PATCH v2 1/6] ia64: Remove support, Ard Biesheuvel, 2023/05/11