Commit 93d73005 authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Dave Hansen
Browse files

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: default avatarH. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20251216212606.1325678-2-hpa@zytor.com
parent 0f61b186
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ __visible noinstr bool do_fast_syscall_32(struct pt_regs *regs)
	 * convention.  Adjust regs so it looks like we entered using int80.
	 */
	unsigned long landing_pad = (unsigned long)current->mm->context.vdso +
					vdso_image_32.sym_int80_landing_pad;
					vdso32_image.sym_int80_landing_pad;

	/*
	 * SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
+4 −7
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
vdso.lds
vdsox32.lds
vdso32-syscall-syms.lds
vdso32-sysenter-syms.lds
vdso32-int80-syms.lds
vdso-image-*.c
vdso2c
*.lds
*.so
*.so.dbg
vdso*-image.c
+4 −4
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ vobjs-$(CONFIG_X86_SGX) += vsgx.o
obj-y						+= vma.o extable.o

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

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

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

#
+5 −5
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static vm_fault_t vdso_fault(const struct vm_special_mapping *sm,
static void vdso_fix_landing(const struct vdso_image *image,
		struct vm_area_struct *new_vma)
{
	if (in_ia32_syscall() && image == &vdso_image_32) {
	if (in_ia32_syscall() && image == &vdso32_image) {
		struct pt_regs *regs = current_pt_regs();
		unsigned long vdso_land = image->sym_int80_landing_pad;
		unsigned long old_land_addr = vdso_land +
@@ -230,7 +230,7 @@ static int load_vdso32(void)
	if (vdso32_enabled != 1)  /* Other values all mean "disabled" */
		return 0;

	return map_vdso(&vdso_image_32, 0);
	return map_vdso(&vdso32_image, 0);
}

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)
		if (!vdso64_enabled)
			return 0;

		return map_vdso(&vdso_image_64, 0);
		return map_vdso(&vdso64_image, 0);
	}

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

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

	if (in_ia32_syscall() && image == &vdso_image_32) {
	if (in_ia32_syscall() && image == &vdso32_image) {
		if (regs->ip == vdso + image->sym_vdso32_sigreturn_landing_pad ||
		    regs->ip == vdso + image->sym_vdso32_rt_sigreturn_landing_pad)
			return true;
+1 −1
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ else if (IS_ENABLED(CONFIG_IA32_EMULATION)) \

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

struct linux_binprm;

Loading