From: Zhizhou Zhang <zhizhouzhang@asrmicro.com>
To: <rostedt@goodmis.org>, <mingo@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <zhizhouzhang@asrmicro.com>,
<zhizhouzh@gmail.com>
Subject: [PATCH] ftrace: remove KASAN poison in ftrace_ops_test()
Date: Sun, 11 Nov 2018 23:10:17 +0800 [thread overview]
Message-ID: <1541949017-3001-1-git-send-email-zhizhouzhang@asrmicro.com> (raw)
ftrace_ops_test() passed local varible parameter to hash_contains_ip(),
which could result KASAN stack-out-of-bounds warning.
Signed-off-by: Zhizhou Zhang <zhizhouzhang@asrmicro.com>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f536f60..6e11f90 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1522,6 +1522,8 @@ ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs)
rcu_assign_pointer(hash.filter_hash, ops->func_hash->filter_hash);
rcu_assign_pointer(hash.notrace_hash, ops->func_hash->notrace_hash);
+ kasan_unpoison_task_stack(current);
+
if (hash_contains_ip(ip, &hash))
ret = 1;
else
--
2.7.4
next reply other threads:[~2018-11-11 7:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-11 15:10 Zhizhou Zhang [this message]
2018-11-11 17:32 ` Mark Rutland
2018-11-12 8:09 ` Zhang Zhizhou(张治洲)
2018-11-13 17:47 ` Mark Rutland
2018-11-14 10:33 ` Zhang Zhizhou(张治洲)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1541949017-3001-1-git-send-email-zhizhouzhang@asrmicro.com \
--to=zhizhouzhang@asrmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=zhizhouzh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®