From: "Wu, Fei" <fei2.wu@intel.com>
To: "open list:RISC-V TCG CPUs" <qemu-riscv@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>, <bmeng@tinylab.org>,
<fei2.wu@intel.com>
Subject: riscv: g_assert for NULL predicate?
Date: Mon, 3 Apr 2023 21:42:59 +0800 [thread overview]
Message-ID: <e9de7676-b669-4f4e-e3e0-e57fb58b7bd7@intel.com> (raw)
Recent commit 0ee342256af92 switches to g_assert() for the predicate()
NULL check from returning RISCV_EXCP_ILLEGAL_INST. Qemu doesn't have
predicate() for un-allocated CSRs, then a buggy userspace application
reads CSR such as 0x4 causes qemu to exit, I don't think it's expected.
.global _start
.text
_start:
csrr t3, 0x4
Thanks,
Fei.
next reply other threads:[~2023-04-03 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 13:42 Wu, Fei [this message]
2023-04-05 6:06 ` riscv: g_assert for NULL predicate? Alistair Francis
2023-04-11 3:44 ` Bin Meng
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=e9de7676-b669-4f4e-e3e0-e57fb58b7bd7@intel.com \
--to=fei2.wu@intel.com \
--cc=bmeng@tinylab.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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).