android_kernel_xiaomi_sm8450/arch/x86
Nadav Amit 058c0cbd25 x86/kprobes: Fix JNG/JNLE emulation
[ Upstream commit 8924779df820c53875abaeb10c648e9cb75b46d4 ]

When kprobes emulates JNG/JNLE instructions on x86 it uses the wrong
condition. For JNG (opcode: 0F 8E), according to Intel SDM, the jump is
performed if (ZF == 1 or SF != OF). However the kernel emulation
currently uses 'and' instead of 'or'.

As a result, setting a kprobe on JNG/JNLE might cause the kernel to
behave incorrectly whenever the kprobe is hit.

Fix by changing the 'and' to 'or'.

Fixes: 6256e668b7af ("x86/kprobes: Use int3 instead of debug trap for single-step")
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220813225943.143767-1-namit@vmware.com
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:57:46 +02:00
..
boot x86/boot: Wrap literal addresses in absolute_pointer() 2023-06-09 10:30:15 +02:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-27 10:54:21 +01:00
crypto crypto: x86/ghash - fix unaligned access in ghash_setkey() 2023-03-11 16:39:19 +01:00
entry exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
events perf/ibs: Fix interface via core pmu events 2023-07-27 08:43:35 +02:00
hyperv x86/hyperv: Remove unregister syscore call from Hyper-V cleanup 2023-01-14 10:16:13 +01:00
ia32 x86: remove address space overrides using set_fs() 2020-09-08 22:21:36 -04:00
include x86/kprobes: Use int3 instead of debug trap for single-step 2023-08-11 11:57:46 +02:00
kernel x86/kprobes: Fix JNG/JNLE emulation 2023-08-11 11:57:46 +02:00
kvm KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest 2023-08-11 11:57:43 +02:00
lib x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 19:57:40 +02:00
math-emu x86: Prepare asm files for straight-line-speculation 2022-07-25 11:26:28 +02:00
mm x86/mm: Use mm_alloc() in poking_init() 2023-08-08 19:57:39 +02:00
net x86/bpf: Use alternative RET encoding 2022-07-25 11:26:38 +02:00
oprofile
pci x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot 2023-04-20 12:10:27 +02:00
platform x86/olpc: fix 'logical not is only applied to the left hand side' 2022-08-21 15:16:14 +02:00
power x86/pm: Add enumeration check before spec MSRs save/restore setup 2022-12-08 11:23:59 +01:00
purgatory x86/purgatory: remove PGO flags 2023-06-21 15:45:37 +02:00
ras treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
realmode x86/mm: Flush global TLB when switching to trampoline page-table 2022-01-27 10:54:14 +01:00
tools x86/tools: Fix objdump version check again 2021-08-18 08:59:15 +02:00
um x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list 2023-03-11 16:40:11 +01:00
video
xen x86/xen: Fix secondary processors' FPU initialization 2023-08-08 19:57:38 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild
Kconfig x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 19:57:40 +02:00
Kconfig.assembler x86/delay: Introduce TPAUSE delay 2020-05-07 16:06:20 +02:00
Kconfig.cpu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
Makefile x86/realmode: build with -D__DISABLE_EXPORTS 2022-07-25 11:26:33 +02:00
Makefile_32.cpu
Makefile.um