Re: [PATCH] ARM: nwfpe: use task_pt_regs() to find user registers
From: Peter Maydell
Date: Thu Nov 12 2026 - 04:41:59 EST
On Thu, 12 Nov 2026 at 07:59, Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Thu, Nov 12, 2026, at 03:51, Patrick Lister wrote:
> > NWFPE locates the trapping process's saved registers relative to
> > current_thread_info(), assuming thread_info sits at the bottom of the
> > kernel stack. Since ARM moved thread_info into task_struct, that
> > expression points past the end of the task_struct instead.
> >
> > This breaks FPA instruction emulation, as the user registers are
> > never read or written and causes out-of-bounds reads and writes of
> > kernel memory beyond the task_struct. Any unprivileged process can
> > trigger this.
>
> Thanks a lot for chasing this down!
>
> As I understand it, this means that nobody has seriously used or
> tested OABI since 5.16. I last tested it myself in 5.14 when
> working on 4e57a4ddf6b0 ("ARM: 9107/1: syscall: always store
> thread_info->abi_syscall"), but it was quite hard to properly
> test it at the time, even getting an old Debian rootfs to work
> with a modern kernel and qemu was nontrivial.
> I've added the maintainers for the Arm ports in gcc, qemu and binutils
> to Cc here, I believe all of these still have some level of OABI
> support that they kept just because Linux still handles it, but
> that can then also be removed.
QEMU has already deprecated its OABI and NWFPE emulation as of our
11.0 release in April this year. We'll probably remove it in 12.0
in April next year. (Our deprecation policy only requires two
releases of notice before removal, so we could have removed it
for 11.2 if we'd remembered, but as we're already in freeze it's
a bit late to do so now.)
thanks
-- PMM