From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8B87724EAB1 for ; Tue, 2 Jun 2026 05:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780376549; cv=none; b=g6xQnwWwqBDmtbQubbNqiikalJloNAtCPqCGNYNXP6QM8LEUtsvP5L54Y4a99NrLOQDfKYo80WnDz9XPWnItW8pHqOQfXeX9Ok0CWSOurri7UDD6c3aw9DzyBvuGZ3j5y4635zur/BPZY7uIYY+jpnslTdT0A3ZfF4MpUPFDAIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780376549; c=relaxed/simple; bh=Mf1J6zmrUURNWVWJPyyfYS+nvumq7nc+VKZ20ym5teI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RgHVjObHx1lDW48qmcgcLsZVHo0uC2jZiFOjGW13wPiSjbwd/xBkyhby5ZHeKLTFe8Y1jnlceqUswnKTGQgn9t8QpEdqD4XVlrH1PF2YJ/9e93TKtt90+ZentWdz7H/hF62dG1KUx+eDb2VFG6YM8sma++T5ecDlQzJn6+cDIQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mbtiN1he; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mbtiN1he" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79D7D1F00893; Tue, 2 Jun 2026 05:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780376548; bh=nfT9XgO1pjlYvHgfjxOj59nD+Ap5qJKqD9RInaT5AUI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mbtiN1heq+G8i6qNHZQVivtNlAMeRhy4G0li9StfX4xJGNOG67+1y+nxBv4LYTpxx 159XFiMb8WxYlS2HB/Z/La1p/LwqUUTKtgx4eE5eXgOa6LHVlvPmDmlgFdzeBT+jdA y6s8z+2f65dkrkLHgwwoKpGNwiwswfQexLrBixLpndtwEYhySuM6pB3ioYcahXcMhi HMEtO5FDFeUegQi29zlh6DiM75ODwro5lOCcGzTfIn2SV3BGrMQHzDHikHguIcMIx0 V+Zoqq7gpx+0zdb2IqPnASuMcchSLx/UWa2TVrQSivo2ZKjQDGeD8BB5RFukmOIqEo 4EvI5ToSqpKzg== Date: Tue, 2 Jun 2026 07:02:22 +0200 From: "Oscar Salvador (SUSE)" To: Dave Hansen Cc: Oscar Salvador , Andrew Morton , Dave Hansen , Borislav Petkov , Karsten Desler , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] arch,x86: Skip setting align_offset for hugetlb mappings Message-ID: References: <20260601125015.216110-1-osalvador@suse.de> <53b599ef-0f16-44d9-bfda-a5a751649193@intel.com> 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: <53b599ef-0f16-44d9-bfda-a5a751649193@intel.com> On Mon, Jun 01, 2026 at 01:25:12PM -0700, Dave Hansen wrote: > On 6/1/26 05:50, Oscar Salvador wrote: > > On x86, arch_get_unmapped_area{_topdown} set align_offset in order to avoid > > cache aliasing on I$ on AMD family 15h when 'align_va_addr' is enabled. > > I'm sorry, but this is a big NAK from the x86 side, without at _least_ a > substantially improved changelog and evidence that x86 is both the only > place to reasonably fix this _and_ evidence that no other arch is affected. > > Why? > > x86 is not the only architecture that uses .align_offset. Yes, although we skip setting it for hugetlb mappings already some other arches like sparc and s390. > The bug was introduced in a generic, non-x86 commit (7bd3f1e1a9ae) > > The real fix is almost surely in arch-generic code. > > So my fear is that we'll apply the x86 thing. Four other architectures > will come along and have to add their own fixes. Then (if we're lucky) > someone will stick around and fix it properly, than all the > architectures will have to remove their hacks. Yes, I am not happy either with the current code, given that some arches have to do this dance of skip-offset-if-hugetlb and feels _quite_ wrong to do it at arch level, given that only hugetlb needs that and given that hugetlb is not the only one needing aligned things (thp?). > Worst-case, we end up with a latent bug, just without any testing > coverage because x86 testing is the most broad. > > Oscar, even if the real fix involves a couple of patches, can we please > see that, first? Then, we can go back and make an informed decision > about hacks versus proper fixes. Sure, as I already said I was not happy with the fix either, was just an attempt to address the regression quicker. Having said that, and proven that you are not happy either, let me take the long(er) road and come up with a proper fix for everyone, so no more hacks on arch level are needed. -- Oscar Salvador SUSE Labs