mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Karl Mehltretter" <kmehltretter@gmail.com>
Cc: "Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: compat: Keep alignment address arithmetic 32-bit
Date: Tue, 18 Aug 2026 09:31:14 +0200	[thread overview]
Message-ID: <e3c463a1-81ae-4bef-b65b-fea1a4eda5bc@app.fastmail.com> (raw)
In-Reply-To: <aoPKzPb9YUVULlXG@gmail.com>

On Tue, Aug 18, 2026, at 05:22, Karl Mehltretter wrote:
> On Mon, Aug 17, 2026 at 11:15:33AM +0100, Arnd Bergmann wrote:
<
> The 4 GiB wraparound case is possible with a rather unusual arm64
> kernel configuration, and correctly handling an individual word
> crossing the boundary would require byte accesses. That seems too
> contrived to justify the extra complexity here.

I don't understand, what is special about the configuration?
Isn't this exactly the case you were trying to address with
the compat_ptr() hack?

> Just to be sure by "both instances" do you mean the nr_regs
> declarations in both arch/arm64/kernel/compat_alignment.c and
> arch/arm/mm/alignment.c?

Yes

> Changing nr_regs in arm32 alignment.c would not change the generated
> code and I guess probably not be backported, so that would create a
> divergence with stable kernels.
>
> Would you prefer changing both files, or only the arm64 implementation?

I would suggest doing only a small change to arm64.

     Arnd

  reply	other threads:[~2026-08-18  7:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  0:02 Karl Mehltretter
2026-08-17  9:15 ` Arnd Bergmann
2026-08-18  3:22   ` Karl Mehltretter
2026-08-18  7:31     ` Arnd Bergmann [this message]
2026-08-19  4:56       ` Karl Mehltretter
2026-08-19 11:19         ` Arnd Bergmann
2026-08-19 18:55           ` Karl Mehltretter
2026-08-19 20:27             ` Arnd Bergmann

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=e3c463a1-81ae-4bef-b65b-fea1a4eda5bc@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kmehltretter@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.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

all inboxes | Powered by JetHome®