[PATCH v2] arm64: compat: Implement misalignment fixups for multiword loads

Ard Biesheuvel ardb at kernel.org
Tue Aug 16 13:29:06 PDT 2022


On Tue, 16 Aug 2022 at 21:29, Aurelien Jarno <aurel32 at debian.org> wrote:
>
> Hi,
>
> On 2022-07-14 02:52, Wookey wrote:
> > On 2022-07-01 15:53 +0200, Ard Biesheuvel wrote:
> > > The 32-bit ARM kernel implements fixups on behalf of user space when
> > > using LDM/STM or LDRD/STRD instructions on addresses that are not 32-bit
> > > aligned.
> >
> > > This feature is one of the remaining impediments to being able to switch
> > > to 64-bit kernels on 64-bit capable hardware running 32-bit user space,
> > > so let's implement it for the arm64 compat layer as well.
> >
> > > Note to cc'ees: if this is something you would like to see merged,
> > > please indicate so. This stuff is unlikely to get in if there are no
> > > users.
> >
> > Decent 32-bit arm hardware is thin on the ground these days. Debian
> > still has some but it's getting old and flaky. Being able to build
> > reliably on 64-bit hardware is important and useful. Unaligned
> > accesses are much less of a problem than they used to be, but they can
> > still happen, so having these fixups available is definitely a good
> > thing.
> >
> > Debian runs its 32-bit buildds with alignment fixups turned on. It
> > looks like the boxes still hit about 1 per day.
> >
> > We also do 32 bit builds on 64-bit kernels (in 32-bit userspaces) and
> > it mostly works. We do have packages that fail on 64-bit kernels and
> > have to be built on real 32-bit hardware, but I don't know how much of
> > that would be fixed by this patch. Some, presumably.
> >
> > So yes, cheers for this. It is helpful in the real world (or at least
> > it should be).
>
> I confirm that this would be very helpful to Debian, so that 32-bit
> binaries behaves the same with a 32-bit or a 64-bit kernel. Otherwise we
> need to keep running (old) 32-bit hardware.
>
> What's the status of those patches?
>

Thanks for chiming in.

At this point, it is really up to the maintainers to decide whether
the maintenance burden is worth it. The code itself seems pretty
uncontroversial afaict.

Might other distros be in a similar situation? Or is this specific to Debian?



More information about the linux-arm-kernel mailing list