All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: grub-devel@gnu.org
Cc: dkiper@net-space.pl, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 1/5] efi: Make EFI PXE protocol methods non-callable
Date: Tue,  9 May 2023 18:53:37 +0200	[thread overview]
Message-ID: <20230509165341.1609558-2-ardb@kernel.org> (raw)
In-Reply-To: <20230509165341.1609558-1-ardb@kernel.org>

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



  reply	other threads:[~2023-05-09 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 16:53 [PATCH 0/5] efi: Implement generic EFI boot for x86_64 Ard Biesheuvel
2023-05-09 16:53 ` Ard Biesheuvel [this message]
2023-05-09 16:53 ` [PATCH 2/5] efi: Add calling convention annotation to all prototypes Ard Biesheuvel
2023-05-09 16:53 ` [PATCH 3/5] efi: Drop all uses of efi_call_XX wrappers Ard Biesheuvel
2023-05-09 16:53 ` [PATCH 4/5] efi: Remove x86_64 call wrappers Ard Biesheuvel
2023-05-09 16:53 ` [PATCH 5/5] efi: Use generic EFI loader for x86_64 Ard Biesheuvel
2023-05-10 10:40   ` Ard Biesheuvel
2023-05-10 12:17     ` Daniel Kiper
2023-05-10 17:40       ` Ard Biesheuvel
2023-05-11  8:15         ` 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=20230509165341.1609558-2-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.