Linux kernel source tree
 
 
 
 
 
 
Go to file
Zheng Yejian 3caa693781 ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct()
commit 2a2d8c51de upstream.

Syzkaller report a WARNING: "WARN_ON(!direct)" in modify_ftrace_direct().

Root cause is 'direct->addr' was changed from 'old_addr' to 'new_addr' but
not restored if error happened on calling ftrace_modify_direct_caller().
Then it can no longer find 'direct' by that 'old_addr'.

To fix it, restore 'direct->addr' to 'old_addr' explicitly in error path.

Link: https://lore.kernel.org/linux-trace-kernel/20230330025223.1046087-1-zhengyejian1@huawei.com

Cc: stable@vger.kernel.org
Cc: <mhiramat@kernel.org>
Cc: <mark.rutland@arm.com>
Cc: <ast@kernel.org>
Cc: <daniel@iogearbox.net>
Fixes: 8a141dd7f7 ("ftrace: Fix modify_ftrace_direct.")
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 16:55:32 +02:00
Documentation dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs 2023-04-13 16:55:28 +02:00
LICENSES
arch KVM: nVMX: Do not report error code when synthesizing VM-Exit from Real Mode 2023-04-13 16:55:30 +02:00
block block: don't set GD_NEED_PART_SCAN if scan partition failed 2023-04-13 16:55:32 +02:00
certs certs: Fix build error when PKCS#11 URI contains semicolon 2023-02-09 11:28:11 +01:00
crypto crypto: rsa-pkcs1pad - Use akcipher_request_complete 2023-03-10 09:33:03 +01:00
drivers block: ublk: make sure that block size is set correctly 2023-04-13 16:55:32 +02:00
fs cifs: sanitize paths in cifs_update_super_prepath. 2023-04-13 16:55:32 +02:00
include ftrace: Mark get_lock_parent_ip() __always_inline 2023-04-13 16:55:32 +02:00
init
io_uring io_uring: fix memory leak when removing provided buffers 2023-04-13 16:55:31 +02:00
ipc
kernel ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct() 2023-04-13 16:55:32 +02:00
lib zstd: Fix definition of assert() 2023-04-06 12:10:38 +02:00
mm mm: kfence: fix handling discontiguous page 2023-04-13 16:55:30 +02:00
net netlink: annotate lockless accesses to nlk->max_recvmsg_len 2023-04-13 16:55:24 +02:00
rust
samples
scripts modpost: Fix processing of CRCs on 32-bit build machines 2023-04-06 12:10:53 +02:00
security keys: Do not cache key in task struct if key is requested from kernel thread 2023-03-30 12:49:07 +02:00
sound ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook 2023-04-13 16:55:29 +02:00
tools libbpf: Fix btf_dump's packed struct determination 2023-04-06 12:10:58 +02:00
usr
virt KVM: Register /dev/kvm as the _very_ last thing during initialization 2023-03-10 09:34:11 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS audit: update the mailing list in MAINTAINERS 2023-02-25 11:25:42 +01:00
Makefile Linux 6.1.23 2023-04-06 12:10:58 +02:00
README

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.