Skip to content

Commit 93d7300

Browse files
H. Peter Anvinhansendc
authored andcommitted
x86/entry/vdso: Rename vdso_image_* to vdso*_image
The vdso .so files are named vdso*.so. These structures are binary images and descriptions of these files, so it is more consistent for them to have a naming that more directly mirrors the filenames. It is also very slightly more compact (by one character...) and simplifies the Makefile just a little bit. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://patch.msgid.link/20251216212606.1325678-2-hpa@zytor.com
1 parent 0f61b18 commit 93d7300

8 files changed

Lines changed: 23 additions & 26 deletions

File tree

arch/x86/entry/syscall_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ __visible noinstr bool do_fast_syscall_32(struct pt_regs *regs)
319319
* convention. Adjust regs so it looks like we entered using int80.
320320
*/
321321
unsigned long landing_pad = (unsigned long)current->mm->context.vdso +
322-
vdso_image_32.sym_int80_landing_pad;
322+
vdso32_image.sym_int80_landing_pad;
323323

324324
/*
325325
* SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward

arch/x86/entry/vdso/.gitignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
vdso.lds
3-
vdsox32.lds
4-
vdso32-syscall-syms.lds
5-
vdso32-sysenter-syms.lds
6-
vdso32-int80-syms.lds
7-
vdso-image-*.c
8-
vdso2c
2+
*.lds
3+
*.so
4+
*.so.dbg
5+
vdso*-image.c

arch/x86/entry/vdso/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ vobjs-$(CONFIG_X86_SGX) += vsgx.o
1616
obj-y += vma.o extable.o
1717

1818
# vDSO images to build:
19-
obj-$(CONFIG_X86_64) += vdso-image-64.o
20-
obj-$(CONFIG_X86_X32_ABI) += vdso-image-x32.o
21-
obj-$(CONFIG_COMPAT_32) += vdso-image-32.o vdso32-setup.o
19+
obj-$(CONFIG_X86_64) += vdso64-image.o
20+
obj-$(CONFIG_X86_X32_ABI) += vdsox32-image.o
21+
obj-$(CONFIG_COMPAT_32) += vdso32-image.o vdso32-setup.o
2222

2323
vobjs := $(addprefix $(obj)/, $(vobjs-y))
2424
vobjs32 := $(addprefix $(obj)/, $(vobjs32-y))
@@ -44,7 +44,7 @@ hostprogs += vdso2c
4444
quiet_cmd_vdso2c = VDSO2C $@
4545
cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@
4646

47-
$(obj)/vdso-image-%.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FORCE
47+
$(obj)/vdso%-image.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FORCE
4848
$(call if_changed,vdso2c)
4949

5050
#

arch/x86/entry/vdso/vma.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static vm_fault_t vdso_fault(const struct vm_special_mapping *sm,
6565
static void vdso_fix_landing(const struct vdso_image *image,
6666
struct vm_area_struct *new_vma)
6767
{
68-
if (in_ia32_syscall() && image == &vdso_image_32) {
68+
if (in_ia32_syscall() && image == &vdso32_image) {
6969
struct pt_regs *regs = current_pt_regs();
7070
unsigned long vdso_land = image->sym_int80_landing_pad;
7171
unsigned long old_land_addr = vdso_land +
@@ -230,7 +230,7 @@ static int load_vdso32(void)
230230
if (vdso32_enabled != 1) /* Other values all mean "disabled" */
231231
return 0;
232232

233-
return map_vdso(&vdso_image_32, 0);
233+
return map_vdso(&vdso32_image, 0);
234234
}
235235

236236
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
@@ -239,7 +239,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
239239
if (!vdso64_enabled)
240240
return 0;
241241

242-
return map_vdso(&vdso_image_64, 0);
242+
return map_vdso(&vdso64_image, 0);
243243
}
244244

245245
return load_vdso32();
@@ -252,7 +252,7 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
252252
if (IS_ENABLED(CONFIG_X86_X32_ABI) && x32) {
253253
if (!vdso64_enabled)
254254
return 0;
255-
return map_vdso(&vdso_image_x32, 0);
255+
return map_vdso(&vdsox32_image, 0);
256256
}
257257

258258
if (IS_ENABLED(CONFIG_IA32_EMULATION))
@@ -267,7 +267,7 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
267267
const struct vdso_image *image = current->mm->context.vdso_image;
268268
unsigned long vdso = (unsigned long) current->mm->context.vdso;
269269

270-
if (in_ia32_syscall() && image == &vdso_image_32) {
270+
if (in_ia32_syscall() && image == &vdso32_image) {
271271
if (regs->ip == vdso + image->sym_vdso32_sigreturn_landing_pad ||
272272
regs->ip == vdso + image->sym_vdso32_rt_sigreturn_landing_pad)
273273
return true;

arch/x86/include/asm/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ else if (IS_ENABLED(CONFIG_IA32_EMULATION)) \
361361

362362
#define VDSO_ENTRY \
363363
((unsigned long)current->mm->context.vdso + \
364-
vdso_image_32.sym___kernel_vsyscall)
364+
vdso32_image.sym___kernel_vsyscall)
365365

366366
struct linux_binprm;
367367

arch/x86/include/asm/vdso.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ struct vdso_image {
2727
long sym_vdso32_rt_sigreturn_landing_pad;
2828
};
2929

30-
extern const struct vdso_image vdso_image_64;
31-
extern const struct vdso_image vdso_image_x32;
32-
extern const struct vdso_image vdso_image_32;
30+
extern const struct vdso_image vdso64_image;
31+
extern const struct vdso_image vdsox32_image;
32+
extern const struct vdso_image vdso32_image;
3333

3434
extern int __init init_vdso_image(const struct vdso_image *image);
3535

arch/x86/kernel/process_64.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,14 +941,14 @@ long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2)
941941
#ifdef CONFIG_CHECKPOINT_RESTORE
942942
# ifdef CONFIG_X86_X32_ABI
943943
case ARCH_MAP_VDSO_X32:
944-
return prctl_map_vdso(&vdso_image_x32, arg2);
944+
return prctl_map_vdso(&vdsox32_image, arg2);
945945
# endif
946946
# ifdef CONFIG_IA32_EMULATION
947947
case ARCH_MAP_VDSO_32:
948-
return prctl_map_vdso(&vdso_image_32, arg2);
948+
return prctl_map_vdso(&vdso32_image, arg2);
949949
# endif
950950
case ARCH_MAP_VDSO_64:
951-
return prctl_map_vdso(&vdso_image_64, arg2);
951+
return prctl_map_vdso(&vdso64_image, arg2);
952952
#endif
953953
#ifdef CONFIG_ADDRESS_MASKING
954954
case ARCH_GET_UNTAG_MASK:

arch/x86/kernel/signal_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ int ia32_setup_frame(struct ksignal *ksig, struct pt_regs *regs)
282282
/* Return stub is in 32bit vsyscall page */
283283
if (current->mm->context.vdso)
284284
restorer = current->mm->context.vdso +
285-
vdso_image_32.sym___kernel_sigreturn;
285+
vdso32_image.sym___kernel_sigreturn;
286286
else
287287
restorer = &frame->retcode;
288288
}
@@ -368,7 +368,7 @@ int ia32_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
368368
restorer = ksig->ka.sa.sa_restorer;
369369
else
370370
restorer = current->mm->context.vdso +
371-
vdso_image_32.sym___kernel_rt_sigreturn;
371+
vdso32_image.sym___kernel_rt_sigreturn;
372372
unsafe_put_user(ptr_to_compat(restorer), &frame->pretcode, Efault);
373373

374374
/*

0 commit comments

Comments
 (0)