Re: [PATCH] parisc: Only call VDSO32_SYMBOL() when valid
Helge Deller <[email protected]>
| Newsgroups | org.kernel.vger.linux-parisc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas,
On 4/29/26 22:59, Thomas Weißschuh wrote:
> The definitions used by VDSO32_SYMBOL() only work if the 32-bit vDSO
> actually exists.
Do you have a .config with which the problem can be reproduced?
> Fixes: 3dce91790205 ("parisc: Allow to build without VDSO32")
> Signed-off-by: Thomas Weißschuh <[email protected]>
> ---
> arch/parisc/kernel/signal.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
> index 64a62006bb15..192121047633 100644
> --- a/arch/parisc/kernel/signal.c
> +++ b/arch/parisc/kernel/signal.c
> @@ -276,7 +276,9 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
> rp = VDSO64_SYMBOL(current, sigtramp_rt);
> else
> #endif
> +#if defined(CONFIG_PA11) || defined(CONFIG_COMPAT)
> rp = VDSO32_SYMBOL(current, sigtramp_rt);
> +#endif
This is wrong (dangerous).
If this BVDSO32_SYMBOL() line is left out, the "if (in_syscall)" below
is put together with the "else" in the VDSO64_SYMBOL() path above.
> if (in_syscall)
> rp += 4*4; /* skip 4 instructions and start at ldi 1,%r25 */
> @@ -514,10 +516,12 @@ insert_restart_trampoline(struct pt_regs *regs)
> rp = VDSO64_SYMBOL(current, restart_syscall);
> } else
> #endif
> +#if defined(CONFIG_PA11) || defined(CONFIG_COMPAT)
> {
> err |= put_user(regs->gr[31], &usp[0]);
> rp = VDSO32_SYMBOL(current, restart_syscall);
> }
> +#endif
same here...
> WARN_ON(err);
>
> regs->gr[31] = rp;
>
> ---
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> change-id: 20260428-parisc-compat-vdso-956b2a3a2123
>
> Best regards,
> --
> Thomas Weißschuh <[email protected]>
>