From: Liu Cyrus <cyruscyliu@gmail.com>
To: qemu-devel@nongnu.org
Subject: Subject: [PATCH] hw/vmxnet3: fix vmxnet3 g_assert_not_reached bug
Date: Sat, 12 Jun 2021 14:03:17 +0800 [thread overview]
Message-ID: <CAAKa2jmVMvbRviMTTC8d0cPhWVmOHBNcRE-d3aTTdot4aCZBxg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
From: cyruscyliu <cyruscyliu@gmail.com>
A g_assert_not_reached of vmxnet3 can be triggered by a guest with the root
privilege.
Remove the VMXNET3_REG_ICR branch thus get rid of this crash.
Fixes: 786fd2b0f87b ("VMXNET3 device implementation")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/309
Buglink: https://bugs.launchpad.net/qemu/+bug/1913923
Signed-off-by: cyruscyliu <cyruscyliu@gmail.com>
---
hw/net/vmxnet3.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index eff299f..a388918 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1786,13 +1786,6 @@ vmxnet3_io_bar1_write(void *opaque,
vmxnet3_set_variable_mac(s, val, s->temp_mac);
break;
- /* Interrupt Cause Register */
- case VMXNET3_REG_ICR:
- VMW_CBPRN("Write BAR1 [VMXNET3_REG_ICR] = %" PRIx64 ", size %d",
- val, size);
- g_assert_not_reached();
- break;
-
/* Event Cause Register */
case VMXNET3_REG_ECR:
VMW_CBPRN("Write BAR1 [VMXNET3_REG_ECR] = %" PRIx64 ", size %d",
--
2.7.4
Hi folks, this is a suggestion for fixing this bug.
I'm willing to discuss this with you because I'm new to contribute to QEMU.
Best,
Qiang
[-- Attachment #2: Type: text/html, Size: 2105 bytes --]
reply other threads:[~2021-06-12 6:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAAKa2jmVMvbRviMTTC8d0cPhWVmOHBNcRE-d3aTTdot4aCZBxg@mail.gmail.com \
--to=cyruscyliu@gmail.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).