Re: [Regression] [PATCH v5 2/4] vdso: Switch get/put unaligned from packed struct to memcpy

From: Ian Rogers

Date: Tue Nov 17 2026 - 12:47:19 EST


On Mon, Nov 16, 2026 at 10:19 PM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>
> On 19.10.2026 14:37:17, Marc Kleine-Budde wrote:
> > > I was trying to reach an implementation that avoided undefined
> > > behavior and benefited both user and kernel code. Performance
> > > regressions aren't a benefit and fixing compilers can be tricky, so
> > > work remains. I'd prefer to avoid undefined behavior at least in user
> > > land. I'd also prefer to avoid config values, so using packed structs
> > > for __KERNEL__ code is a possibility. It seems a little sad that we've
> > > lived with a strict-aliasing-compliant implementation for a year, and
> > > we could regress that for the sake of ARMv5. I don't feel strongly
> > > enough to argue for kernel land; hopefully, Thomas can say what
> > > motivated moving the patch series forward as I'm pretty certain it
> > > wouldn't be undefined behavior in the perf tool :-)
> >
> > Can we revert commit a339671db64b ("vdso: Switch get/put_unaligned()
> > from packed struct to memcpy()")? It touches "include/vdso/unaligned.h"
> > only, so the perf header will be unaffected. Or is there an automagic
> > copying to "tools/include/vdso/unaligned.h" happening?
>
> There was discussion and I learned a lot about the nitty gritty details
> of compilers, optimization and UB. But the problem is still in the
> mainline tree. What can we do about it? Is reverting an option?

I see the config option was picked up here:
https://lore.kernel.org/lkml/179423891136.2093942.13129678709622655290.tip-bot2@tip-bot2/

Thanks,
Ian


> regards,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung Nürnberg | Phone: +49-5121-206917-129 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |