qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: riscv: g_assert for NULL predicate?


From: Alistair Francis
Subject: Re: riscv: g_assert for NULL predicate?
Date: Wed, 5 Apr 2023 16:06:30 +1000

On Mon, Apr 3, 2023 at 11:43 PM Wu, Fei <fei2.wu@intel.com> wrote:
>
> 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.

Hm.... That's not good. Userspace shouldn't be able to crash QEMU. I
think we want to revert that patch then.

@Bin Meng any thoughts?

Alistair

>
>   .global _start
>
>   .text
>   _start:
>       csrr t3, 0x4
>
> Thanks,
> Fei.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]