From f0e23d34a7bdf6b90fba954ee741419171ac41b2 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 19 Jul 2021 18:42:26 -0300 Subject: elf: Issue audit la_objopen for vDSO The vDSO is is listed in the link_map chain, but is never the subject of an la_objopen call. A new internal flag __RTLD_VDSO is added that acts as __RTLD_OPENEXEC to allocate the required 'struct auditstate' extra space for the 'struct link_map'. The return value from the callback is currently ignored, since there is no PLT call involved by glibc when using the vDSO, neither the vDSO are exported directly. Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu. Reviewed-by: Florian Weimer --- include/dlfcn.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/dlfcn.h b/include/dlfcn.h index a4c2837..e73294b 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -12,6 +12,8 @@ #define __RTLD_AUDIT 0x08000000 #define __RTLD_SECURE 0x04000000 /* Apply additional security checks. */ #define __RTLD_NOIFUNC 0x02000000 /* Suppress calling ifunc functions. */ +#define __RTLD_VDSO 0x01000000 /* Tell _dl_new_object the object is + system-loaded. */ #define __LM_ID_CALLER -2 -- cgit v1.1