[PATCH -next v6 10/10] arm64: entry: Convert to generic entry

kemal kmal at cock.li
Tue Sep 16 07:46:21 PDT 2025


Hi, can you make it so that this patch series support Syscall User
Dispatch? There needs to be 2 changes:

1 - Implementing arch_syscall_is_vdso_sigreturn
Here is my implementation for it:
(I checked for syscallno unlike x86, which checks if the IP exactly
matches with the VDSO sigreturn symbol. This solution seems better to me)

bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
{
	unsigned long addr, pc;

	pc = regs->pc - 4;
#ifdef CONFIG_COMPAT
	if (is_compat_task()) {
		addr = (unsigned long)current->mm->context.sigpage;
		if (pc >= addr && pc < addr + PAGE_SIZE)
			return true;
		return false;
	}
#endif
	if (regs->syscallno != __NR_rt_sigreturn)
		return false;
	addr = (unsigned long)current->mm->context.vdso;
	if (pc < addr || pc >= addr + vdso_info[VDSO_ABI_AA64].vdso_pages * PAGE_SIZE)
		return false;
	return true;
}

2 - This trick shouldn't be done if the syscall will be catched by SUD:
if (scno == NO_SYSCALL)
	syscall_set_return_value(current, regs, -ENOSYS, 0);
As the ABI could be anything.

Thanks,
-kemal



More information about the linux-arm-kernel mailing list