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 8C7DF3C062C for ; Thu, 11 Jun 2026 09:44:40 +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=1781171087; cv=none; b=syZGnD0Oe21woydVHEwjdaTLxw3fZW2f8qRT6SNCfF1bgjA71VptKxVYf7jlUIRNVlJ5RoFY+TyGGDjw9NLt23l7CWt4Ryn4FOc2c0ROSGwja/y27UnZsQVRuwwak/eYiYvZtvC6Q4ubzAnh0pKazsDlm3U2Igmpzh94RZZnZ9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781171087; c=relaxed/simple; bh=Qgm2pSK2l5U8Amt7Dr1kMP+zB9L7nNElxAvkTBS/YiY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BpNcQ04CBY3H7PwSDdZ9eAOgS1av2vCDX4upqR7hy80gEqfmuefg2bx/YtXfINRL959ZwN1cazRdm1XqSM/EsSC3B/534Svd5sVKngDo6KC9BlHSA9v3js7A6g0DpCc1deH5RB9Gudp6TqNtiugForTopBVkcFloJSv85K8YX80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DETy5PZf; 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="DETy5PZf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D87081F00893; Thu, 11 Jun 2026 09:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781171080; bh=GDi+IlU7odqCU3b6/NqPii4xRsY6tCi0zw2in+d4kpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=DETy5PZfXYGzapPs7W3ysg8WksQLVm4wbK3V4tyCuDz2DsJziOB74H9yxhSw23vsf LMiYqsUWWzLHFg/5YNab5HEts4ZmRZce+Y75DSjnDN8/IgSeTCc+sIfx/ICSwJHEfS w6XOrpH9EBGuu0xs6OIjPbfQIVlSF05ntEbdH9DpcHbzwvCI7yVY7qwfqsh5WwQnAu aoucjQWTxgJNGfNacGus7yeldVBeSOatDzy5cDQp/6IYZky0Iji4qpOfnD5vOGGd4R 8nOPK3qURixRO50u0Y79DftYV4eNlzTJDGHGeEce7+WIVGpLO9IiPH8h/Vm2nOWzTu bT3s0skcQMWWg== Date: Thu, 11 Jun 2026 10:44:33 +0100 From: Lorenzo Stoakes To: "Oscar Salvador (SUSE)" Cc: Andrew Morton , Arnd Bergmann , Greg Kroah-Hartman , David Hildenbrand , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 2/3] mm/vma: remove mmap_action->success_hook Message-ID: References: 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: On Thu, Jun 11, 2026 at 10:00:51AM +0200, Oscar Salvador (SUSE) wrote: > On Tue, Jun 02, 2026 at 12:06:26PM +0100, Lorenzo Stoakes wrote: > > This hook was introduced to work around code that seemed to absolutely > > require access to a VMA pointer upon mmap(). > > > > However, providing this hook leaves a backdoor to drivers getting access > > to the very thing mmap_prepare eliminates - a pointer to the VMA. > > > > Let's solve this contradiction by removing it. The key intended user was > > hugetlb, however it seems that the best course now is to avoid allowing > > all drivers the ability to work around mmap_prepare, and find a different > > solution there. > > > > Signed-off-by: Lorenzo Stoakes > > Acked-by: David Hildenbrand (Arm) > > Reach out if I can be of any help with the hugetlb thing :-) Thanks :) I will probably have a quick go at it at some point and just see what I can do, hopefully I can figure something out quick, otherwise might very well take you up on that :)) > > Reviewed-by: Oscar Salvador Thanks! > > > > -- > Oscar Salvador > SUSE Labs Cheers, Lorenzo