]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
efi: Make EFI PXE protocol methods non-callable
authorArd Biesheuvel <ardb@kernel.org>
Tue, 23 May 2023 15:31:41 +0000 (17:31 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 May 2023 14:48:00 +0000 (16:48 +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>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
include/grub/efi/api.h

index 4ae5e51c9013ceb3dae7a39b697cc13b4ed52f23..7077d2265df9b20a06c35797f6cf6742b46f2fb6 100644 (file)
@@ -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;