From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 323E6C77B61 for ; Thu, 27 Apr 2023 14:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243740AbjD0O1y (ORCPT ); Thu, 27 Apr 2023 10:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243662AbjD0O1w (ORCPT ); Thu, 27 Apr 2023 10:27:52 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37BFB1FE6; Thu, 27 Apr 2023 07:27:51 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CC8405C0207; Thu, 27 Apr 2023 10:27:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 27 Apr 2023 10:27:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1682605668; x=1682692068; bh=a5 ON+ne5HB5nl4hoXlBqXG88QwWZJREMnOBOsnBrRv4=; b=ISY/db0+zxp0t+fkm6 0n8WaCGUVCEHTBbni4+YEjjkmEErP7gn+L9QLMUJg7GyQ7ECHEzfSONRIkRmvKRl 2tlhtbdncGXxvhrjJpOqFtefmejXFiwQiB2jyj4vvF+Xvddc6TvPuFTR1FaRHROZ VX+SoUKD9hG7vsFBmzmJYEBJdc9CdSNDdacPWzZZaFanjBDmTjDrYQ9N6EIICsKE YfTsRO0hAsqxe7BF45/Gwxy5ZPH8Jh/ANQNHmZn4tBhRxqND0DtpzdEwm5MNAdfp V7Yd4iU8kZpIH2G+YKHcpTdHnqHVKpb9xEx/YhTx9HD3NWGuj3g9SX7PwMnLjF79 I3UA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682605668; x=1682692068; bh=a5ON+ne5HB5nl 4hoXlBqXG88QwWZJREMnOBOsnBrRv4=; b=aXBHwX7aqpVMTGsBDB+J9sN7vjDBi fKlo4XFYo6ZadStSpctoUaLLB/sEYz1F45U8O2PBjqrsdEv8cULZnl6SQYNpsHWA gSS3Q8IHQ5xDZGNQ+/3zyS8hiYZ451W/EHVe7l+6WQG6trnTFUitwS2MzI3b6U27 z10RS84dhRwbNtJuX4cSkXH+EaQU/XSJC28FEXx2rVboMY/SlDz1z4vizdat89gF +aCImjXJVVan1tRWkRfO8XYlxN1iGdJgnTCzSznGuxlI0sSQW8I9c6DaBTByt+lG xU4TjXQJ6WBeXBexyOUizntMGrXwvv0Ho63YdeBtazRr/hIDamDAALPdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduiedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepjeekue dtffeftddtvdeggeffjeeuteelhfeifeegheeufeekjeevveelueelfefhnecuffhomhgr ihhnpehsuhhsvgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Apr 2023 10:27:47 -0400 (EDT) Date: Thu, 27 Apr 2023 16:27:44 +0200 From: Greg KH To: Vlastimil Babka Cc: Andrew Morton , Linus Torvalds , "Liam R. Howlett" , lstoakes@gmail.com, regressions@lists.linux.dev, linux-mm@kvack.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, Jiri Slaby , Fabian Vogt , stable@vger.kernel.org Subject: Re: [PATCH for v6.3 regression] mm/mremap: fix vm_pgoff in vma_merge() case 3 Message-ID: <2023042719-stratus-pavestone-505e@gregkh> References: <20230427140959.27655-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230427140959.27655-1-vbabka@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 27, 2023 at 04:09:59PM +0200, Vlastimil Babka wrote: > After upgrading build guests to v6.3, rpm started segfaulting for > specific packages, which was bisected to commit 0503ea8f5ba7 ("mm/mmap: > remove __vma_adjust()"). rpm is doing many mremap() operations with file > mappings of its db. The problem is that in vma_merge() case 3 (we merge > with the next vma, expanding it downwards) vm_pgoff is not adjusted as > it should when vm_start changes. As a result the rpm process most likely > sees data from the wrong offset of the file. Fix the vm_pgoff > calculation. > > For case 8 this is a non-functional change as the resulting vm_pgoff is > the same. > > Reported-and-bisected-by: Jiri Slaby > Reported-and-tested-by: Fabian Vogt > Link: https://bugzilla.suse.com/show_bug.cgi?id=1210903 > Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()") > Signed-off-by: Vlastimil Babka > Cc: > --- > Hi, I'm sending this patch on top of v6.3 as I think it should be > applied and backported to 6.3-stable rather sooner than later. > This means there would be a small conflict when merging mm/mm-stable > later. Alternatively it could be added to mm/mm-stable and upcoming 6.4 > pull request, but then the stable backport would need adjustment. > It's up to Linus and Andrew. That's not how the stable tree works, sorry, it needs to be in Linus's tree _first_. thanks, greg k-h