kprobes fix
Linus,
Please pull the latest perf/urgent git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2022-08-21
# HEAD: 8924779df820c53875abaeb10c648e9cb75b46d4 x86/kprobes: Fix JNG/JNLE emulation
Fix a kprobes bug in JNG/JNLE emulation when a kprobe is installed at such instructions, possibly resulting in incorrect execution (the wrong branch taken).
Thanks,
Ingo
------------------>
Nadav Amit (1):
x86/kprobes: Fix JNG/JNLE emulation
arch/x86/kernel/kprobes/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/kprobes/core.c +1 -1
@@ -505,7 +505,7 @@ static void kprobe_emulate_jcc(struct kprobe *p, struct pt_regs *regs) match = ((regs->flags &X86_EFLAGS_SF ) >>X86_EFLAGS_SF_BIT ) ^ ((regs->flags &X86_EFLAGS_OF ) >>X86_EFLAGS_OF_BIT );if (p->ainsn.jcc.type >=0xe ) - match = match && (regs->flags &X86_EFLAGS_ZF ); + match = match || (regs->flags &X86_EFLAGS_ZF ); }__kprobe_emulate_jmp (p, regs, (match && !invert) || (!match && invert)); }
The pull request you sent on Sun, 21 Aug 2022 22:56:43 +0200:
The pull request you sent on Sun, 21 Aug 2022 22:56:43 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitperf-urgent-2022-08-21
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/4f61f842d199a695bb0c310945f7f320c1730abc
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html