From: "Radim Krčmář" <rkrcmar@ventanamicro.com>
To: "Deepak Gupta" <debug@rivosinc.com>
Cc: <opensbi@lists.infradead.org>,
"opensbi" <opensbi-bounces@lists.infradead.org>
Subject: Re: [PATCH] lib: sbi: expected trap must always clear MPRV
Date: Wed, 26 Nov 2025 09:21:16 +0100 [thread overview]
Message-ID: <DEIHB3SVYL4W.119RRX5IAT3A5@ventanamicro.com> (raw)
In-Reply-To: <aSYL3FUKAKfyDgqY@debug.ba.rivosinc.com>
2025-11-25T12:04:44-08:00, Deepak Gupta <debug@rivosinc.com>:
> On Tue, Nov 25, 2025 at 08:48:35PM +0100, Radim Krčmář wrote:
>>2025-11-25T11:17:29-08:00, Deepak Gupta <debug@rivosinc.com>:
>>> I can modify the commit message to remove security impact (that it seems like
>>> how implementations are implementing it) and re-send it.
>>
>>That would help. The patch also uses a wrong bitmask for csrc:
>>MPRV is bit 17, but you're clearing bit 5, SPIE.
>>(Isn't it possible to use MSTATUS_MPRV there?)
>
> It's `lui` (load upper immediate). I could just do `li a4, MTSTATUS_PRV`.
> Although its a larger immediate, so most likely assembler will split into
> two instructions or would replace it with `lui`.
Sorry, I missed that. Yeah, assembler should translate it to just lui.
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next prev parent reply other threads:[~2025-11-26 8:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 22:03 [PATCH] lib: sbi: expected trap must always clear MPRV Deepak Gupta
2025-11-25 11:12 ` Radim Krčmář
2025-11-25 18:03 ` Deepak Gupta
2025-11-25 18:51 ` Radim Krčmář
2025-11-25 19:17 ` Deepak Gupta
2025-11-25 19:48 ` Radim Krčmář
2025-11-25 20:04 ` Deepak Gupta
2025-11-26 8:21 ` Radim Krčmář [this message]
2025-12-26 11:06 ` Anup Patel
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=DEIHB3SVYL4W.119RRX5IAT3A5@ventanamicro.com \
--to=rkrcmar@ventanamicro.com \
--cc=debug@rivosinc.com \
--cc=opensbi-bounces@lists.infradead.org \
--cc=opensbi@lists.infradead.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