From: Russell King Date: Sat, 24 Jun 2006 21:41:09 +0000 (+0100) Subject: [ARM] Add identifying number for non-rt sigframe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca195cfec9fff622a61b1b72534e73360747f735;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [ARM] Add identifying number for non-rt sigframe GDB couldn't reliably tell the difference between the old and new non-rt sigframes, so provide it with a number at the beginning which will never appear in the old sigframe, and hence provide gdb with a reliable way to tell the two apart. Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 962851144099..c0ba8afee42f 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -470,6 +470,11 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg if (!frame) return 1; + /* + * Set uc.uc_flags to a value which sc.trap_no would never have. + */ + __put_user_error(0x5ac3c35a, &frame->uc.uc_flags, err); + err |= setup_sigframe(frame, regs, set); if (err == 0) err = setup_return(regs, ka, frame->retcode, frame, usig);