Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
Yang Jihong ec206a38d3 x86/kprobes: Fix __recover_optprobed_insn check optimizing logic
commit 868a6fc0ca2407622d2833adefe1c4d284766c4c upstream.

Since the following commit:

  commit f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code")

modified the update timing of the KPROBE_FLAG_OPTIMIZED, a optimized_kprobe
may be in the optimizing or unoptimizing state when op.kp->flags
has KPROBE_FLAG_OPTIMIZED and op->list is not empty.

The __recover_optprobed_insn check logic is incorrect, a kprobe in the
unoptimizing state may be incorrectly determined as unoptimizing.
As a result, incorrect instructions are copied.

The optprobe_queued_unopt function needs to be exported for invoking in
arch directory.

Link: https://lore.kernel.org/all/20230216034247.32348-2-yangjihong1@huawei.com/

Fixes: f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code")
Cc: stable@vger.kernel.org
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-11 16:44:01 +01:00
arch x86/kprobes: Fix __recover_optprobed_insn check optimizing logic 2023-03-11 16:44:01 +01:00
block blk-iocost: fix divide by 0 error in calc_lcoefs() 2023-03-11 16:43:54 +01:00
certs
crypto crypto: rsa-pkcs1pad - Use akcipher_request_complete 2023-03-11 16:43:41 +01:00
Documentation KVM: s390: disable migration mode when dirty tracking is disabled 2023-03-11 16:44:01 +01:00
drivers ipmi_ssif: Rename idle state and check 2023-03-11 16:43:58 +01:00
fs udf: Fix file corruption when appending just after end of preallocated extent 2023-03-11 16:44:01 +01:00
include x86/kprobes: Fix __recover_optprobed_insn check optimizing logic 2023-03-11 16:44:01 +01:00
init
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:23:06 +01:00
kernel x86/kprobes: Fix __recover_optprobed_insn check optimizing logic 2023-03-11 16:44:01 +01:00
lib lib/mpi: Fix buffer overrun when SG is too long 2023-03-11 16:43:38 +01:00
LICENSES
mm Revert "mm: Always release pages to the buddy allocator in memblock_free_late()." 2023-02-22 12:50:39 +01:00
net inet: fix fast path in __inet_hash_connect() 2023-03-11 16:43:55 +01:00
samples
scripts ftrace/scripts: Update the instructions for ftrace-bisect.sh 2023-02-06 07:52:44 +01:00
security tomoyo: fix broken dependency on *.conf.default 2023-02-06 07:52:35 +01:00
sound ASoC: kirkwood: Iterate over array indexes instead of using pointer math 2023-03-11 16:43:57 +01:00
tools selftests/ftrace: Fix bash specific "==" operator 2023-03-11 16:43:50 +01:00
usr
virt KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-11 16:44:01 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS net/phy/mdio-i2c: Move header file to include/linux/mdio 2023-02-06 07:52:46 +01:00
Makefile Linux 5.4.234 2023-03-03 11:41:49 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.