Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp246747rwj; Fri, 23 Dec 2022 00:22:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVxLdRFeR6MB3PvCH4ND2rcLfYL0jRLOmsInv8FAVK/Aa0DMJ1oKOCWLrtEYslxIsl5Ybq X-Received: by 2002:a17:906:3f8b:b0:83f:b41a:2e9d with SMTP id b11-20020a1709063f8b00b0083fb41a2e9dmr7339015ejj.16.1671783756896; Fri, 23 Dec 2022 00:22:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671783756; cv=none; d=google.com; s=arc-20160816; b=PeILUwRR/Hk3QEqbFCNAvX4i5qaDldpDu8ytxHESjmgv5DBlnkS7tuGPafRgM3x6ff syaoMd0WRUpTfdb0b3vX2rW3JcQFiMO+M+2b55dAM/UP0nY2hXqocDMS5ZG6kkQuSLY0 Pg09/hjyDyvOtfouObAPEQ5lTZoZP5Qt1qK2Zlgesi+zvjwjaoqX2Hqmpvhj6kV1lY7H M0NNa4oHsdwSJKrPG33G1mzVU8ZtssN3bQ2J6F5hKqwI2smxhuvDY1otv/sms2ZfZp3p aF/YwCedPCtyZYPSOL7+40ZIW79nFTziI2+xY1cpWuxktlRAQYUQwya/nCM66CgBCYnq l3eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=cMgM0qw6yt7z+oCKPukK4tuxhoEfRnX47Cch91Ru9Lw=; b=C/zrgLToEw/9yFX/a+vv//G4iqY/4ScALCUraHc4GZ+n8tsdUOwgNY9sKSzZKPwlWe YWnffBrq6TGvxvDewpFuMpbcHHsNogO0vx7n2T2V36jClndd3tmGDDOPn5IG0MTxCI97 PMTgyAoOZjoAka+u5qjPfqx6mtyAHqpen35jE7GF98XAmvI3F8bayyiSAVktjoKG3DAr IOw891MnyO145Qfoq8bTU4634qaweNqhL2UEKsYfZJLEboyrQSFkWkjxOGwCu9wV6m+3 FD0zdTtDBJTUOspky+WK6v/Bsbdld322OEO2v8sDRo4E2ObsQJFVNPN9988/SReR0yrh SPNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l7-20020a170906794700b007c10276464fsi2312566ejo.24.2022.12.23.00.22.21; Fri, 23 Dec 2022 00:22:36 -0800 (PST) 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; 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 S236035AbiLWIIc (ORCPT + 67 others); Fri, 23 Dec 2022 03:08:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiLWIIa (ORCPT ); Fri, 23 Dec 2022 03:08:30 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A1B27B35 for ; Fri, 23 Dec 2022 00:08:28 -0800 (PST) Received: from [2a02:8108:963f:de38:eca4:7d19:f9a2:22c5]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1p8d6Q-00066H-Et; Fri, 23 Dec 2022 09:08:26 +0100 Message-ID: <4563bddb-8c44-8d3f-93e3-a1433dc3af3f@leemhuis.info> Date: Fri, 23 Dec 2022 09:08:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH for v6.1 regression] mm, mremap: fix mremap() expanding vma with addr inside vma #forregzbot Content-Language: en-US, de-DE To: "regressions@lists.linux.dev" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20221216163227.24648-1-vbabka@suse.cz> From: Thorsten Leemhuis In-Reply-To: <20221216163227.24648-1-vbabka@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1671782908;ee867ac5; X-HE-SMSGID: 1p8d6Q-00066H-Et X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 [Note: this mail contains only information for Linux kernel regression tracking. Mails like these contain '#forregzbot' in the subject to make then easy to spot and filter out. The author also tried to remove most or all individuals from the list of recipients to spare them the hassle.] On 16.12.22 17:32, Vlastimil Babka wrote: > Since 6.1 we have noticed random rpm install failures that were tracked > to mremap() returning -ENOMEM and to commit ca3d76b0aa80 ("mm: add > merging after mremap resize"). > > The problem occurs when mremap() expands a VMA in place, but using an > starting address that's not vma->vm_start, but somewhere in the middle. > The extension_pgoff calculation introduced by the commit is wrong in > that case, so vma_merge() fails due to pgoffs not being compatible. > Fix the calculation. > > By the way it seems that the situations, where rpm now expands a vma > from the middle, were made possible also due to that commit, thanks to > the improved vma merging. Yet it should work just fine, except for the > buggy calculation. > > Reported-by: Jiri Slaby > Link: https://bugzilla.suse.com/show_bug.cgi?id=1206359 > Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize") This is just for the record, the fix will soon land, but I want to have this in the report I plan to send later. #regzbot ^introduced ca3d76b0aa80 #regzbot from: Jiri Slaby #regzbot title mm: random rpm install failures that were tracked to mremap() returning -ENOMEM #regzbot fix mm, mremap: fix mremap() expanding vma with addr inside vma #regzbot ignore-activity Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) P.S.: As the Linux kernel's regression tracker I deal with a lot of reports and sometimes miss something important when writing mails like this. If that's the case here, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.