public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] elf: Change ldconfig auxcache magic number (bug 32231)
@ 2024-10-24  5:52 Florian Weimer
  2024-10-24 17:43 ` Adhemerval Zanella Netto
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2024-10-24  5:52 UTC (permalink / raw)
  To: libc-alpha

In commit c628c2296392ed3bf2cb8d8470668e64fe53389f (elf: Remove
ldconfig kernel version check), the layout of auxcache entries
changed because the osversion field was removed from
struct aux_cache_file_entry.  However, AUX_CACHEMAGIC was not
changed, so existing files are still used, potentially leading
to unintended ldconfig behavior.  This commit changes AUX_CACHEMAGIC,
so that the file is regenerated.

Tested on x86_64-linux-gnu.  Verified manually that the early exit in
load_aux_cache is taken due to the change in file magic.

Reported-by: DJ Delorie <dj@redhat.com>

---
 elf/cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elf/cache.c b/elf/cache.c
index 8a618e11fa..62d681df42 100644
--- a/elf/cache.c
+++ b/elf/cache.c
@@ -820,7 +820,7 @@ struct aux_cache_entry
   struct aux_cache_entry *next;
 };
 
-#define AUX_CACHEMAGIC		"glibc-ld.so.auxcache-1.0"
+#define AUX_CACHEMAGIC		"glibc-ld.so.auxcache-2.0"
 
 struct aux_cache_file_entry
 {

base-commit: c5dd659f22058bf9b371ab1cba07631f1206c674


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-24 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24  5:52 [PATCH] elf: Change ldconfig auxcache magic number (bug 32231) Florian Weimer
2024-10-24 17:43 ` Adhemerval Zanella Netto
2024-10-24 18:25   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).