From 91bf695596f594e42d69d70deb2ae53cafecf77c Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Sun, 27 Sep 2020 09:16:33 +0000 Subject: powerpc/vdso: Retrieve sigtramp offsets at buildtime This is copied from arm64. Instead of using runtime generated signal trampoline offsets, get offsets at buildtime. If the said trampoline doesn't exist, build will fail. So no need to check whether the trampoline exists or not in the VDSO. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f8bfd6812c3e3678b1cdb4d55a52f9eb022b40d3.1601197618.git.christophe.leroy@csgroup.eu --- arch/powerpc/kernel/signal_32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/powerpc/kernel/signal_32.c') diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index e45aafef4c5b..934cbdf6dd10 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -801,8 +801,8 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, } /* Save user registers on the stack */ - if (vdso32_rt_sigtramp && tsk->mm->context.vdso) { - tramp = (unsigned long)tsk->mm->context.vdso + vdso32_rt_sigtramp; + if (tsk->mm->context.vdso) { + tramp = VDSO32_SYMBOL(tsk->mm->context.vdso, sigtramp_rt32); } else { tramp = (unsigned long)mctx->mc_pad; /* Set up the sigreturn trampoline: li r0,sigret; sc */ @@ -901,8 +901,8 @@ int handle_signal32(struct ksignal *ksig, sigset_t *oldset, else unsafe_save_user_regs(regs, mctx, tm_mctx, 1, failed); - if (vdso32_sigtramp && tsk->mm->context.vdso) { - tramp = (unsigned long)tsk->mm->context.vdso + vdso32_sigtramp; + if (tsk->mm->context.vdso) { + tramp = VDSO32_SYMBOL(tsk->mm->context.vdso, sigtramp32); } else { tramp = (unsigned long)mctx->mc_pad; /* Set up the sigreturn trampoline: li r0,sigret; sc */ -- cgit