[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWUyE_--dy2wIK15@redhat.com>
Date: Mon, 12 Jan 2026 18:40:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andrii Nakryiko <andrii@...nel.org>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
David Hildenbrand <david@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Jiri Olsa <jolsa@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Paulo Andrade <pandrade@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [PATCH] x86/uprobes: Fix XOL allocation failure for 32-bit tasks
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@...r.kernel.org
> > Reported-by: Paulo Andrade <pandrade@...hat.com>
> > Link: https://lore.kernel.org/all/aV5uldEvV7pb4RA8@redhat.com/
> > Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>
> 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.
Powered by blists - more mailing lists