mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Clément Léger" <cleger@rivosinc.com>
To: David Laight <david.laight.linux@gmail.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	"Maciej W . Rozycki" <macro@orcam.me.uk>
Subject: Re: [PATCH v2 0/3] riscv: misaligned: fix misaligned accesses handling in put/get_user()
Date: Tue, 3 Jun 2025 09:32:15 +0200	[thread overview]
Message-ID: <352704e1-2ef7-4141-a6a9-896981d8afa1@rivosinc.com> (raw)
In-Reply-To: <20250602220855.519e23e5@pumpkin>



On 02/06/2025 23:08, David Laight wrote:
> On Mon,  2 Jun 2025 21:39:13 +0200
> Clément Léger <cleger@rivosinc.com> wrote:
> 
> ...
>> The second solution was the one chosen as there are too many callsites to
>> put/get_user() that could potentially do misaligned accesses. We tried
>> two approaches for that, either split access in two aligned accesses
>> (and do RMW for put_user())
> 
> You can't do RMW because it is visible to other threads.

Ahem yeah indeed, so the only way was to do individual lb at least up to
some alignment.

Thanks,

Clément

> 
> 	David


  reply	other threads:[~2025-06-03  7:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 19:39 Clément Léger
2025-06-02 19:39 ` [PATCH v2 1/3] riscv: make unsafe user copy routines use existing assembly routines Clément Léger
2025-06-02 19:39 ` [PATCH v2 2/3] riscv: process: use unsigned int instead of unsigned long for put_user() Clément Léger
2025-06-04 11:55   ` Alexandre Ghiti
2025-06-02 19:39 ` [PATCH v2 3/3] riscv: uaccess: do not do misaligned accesses in get/put_user() Clément Léger
2025-06-04 11:56   ` Alexandre Ghiti
2025-06-02 21:08 ` [PATCH v2 0/3] riscv: misaligned: fix misaligned accesses handling in put/get_user() David Laight
2025-06-03  7:32   ` Clément Léger [this message]
2025-06-05 18:50 ` patchwork-bot+linux-riscv

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=352704e1-2ef7-4141-a6a9-896981d8afa1@rivosinc.com \
    --to=cleger@rivosinc.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=david.laight.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=macro@orcam.me.uk \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.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

all inboxes | Powered by JetHome®