Re: [PATCH] x86/uprobes: Fix XOL allocation failure for 32-bit tasks
From: Oleg Nesterov
Date: Mon Jan 12 2026 - 12:40:53 EST
On 01/12, Peter Zijlstra wrote:
>
> On Sun, Jan 11, 2026 at 04:00:37PM +0100, Oleg Nesterov wrote:
> >
> > I think that the right fix should change the x86 get_unmapped_area() paths
> > to rely on TIF_ADDR32 rather than in_32bit_syscall(). Note also that if
> > CONFIG_X86_X32_ABI=y, in_x32_syscall() falsely returns true in this case
> > because ->orig_ax = -1.
> >
> > But we need a simple fix for -stable, so this patch just sets TS_COMPAT if
> > the probed task is 32-bit to make in_ia32_syscall() true.
> >
> > Cc: stable@xxxxxxxxxxxxxxx
> > Reported-by: Paulo Andrade <pandrade@xxxxxxxxxx>
> > Link: https://lore.kernel.org/all/aV5uldEvV7pb4RA8@xxxxxxxxxx/
> > Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Does this want a Fixes tag? Or has this been busted like forever?
All I can say is that this problem is old enough.
I'll try to look into git history tomorrow, not sure I will find the right
commit to blame...
At first glance v3.10 (rhel-7) is fine, arch_get_unmapped_area_topdown() sets
.high_limit = mm->mmap_base and ->mmap_base is initialized by mmap_base()
which returns PAGE_ALIGN(TASK_SIZE - gap - rnd).
But v4.18 (rhel-8) is broken, arch/x86/kernel/sys_x86_64.c uses
in_compat_syscall().
Oleg.