Re: [PATCH] arm64: compat: Keep alignment address arithmetic 32-bit

"Arnd Bergmann" <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.