[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/15] grub_dl_set_mem_attrs(): fix format string
From: |
Mate Kukri |
Subject: |
[PATCH 11/15] grub_dl_set_mem_attrs(): fix format string |
Date: |
Fri, 24 May 2024 12:03:58 +0100 |
From: Laszlo Ersek <lersek@redhat.com>
The grub_dprintf() call for printing the message
updating attributes for GOT and trampolines
passes the argument "mod->name", but the format string doesn't accept that
argument.
Print the module name too.
Example output:
> kern/dl.c:736: updating attributes for GOT and trampolines ("video_fb")
Fixes: ad1b904d325b (nx: set page permissions for loaded modules.)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
(cherry picked from commit ee58dd70d627df54b806e94409673a11caab5a5d)
Signed-off-by: Jan Setje-Eilers <jan.setjeeilers@oracle.com>
Signed-off-by: Mate Kukri <mate.kukri@canonical.com>
---
grub-core/kern/dl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index 042033a90..78e53b078 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -696,7 +696,8 @@ grub_dl_set_mem_attrs (grub_dl_t mod, void *ehdr)
{
tgsz = ALIGN_UP(tgsz, arch_addralign);
- grub_dprintf ("modules", "updating attributes for GOT and trampolines\n",
+ grub_dprintf ("modules",
+ "updating attributes for GOT and trampolines (\"%s\")\n",
mod->name);
if (tgaddr < (grub_addr_t)mod->base ||
tgsz > (grub_addr_t)-1 - tgaddr ||
--
2.39.2
- [PATCH 00/15] UEFI NX support and NX Linux loader using shim loader protocol, Mate Kukri, 2024/05/24
- [PATCH 05/15] modules: load module sections at page-aligned addresses, Mate Kukri, 2024/05/24
- [PATCH 04/15] pe: add the DOS header struct and fix some bad naming., Mate Kukri, 2024/05/24
- [PATCH 06/15] nx: add memory attribute get/set API, Mate Kukri, 2024/05/24
- [PATCH 10/15] grub_dl_set_mem_attrs(): add self-check for the tramp/GOT sizes, Mate Kukri, 2024/05/24
- [PATCH 11/15] grub_dl_set_mem_attrs(): fix format string,
Mate Kukri <=
- [PATCH 09/15] grub_dl_load_segments(): page-align the tramp/GOT areas too, Mate Kukri, 2024/05/24
- [PATCH 01/15] modules: make .module_license read-only, Mate Kukri, 2024/05/24
- [PATCH 13/15] efi: Provide wrappers for load_image, start_image, unload_image, Mate Kukri, 2024/05/24
- [PATCH 03/15] modules: Don't allocate space for non-allocable sections., Mate Kukri, 2024/05/24
- [PATCH 15/15] efi: Disallow fallback to legacy Linux loader when shim says NX is required., Mate Kukri, 2024/05/24
- [PATCH 14/15] efi: Use shim's loader protocol for EFI image verification and loading, Mate Kukri, 2024/05/24