Hi all,
Today's linux-next merge of the arm64 tree got a conflict in:
arch/arm64/kernel/signal.c
between commit:
2e8a1acea859 ("arm64: signal: Improve POR_EL0 handling to avoid uaccess failures")
from the arm64-fixes tree and commit:
eaf62ce1563b ("arm64/signal: Set up and restore the GCS context for signal handlers")
from the arm64 tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/arm64/kernel/signal.c
index c7d311d8b92a,2eb2e97a934f..000000000000
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@@ -982,9 -1075,12 +1133,12 @@@ SYSCALL_DEFINE0(rt_sigreturn
if (!access_ok(frame, sizeof (*frame)))
goto badframe;
- if (restore_sigframe(regs, frame))
+ if (restore_sigframe(regs, frame, &ua_state))
goto badframe;
+ if (gcs_restore_signal())
+ goto badframe;
+
if (restore_altstack(&frame->uc.uc_stack))
goto badframe;
@@@ -1297,8 -1447,11 +1507,8 @@@ static int setup_return(struct pt_regs
sme_smstop();
}
- if (ka->sa.sa_flags & SA_RESTORER)
- sigtramp = ka->sa.sa_restorer;
- if (system_supports_poe())
- write_sysreg_s(POR_EL0_INIT, SYS_POR_EL0);
-
+ if (ksig->ka.sa.sa_flags & SA_RESTORER)
+ sigtramp = ksig->ka.sa.sa_restorer;
else
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
@@@ -1325,9 -1478,9 +1537,9 @@@ static int setup_rt_frame(int usig, str
__put_user_error(NULL, &frame->uc.uc_link, err);
err |= __save_altstack(&frame->uc.uc_stack, regs->sp);
- err |= setup_sigframe(&user, regs, set);
+ err |= setup_sigframe(&user, regs, set, &ua_state);
if (err == 0) {
- setup_return(regs, &ksig->ka, &user, usig);
+ err = setup_return(regs, ksig, &user, usig);
if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
err |= copy_siginfo_to_user(&frame->info, &ksig->info);
regs->regs[1] = (unsigned long)&frame->info;
© 2016 - 2024 Red Hat, Inc.