Patch "MIPS: ptrace: Fix regs_return_value for kernel context" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
MIPS: ptrace: Fix regs_return_value for kernel context
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-ptrace-fix-regs_return_value-for-kernel-context.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
74f1077b5b783e7bf4fa3007cefdc8dbd6c07518Mon Sep 17 00:00:00 2001
From: Marcin Nowakowski <[email protected]>
Date: Wed, 12 Oct 2016 09:32:56 +0200
Subject: MIPS: ptrace: Fix regs_return_value for kernel context
From: Marcin Nowakowski <[email protected]>
commit 74f1077b5b783e7bf4fa3007cefdc8dbd6c07518 upstream.
Currently regs_return_value always negates reg[2] if it determines the syscall has failed, but when called in kernel context this check is invalid and may result in returning a wrong value.
This fixes errors reported by CONFIG_KPROBES_SANITY_TEST
Patchwork: https://patchwork.linux-mips.org/patch/14381/
--- arch/mips/include/asm/ptrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/ptrace.h +1 -1
@@ -152,7 +152,7 @@ static inline int is_syscall_success(strstatic inline long regs_return_value (struct pt_regs *regs) { -if (is_syscall_success (regs)) +if (is_syscall_success (regs) || !user_mode (regs))return regs->regs[2 ];else return -regs->regs[2 ];
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/mips-ptrace-fix-regs_return_value-for-kernel-context.patch