]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kprobes: Fix to check symbol prefixes correctly
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Fri, 2 Aug 2024 13:53:15 +0000 (22:53 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:22 +0000 (15:34 +0200)
commit0fcc4a5b5b485cc09a737a5eb16e19ee6318792b
tree5c48ccb0a99842a41bb0600a6b3b8e1ce1385847
parent8c7eab0e8abc7b589feafd6bc403311f9fde4d7f
kprobes: Fix to check symbol prefixes correctly

[ Upstream commit 8c8acb8f26cbde665b233dd1b9bbcbb9b86822dc ]

Since str_has_prefix() takes the prefix as the 2nd argument and the string
as the first, is_cfi_preamble_symbol() always fails to check the prefix.
Fix the function parameter order so that it correctly check the prefix.

Link: https://lore.kernel.org/all/172260679559.362040.7360872132937227206.stgit@devnote2/
Fixes: de02f2ac5d8c ("kprobes: Prohibit probing on CFI preamble symbol")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/kprobes.c