Patch "MIPS: uprobes: fix use of uninitialised variable" 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: uprobes: fix use of uninitialised variable
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-uprobes-fix-use-of-uninitialised-variable.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
ca86c9ef2b322ebf24772009fdea037688cbdac1Mon Sep 17 00:00:00 2001
From: Marcin Nowakowski <[email protected]>
Date: Thu, 22 Sep 2016 15:38:33 +0200
Subject: MIPS: uprobes: fix use of uninitialised variable
From: Marcin Nowakowski <[email protected]>
commit ca86c9ef2b322ebf24772009fdea037688cbdac1 upstream.
arch_uprobe_pre_xol needs to emulate a branch if a branch instruction has been replaced with a breakpoint, but in fact an uninitialised local variable was passed to the emulator routine instead of the original instruction
Patchwork: https://patchwork.linux-mips.org/patch/14300/
--- arch/mips/kernel/uprobes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/mips/kernel/uprobes.c +2 -3
@@ -157,7 +157,6 @@ bool is_trap_insn(uprobe_opcode_t *insn)int arch_uprobe_pre_xol (struct arch_uprobe *aup,struct pt_regs *regs) {struct uprobe_task *utask = current->utask; -union mips_instruction insn;/* * Now find the EPC where to resume after the breakpoint has been
@@ -168,10 +167,10 @@ int arch_uprobe_pre_xol(struct arch_uprounsigned long epc; epc = regs->cp0_epc; -__compute_return_epc_for_insn (regs, insn); +__compute_return_epc_for_insn (regs, + (union mips_instruction ) aup->insn[0 ]); aup->resume_epc = regs->cp0_epc; } - utask->autask.saved_trap_nr = current->thread.trap_nr; current->thread.trap_nr =UPROBE_TRAP_NR ; regs->cp0_epc = current->utask->xol_vaddr;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/mips-uprobes-fix-use-of-uninitialised-variable.patch queue-4.4/mips-fix-uretprobe-implementation.patch queue-4.4/mips-uprobes-remove-incorrect-set_orig_insn.patch