Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/vdso/vdso2c: Remove page handling

The values are not used anymore.
Also the sanity checks performed by vdso2c can never trigger as they
only validate invariants already enforced by the linker script.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-16-13a4669dfc8c@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
9729dcea dafde296

-51
-4
arch/x86/entry/vdso/vdso-layout.lds.S
··· 24 24 pvclock_page = vclock_pages + VDSO_PAGE_PVCLOCK_OFFSET * PAGE_SIZE; 25 25 hvclock_page = vclock_pages + VDSO_PAGE_HVCLOCK_OFFSET * PAGE_SIZE; 26 26 27 - /* For compatibility with vdso2c */ 28 - vvar_page = vdso_u_data; 29 - vvar_start = vdso_u_data; 30 - 31 27 . = SIZEOF_HEADERS; 32 28 33 29 .hash : { *(.hash) } :text
-21
arch/x86/entry/vdso/vdso2c.c
··· 69 69 70 70 const char *outfilename; 71 71 72 - /* Symbols that we need in vdso2c. */ 73 - enum { 74 - sym_vvar_start, 75 - sym_vvar_page, 76 - sym_pvclock_page, 77 - sym_hvclock_page, 78 - sym_timens_page, 79 - }; 80 - 81 - const int special_pages[] = { 82 - sym_vvar_page, 83 - sym_pvclock_page, 84 - sym_hvclock_page, 85 - sym_timens_page, 86 - }; 87 - 88 72 struct vdso_sym { 89 73 const char *name; 90 74 bool export; 91 75 }; 92 76 93 77 struct vdso_sym required_syms[] = { 94 - [sym_vvar_start] = {"vvar_start", true}, 95 - [sym_vvar_page] = {"vvar_page", true}, 96 - [sym_pvclock_page] = {"pvclock_page", true}, 97 - [sym_hvclock_page] = {"hvclock_page", true}, 98 - [sym_timens_page] = {"timens_page", true}, 99 78 {"VDSO32_NOTE_MASK", true}, 100 79 {"__kernel_vsyscall", true}, 101 80 {"__kernel_sigreturn", true},
-20
arch/x86/entry/vdso/vdso2c.h
··· 150 150 } 151 151 } 152 152 153 - /* Validate mapping addresses. */ 154 - for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) { 155 - INT_BITS symval = syms[special_pages[i]]; 156 - 157 - if (!symval) 158 - continue; /* The mapping isn't used; ignore it. */ 159 - 160 - if (symval % 4096) 161 - fail("%s must be a multiple of 4096\n", 162 - required_syms[i].name); 163 - if (symval + 4096 < syms[sym_vvar_start]) 164 - fail("%s underruns vvar_start\n", 165 - required_syms[i].name); 166 - if (symval + 4096 > 0) 167 - fail("%s is on the wrong side of the vdso text\n", 168 - required_syms[i].name); 169 - } 170 - if (syms[sym_vvar_start] % 4096) 171 - fail("vvar_begin must be a multiple of 4096\n"); 172 - 173 153 if (!image_name) { 174 154 fwrite(stripped_addr, stripped_len, 1, outfile); 175 155 return;
-6
arch/x86/include/asm/vdso.h
··· 18 18 unsigned long extable_base, extable_len; 19 19 const void *extable; 20 20 21 - long sym_vvar_start; /* Negative offset to the vvar area */ 22 - 23 - long sym_vvar_page; 24 - long sym_pvclock_page; 25 - long sym_hvclock_page; 26 - long sym_timens_page; 27 21 long sym_VDSO32_NOTE_MASK; 28 22 long sym___kernel_sigreturn; 29 23 long sym___kernel_rt_sigreturn;