From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9A6C283FD8 for ; Mon, 12 Jan 2026 17:40:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239655; cv=none; b=OiOCqTdUFGt0NC176TJL6Z9Ed1NwIMbXjnvEO9tY14lPAyiZUz/y8tAYhorMP1l5gxH//Pli/N486h9fI4Ax6k+XxZnOZHS+oqVwolHQTHPVW8CDSeisfV0ZXOl524heO9jRGN7py/gf8W8hmIGg6mXHFLZRUmKej/tJDDpJk6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239655; c=relaxed/simple; bh=Qu7cbHC0oQreGhLJsWcuxf5+++7vwFbWsigsRWkugjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LpcFwQuBDL7t6YjjDKU5WxpIgpuXQXQP9a73Aw39SmtB1QAmNDmXi1nQv4K3pffIPx6u2vPWmc1P9RdO3YDYZQsqytpucKMXFNAl1nNcAWzcJjdE/PbeQK+Lx9VwNkUVg62FS7rVFDNNpDA3NxmdT+Vjn0lStMqAU4ahD74HmQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GdRb43HB; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GdRb43HB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768239652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Qu7cbHC0oQreGhLJsWcuxf5+++7vwFbWsigsRWkugjk=; b=GdRb43HBK4aSu+/j2YqQbAIWth60gGjluJj8yz+DaIPSvfaDhQqDc7rTDY3ubGc6SqzAEa EN6eVE5HgGbDduxR0t21zT2rYXajMkyPLlWnzosXux1Y7ad+ElrfsGAIJQmbYkYwiCEe7B t/h97dOaPIZuOqXiMMEkU9o+hhKwbgI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-c-RX3-eMN8eOa6pAKlDvKg-1; Mon, 12 Jan 2026 12:40:45 -0500 X-MC-Unique: c-RX3-eMN8eOa6pAKlDvKg-1 X-Mimecast-MFC-AGG-ID: c-RX3-eMN8eOa6pAKlDvKg_1768239643 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1AF571956094; Mon, 12 Jan 2026 17:40:42 +0000 (UTC) Received: from fedora (unknown [10.44.33.200]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id E84B319560B2; Mon, 12 Jan 2026 17:40:36 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 12 Jan 2026 18:40:41 +0100 (CET) Date: Mon, 12 Jan 2026 18:40:35 +0100 From: Oleg Nesterov To: Peter Zijlstra Cc: Andrii Nakryiko , Borislav Petkov , Dave Hansen , David Hildenbrand , "H. Peter Anvin" , Ingo Molnar , Jiri Olsa , Masami Hiramatsu , Paulo Andrade , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH] x86/uprobes: Fix XOL allocation failure for 32-bit tasks Message-ID: References: <20260112164001.GQ830755@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260112164001.GQ830755@noisy.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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@vger.kernel.org > > Reported-by: Paulo Andrade > > Link: https://lore.kernel.org/all/aV5uldEvV7pb4RA8@redhat.com/ > > Signed-off-by: Oleg Nesterov > > 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.