Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp732866rwr; Thu, 27 Apr 2023 07:31:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tqDUMWJI2TO+Svo/rY7xOKDacnp4DtIHBpllQOATBjPzMRjzTDvZ13Npgm07NU/Mw2C4c X-Received: by 2002:a17:902:d4c5:b0:1a9:1b4:9fdd with SMTP id o5-20020a170902d4c500b001a901b49fddmr2146423plg.2.1682605881939; Thu, 27 Apr 2023 07:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682605881; cv=none; d=google.com; s=arc-20160816; b=fJE1LjBWAu/z/U3DEEp6CjE5shkksHXgid1OQiM+IZTojuf+Pk+qnS35HNglksp9/K xXNYtDe3Rcr4nfZ8kO/QtfsebF6WrKijeTGyXn9h7KObSnTI4GJto0BjeP7r7db+S9H3 t0/7D0Xw5ChYoqdHk9vu6+ErkUTDeuSUgxZdchZhN7Xmc4JHCveH4Cd+v7+2SjT4id0t JBQLZ2a35gyB2hunztE9qg0j3w9ILZRMfxeSYvZ7f1b6+QLpcYRTxvzOdnjrDXLX8p4n Xy/4QcKWB71Xa/if+xbL+E3nHBMpviNVQjI52Wd/jJfBx7Cm9Xuif3MrWgfChmNaoK24 LLZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=a5ON+ne5HB5nl4hoXlBqXG88QwWZJREMnOBOsnBrRv4=; b=FK0Rk77KEH5N8HGeVMZKRbJwCzxoMl717hEZ0RvUDP/xL4KnZwRf1OedXme/bk+ZLO +QiaH++sHD+0CpW1/uDJo1+5x87AqhPpAuxVK46+a4VUcdi6t9GnuxqoZGjU+al/yOLb 8onc74vl8xCJeIqNuVHh+76fbdHYtq2tha6muOEzaBNUrcAgpqM3A5Pfl96jv+9ol+sD 16NHrizaJcgLf7D6O38/I/MPlfBeZcvbg61ZbwpdQCtr0FKZNIUSfNqZD1mTLIGJxi4p PqA8mEmjhGCe+B4YN96GC3LSiVKzqhSmZPxVNQvHVW1JikTjAutTHfiVSoJXIOZPH8N/ lD1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b="ISY/db0+"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=aXBHwX7a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt18-20020a17090af2d200b002473f9e8a19si21214277pjb.14.2023.04.27.07.31.06; Thu, 27 Apr 2023 07:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b="ISY/db0+"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=aXBHwX7a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244031AbjD0O1x (ORCPT + 99 others); Thu, 27 Apr 2023 10:27:53 -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> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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