[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <886f1357-8d14-bb63-bf46-837bb6922ebd@huawei.com>
Date: Wed, 17 Sep 2025 09:55:35 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: kemal <kmal@...k.li>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next v6 10/10] arm64: entry: Convert to generic entry
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
Powered by blists - more mailing lists