From: Oleg Nesterov <oleg@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
syzbot <syzbot+30d675e3ca03c1c351e7@syzkaller.appspotmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: [PATCH] uprobes/x86: remove the wrong WARN_ON() in uprobe_init_insn()
Date: Fri, 18 May 2018 18:27:39 +0200 [thread overview]
Message-ID: <20180518162739.GA5559@redhat.com> (raw)
In-Reply-To: <000000000000b759cf056c2b3c12@google.com>
insn_get_length() has the side-effect of processing the entire instruction
but only if it was decoded successfully, otherwise insn_complete() can fail
and in this case we need to just return an error without warning.
Reported-by: syzbot+30d675e3ca03c1c351e7@syzkaller.appspotmail.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
arch/x86/kernel/uprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index 85c7ef2..efd7ee9 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -293,7 +293,7 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool
insn_init(insn, auprobe->insn, sizeof(auprobe->insn), x86_64);
/* has the side-effect of processing the entire instruction */
insn_get_length(insn);
- if (WARN_ON_ONCE(!insn_complete(insn)))
+ if (!insn_complete(insn))
return -ENOEXEC;
if (is_prefix_bad(insn))
--
2.5.0
next prev parent reply other threads:[~2018-05-18 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 14:24 WARNING in arch_uprobe_analyze_insn syzbot
2018-05-15 13:36 ` Oleg Nesterov
2018-05-15 14:48 ` Masami Hiramatsu
2018-05-15 16:18 ` Oleg Nesterov
2018-05-18 16:27 ` Oleg Nesterov [this message]
2018-05-18 23:58 ` [PATCH] uprobes/x86: remove the wrong WARN_ON() in uprobe_init_insn() Masami Hiramatsu
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=20180518162739.GA5559@redhat.com \
--to=oleg@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=syzbot+30d675e3ca03c1c351e7@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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