[PATCH -next v6 10/10] arm64: entry: Convert to generic entry
Jinjie Ruan
ruanjinjie at huawei.com
Tue Sep 16 18:55:35 PDT 2025
On 2025/9/16 22:46, kemal wrote:
> 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;
> }
Thank you! I will try to implement arch_syscall_is_vdso_sigreturn() as
this and test it. By the way, is this for supporting arm64 in wine?
>
> 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.
This requires discussion with Catalin and Will, which may alter the
original intent.
>
> Thanks,
> -kemal
More information about the linux-arm-kernel
mailing list