Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Yicong Yang <yang.yicong@picoheart.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	 linux-riscv@lists.infradead.org, wangruikang@iscas.ac.cn,
	 ganboing@gmail.com, geshijian@picoheart.com,
	niehaitao@picoheart.com,  cuiyunhui@bytedance.com
Subject: Re: [PATCH v2 2/6] riscv: insn: Set sstatus.MXR when reading userspace instruction
Date: Mon, 24 Aug 2026 18:06:53 -0600 (MDT)	[thread overview]
Message-ID: <6108297c-73b7-a04b-67d9-2ef444eecb60@kernel.org> (raw)
In-Reply-To: <20260728094627.94975-3-yang.yicong@picoheart.com>

Hi,

On Tue, 28 Jul 2026, Yicong Yang wrote:

> The __read_insn() uses get_user() to read userspace instructions.
> Bo Gan noticed that get_user() is insufficient in this case since
> it's possible for the instruction segment mapped as execute-only
> and get_user() doesn't have permissions to load it. The architecture
> provides sstatus.MXR for handling this so set MXR when reading
> userspace instruction.

If this patch fixes a bug with the preceding patch, it would
better just to roll the fix into the original patch.


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-08-25  0:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  9:46 [PATCH v2 0/6] Add workarounds for Picoheart erratas Yicong Yang
2026-07-28  9:46 ` [PATCH v2 1/6] riscv: Make get_insn public for instruction fault handling Yicong Yang
2026-07-28  9:46 ` [PATCH v2 2/6] riscv: insn: Set sstatus.MXR when reading userspace instruction Yicong Yang
2026-08-25  0:06   ` Paul Walmsley [this message]
2026-08-25  7:39     ` Yicong Yang
2026-07-28  9:46 ` [PATCH v2 3/6] riscv: insn: Support decoding of CBO instructions Yicong Yang
2026-07-28  9:46 ` [PATCH v2 4/6] riscv: errata: Add init framework for picoheart errata Yicong Yang
2026-07-28  9:46 ` [PATCH v2 5/6] riscv: errata: picoheart: Add workaround for cbo.clean errata Yicong Yang
2026-07-28  9:46 ` [PATCH v2 6/6] riscv: errata: picoheart: Add workaround for AMOCASQ errata Yicong Yang

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=6108297c-73b7-a04b-67d9-2ef444eecb60@kernel.org \
    --to=pjw@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=cuiyunhui@bytedance.com \
    --cc=ganboing@gmail.com \
    --cc=geshijian@picoheart.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=niehaitao@picoheart.com \
    --cc=palmer@dabbelt.com \
    --cc=wangruikang@iscas.ac.cn \
    --cc=yang.yicong@picoheart.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