grub-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]