Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp744889rwr; Thu, 27 Apr 2023 07:40:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ55Btx69z+PHJbajtMxh+Xsxp/XspypczI9L+mV6T5ffthqPVlXJ/zR0DPJLOBLYwl9B7pp X-Received: by 2002:a05:6a00:1a0f:b0:63d:3a18:49fd with SMTP id g15-20020a056a001a0f00b0063d3a1849fdmr2475303pfv.2.1682606420286; Thu, 27 Apr 2023 07:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682606420; cv=none; d=google.com; s=arc-20160816; b=FTxJIlKvi+M0yBr+mL85wfYGgOgm2AUZrrLgltxigEqGzPyQ+LTsablSYA35Q6ce2z 37CqX8cL+M+lv7lnpnL/kbeWkywB7Rv4h/6khVZl6CSqQTBRTMYzl9Xfe8kfxWhZ6aBO uWRxe2LNWdgpNxtjbOQXaYRV4wJ10ycNQiM04UYjxiquaxxZF8ULOWe++CMPweBDQFXT yQd5tv0n3Jzu7aTFkd0Bz2vPb09gnViOTy50yLuCXier64to4NzN45AC5dc/i+HHApmu Afh/upsw0zg9QW+VZ8qBBrwRGy7EAcrFLphKSh3fGVWmq7s8AuAnkNBXiQDoFUBdrbF1 ca+A== 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:dkim-signature:dkim-signature; bh=gCaK1kQTBnKVzZEqwaD7vAZ7IWvkRl+dKm9iAKEVDFI=; b=dzyVepcDRvEl7H637SpeFIJ+bcP3KBXQn79q2b+jZioS5RVX/ai+2cd7R44q9hR9FG 6jAVjllTvTWqCjiURpO+8DreBsnhEMXB9wDkwwij576WXoATXx1r4JkVezHy18uUqv3y /p7xR1v8rMZFbBQpmNTjzCcYXQJxP5DSqaUggE30xD3G5NiicP3VjHYGTesRk7JWXA8F vrVQAfjCMzaP3hTcbvhRfAvptcQ02PQFlstRW8eyiFGQWd/hC7QkvO3giiY9wN4GySA/ r5qpC7/6d8MxBeWLF/uOgeFcPC9xhS6enCjoiHb3KEtSuuWsLZoko+R9lUcZjLUyZygc tSzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cYFyY+id; dkim=neutral (no key) header.i=@suse.cz; 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 i22-20020aa796f6000000b0063d2b810fc6si19027887pfq.305.2023.04.27.07.40.05; Thu, 27 Apr 2023 07:40:20 -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=@suse.cz header.s=susede2_rsa header.b=cYFyY+id; dkim=neutral (no key) header.i=@suse.cz; 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 S244062AbjD0OjR (ORCPT + 99 others); Thu, 27 Apr 2023 10:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243276AbjD0OjQ (ORCPT ); Thu, 27 Apr 2023 10:39:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1305340E7; Thu, 27 Apr 2023 07:39:15 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BC0611FE4C; Thu, 27 Apr 2023 14:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682606353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gCaK1kQTBnKVzZEqwaD7vAZ7IWvkRl+dKm9iAKEVDFI=; b=cYFyY+idWuItPkjEMcolMKnRrKN5hEPoZRc2eEE/bPlofPmIQPI1cC751gP6De6adKLs6o FgkTN+b1VmccmmgW629pqDEOpxKu+zJinioe2buqHocyPh1xpvQKUR3k+fP1wtOa89obNa PnV+EoMCLpRpPAoC5JOjVUcvogVliG4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682606353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gCaK1kQTBnKVzZEqwaD7vAZ7IWvkRl+dKm9iAKEVDFI=; b=ksdxb+7kXsi4bLJ3SCvar5BCQBjnV93jUSmVL1D6/Ox2SZTBKLLjnm4xOq6e/9rBJebXZL /x1Oz9hw/pB6VHAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8F45113910; Thu, 27 Apr 2023 14:39:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G/5LIhGJSmRjIAAAMHmgww (envelope-from ); Thu, 27 Apr 2023 14:39:13 +0000 Message-ID: <3cc6e10c-f054-a30a-bf87-966098ccb7bf@suse.cz> Date: Thu, 27 Apr 2023 16:39:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH for v6.3 regression] mm/mremap: fix vm_pgoff in vma_merge() case 3 Content-Language: en-US To: Greg KH 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 References: <20230427140959.27655-1-vbabka@suse.cz> <2023042719-stratus-pavestone-505e@gregkh> From: Vlastimil Babka In-Reply-To: <2023042719-stratus-pavestone-505e@gregkh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 4/27/23 16:27, Greg KH wrote: > 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_. Sorry, I wasn't clear what I meant here. I didn't intend to bypass that stable rule that I'm aware of, just that it might be desirable to get this fix to Linus's tree faster so that stable tree can also take it soon. > thanks, > > greg k-h