[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a21cbbb4-6fe0-c154-6064-517dad716aa0@kernel.org>
Date: Fri, 28 Apr 2023 08:15:18 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Greg KH <greg@...ah.com>, Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, lstoakes@...il.com,
regressions@...ts.linux.dev, linux-mm@...ck.org,
patches@...ts.linux.dev, linux-kernel@...r.kernel.org,
Fabian Vogt <fvogt@...e.com>, stable@...r.kernel.org
Subject: Re: [PATCH for v6.3 regression] mm/mremap: fix vm_pgoff in
vma_merge() case 3
On 27. 04. 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 <jirislaby@...nel.org>
>> Reported-and-tested-by: Fabian Vogt <fvogt@...e.com>
>> Link: https://bugzilla.suse.com/show_bug.cgi?id=1210903
>> Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()")
>> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
>> Cc: <stable@...r.kernel.org>
>> ---
>> 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_.
In upstream as:
commit 7e7757876f258d99266e7b3c559639289a2a45fe
Author: Vlastimil Babka <vbabka@...e.cz>
Date: Thu Apr 27 16:09:59 2023 +0200
mm/mremap: fix vm_pgoff in vma_merge() case 3
Please queue for 6.3.1.
thanks,
--
js
suse labs
Powered by blists - more mailing lists