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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EA80CF31B9 for ; Wed, 2 Oct 2024 20:39:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC3196B0332; Wed, 2 Oct 2024 16:39:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4D1A6B0335; Wed, 2 Oct 2024 16:39:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C79126B0332; Wed, 2 Oct 2024 16:39:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 94E2B6B032D for ; Wed, 2 Oct 2024 16:39:13 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2AD94120E1F for ; Wed, 2 Oct 2024 20:39:13 +0000 (UTC) X-FDA: 82629826986.11.11A7B1E Received: from mout.web.de (mout.web.de [217.72.192.78]) by imf06.hostedemail.com (Postfix) with ESMTP id ED3D618000C for ; Wed, 2 Oct 2024 20:39:10 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=web.de header.s=s29768273 header.b=hvgh4X9a; dmarc=pass (policy=quarantine) header.from=web.de; spf=pass (imf06.hostedemail.com: domain of spasswolf@web.de designates 217.72.192.78 as permitted sender) smtp.mailfrom=spasswolf@web.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727901456; a=rsa-sha256; cv=none; b=MVg7v3l228cTm/jzw9rNKAgN7C3xj60GsILfgT/pHSaqQ5XW6OzCOTSn2C9OPwy3zbt2ze Hab3oLlENgPJeSwVfkcPtdNbriWt2Of2EOhhDiElzKj0iEb+5akZqpOpnbYY0QODzJjtG6 CV+DMz/MQMe2sFUbphNZXNQPClpbkLU= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=web.de header.s=s29768273 header.b=hvgh4X9a; dmarc=pass (policy=quarantine) header.from=web.de; spf=pass (imf06.hostedemail.com: domain of spasswolf@web.de designates 217.72.192.78 as permitted sender) smtp.mailfrom=spasswolf@web.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727901456; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=c/zgEF/OV4yrJtrkRQeGzG9pQ86WJ8YfjXe/nmqgoQU=; b=S113t3GD/wVzFZFuW/N7jshRybobx8/pkUZ5wCgg/Y3Cox62F5ocRJfkE/Ywd7NXo/8udv Y1kZ9eEu5v7XGa8N8FruVCJLJfkHgBLrj+d+QypJBkeTjjoqPfvFBUM8ogl7S0uci6tIUT Cj0OLYkQpHicEZI8OVNSjci9WjATOqg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1727901548; x=1728506348; i=spasswolf@web.de; bh=c/zgEF/OV4yrJtrkRQeGzG9pQ86WJ8YfjXe/nmqgoQU=; h=X-UI-Sender-Class:Message-ID:Subject:From:To:Cc:Date:In-Reply-To: References:Content-Type:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=hvgh4X9aHBZA1t6FMkMf2QXiM2bJOFaqvmETYGLPXgABqRJcrUMcUv3SW2FwP/Mr B3V/6jUyJuPRpaXwdijSfzXH4zjcT66ce+qYdnTdzF7L6Xv7cjbxu7FYlYY/uyVo5 wHMjhRqjJ93IAwe1K4MxMkiWPbtDyjAXMe4zVOffunouq4dk1GwA0vdJau/iQrvJZ 2WP0DGSH8RBgeeTcDCcFYpMORrRyJWsoXneovLG5H2G6MSzLwIw1fLQ7ZAgJCTCAe /eydi47sDU7ExvEPi9b1DAA6aqC1Sy+yFXfgJDl/4rbISWQNtQqb4Elm7e0YAudkC tif6LvRz1/wtjTPm2g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.0.101] ([84.119.92.193]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MFrxl-1sfqAW3CXf-00ENmi; Wed, 02 Oct 2024 22:39:07 +0200 Message-ID: <102b06e5b9004c7b292fb10b245e4fa0aef21ab8.camel@web.de> Subject: Re: [PATCH v8 14/21] mm/mmap: Avoid zeroing vma tree in mmap_region() From: Bert Karwatzki To: Lorenzo Stoakes Cc: "Liam R . Howlett" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Wed, 02 Oct 2024 22:39:06 +0200 In-Reply-To: <385da45a-16df-4c8b-ae5e-33734e21f827@lucifer.local> References: <20241001023402.3374-1-spasswolf@web.de> <26991b8a-9fc4-4cf9-99de-048c90e7a683@lucifer.local> <32c0bcb3-4f05-4069-ac18-3fc9f76c6f7f@lucifer.local> <9d8761c5f32e2bad14b23772378a0a856b51003b.camel@web.de> <240ede917b6712021481ab356714977e247036b6.camel@web.de> <385da45a-16df-4c8b-ae5e-33734e21f827@lucifer.local> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.54.0-1+b1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rZq9/YylTitabQLMmW+A3NaqwyUD6P25vJ/XYysq7qAtOz3rFxV FCJsqudB7XCRAair7/CvTdr0MM11xbf+ysTeyz4c9HMTmXbv+tsYg5er6hlBl+beexjkNqr H7w00D4DNzco7TkhSQljiRWW+LKv9eEr4TKaRbYTvdyqzsnwZwwKdLQ2mh+UbSa9HwZf3em fxz0mln5s5V2Y/KMRTurQ== UI-OutboundReport: notjunk:1;M01:P0:4UIK5DVrsww=;HLXRRGs/y85mmxZVTzc1y/zJdxG YocGsv4uGzRxBTxa1uz7NPwdw8nXeZhb/ixMB6LGnf+rWZ2KCNjTmKWOcx8tQ+LWkl/sWcIu9 XW3/KKk7ydxakB8AgPsXDqg6rt/+Jm5bSuum0pz/oJx1J+YZH1jM/b3d61JTLjVUu/nJhCRmA X5OPJay9H592l5BbOuoENA4dfgjdBaEsWTzEAgIRo69450Tuk/HE1ZiJV89a3zeG/buvt2UBg PkT0c32G0ihn3o4xUfRhUSjRlup/y2IpPkG8g4P4zi4CN+CUflOlu1Wwc0W/qjejSokAmtdyH ZHKfwaLr3WnXOn4IScsJnXiR0lJo5OYOoluim/ejE5TXRJcO0g0CroYtWkqWV4WPXaCUvFxbA XgXjYgWf9oDbZFnd9tCgnZYk0hF8jOB/odq4BUK+wZTxFqRvIkfvHEv+2s9JFmg/+4HrE0dbV 6mDqByLzIR7Ch1U24xa8dYQCAfXhJUUpAxMs/zgzGgeQHpiyN4aZDcbxKiu3h7Jf4r9UnC380 HcpYpqt5scAPQXLUyYagpHTuF5m4ly9hyNzarIHPHP4hPfp+pw3KC5KjZ/GQRyLWDn4/MAj8D aXR+yb2ADRkrDhOjG+bQ58SET4IVCz99CH7yMAVK6BOTkUDEXfoNS7swp48m5jrnBA8bPy/xP +8zs8rcDvHjh6o8brByozlZHu15nscBolCZoLjQV8bwDbMuwbSvUthtBOoObCfprsnsxek1Nn H8pR+eiNLKAWptCjBrH2+gJ9JkNQJuaxRLyx8p3o+hYVges/Ay/eZTZhRW8kTM7FP5miVP1k/ BT1FM0ev8S24uoFn8XAPFxgQ== X-Rspamd-Queue-Id: ED3D618000C X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: sprbib84be6mojwcoto1ktmxa9z7ttrs X-HE-Tag: 1727901550-875848 X-HE-Meta: U2FsdGVkX1/RkubZz622s8CdiOuj1Gdm5+kjUltaW8VW5wy01sbXUWc25cxrZ/LBkG5o3LcHwNg4POXsDnwmbt5/xxO4lW4hxxVWvlLsN0d7ZZM3WA/1TLwzyHWC3h+hog3ACW9PAW96FaOIZB16tDO6BZ47QUJkpsXa8qclQbpuFpzY6w2yDbBGiQVcwk0k/xml5tIdXk8F0RPkvQdLZTulXXrmq5x0pzuI+sTWVW58+opILK+zSkSRs2nzSiTtrFZsU85UF1Gd7EhEgVsH7872uHb3hXCdFT537gDL3IIPwAR0tdRMpuaIHA4uGOjxf5ufd14IZiF+yCosml/7Ed3djmfYXKoo9WK0Uks/aKFgYHG7GcfrycC7ZVrI1mJNIe/4w8vZxenu1ZgiFJApaKloHZHq0AlVgzEeQY8YbauAkOFoLpzpcRyLxFqv0ZwanW3WAEiRUFxPA1a0zQxmsqXvOKwROM6TIyFevtGGA6thIZzy4trx7ZXTFvkE8L6MJ78xLy1ZeB+PfKwkdvNuvxU75/IZslIaQogjDzdVYjUd7ShwCNRPs4R+mT5ffbFQjCT8l7kyDHFc5JiH1mChP4SRsQf3n00A37GnCkvg2Rjqbyl8IOibekckaIGGR4X83PQ/ln9ygE9+aRVDtpjMTql3uL3tjX6OR3FUYTbbRirYtFWr1kf+asg+8vahPFywc+5Y5DLJ9BNbXX2aPyUADPi47HtDJRpZ58buhwdLYsiLNht6DEiBeUo3dCFpKcmEKLWLQMZ8JvrRON/w1KiiYjalQwIrkqKSgQ0WPoBRxaC14qOKegbX6ENl8pWvs1X8e44XwnL6nJjzhF1sQBN+SjROjBwtOLoIzIubYCrRXgn8TnyoerZEQjVnU6q7FEEWJab7cT7yjqPTlZdaHHOA5IybqIExJtsfw5QVyQgPJHQ30Lr2lA2lKaMwN5dN6Tti4ozfalkfX4CE04zi8a2 039dFtDC VrJor4jMu7lRer3T6ikGBzy8Mt7Pm4rjKCJphaH59XygNtgOR0H4SYTITJ34FPclDsS+sc2/fTcCgmQ0iA6RWwbeuEB83fWfQIZ0H+yTv7W4gn6hQvsl+lHGT8S3FiLUXLy2LkOfugNEkj1NANyjLXeoRe8xl25WgpIk1V0252r4t/J+vgAkD0Xnxyf8YTjE67/2lQqI1OBw1oJFkzjNtwb/uSeI8aYn+7XWHid2nz4Pj1pMId1E2MaEV3E5QFHRJe5PfypIFpCS7pqVIcNkImiB+1Tt4Wn7iDb4GsMLsmOG1pIPDPqwsnz7i5J51rov7kWtm/6YS13O9GFo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Am Mittwoch, dem 02.10.2024 um 21:22 +0100 schrieb Lorenzo Stoakes: > On Wed, Oct 02, 2024 at 10:06:34PM GMT, Bert Karwatzki wrote: > > [snip] > > > > > > > diff --git a/mm/internal.h b/mm/internal.h > > > index 93083bbeeefa..cd9414b4651d 100644 > > > --- a/mm/internal.h > > > +++ b/mm/internal.h > > > @@ -1443,4 +1443,19 @@ static inline void accept_page(struct page *p= age) > > > } > > > #endif /* CONFIG_UNACCEPTED_MEMORY */ > > > > > > +static inline bool check_interesting(unsigned long start, unsigned = long end) > > > +{ > > > + const unsigned long interesting_start =3D 0x1740000; > > > + /* Include off-by-one on purpose.*/ > > > + const unsigned long interesting_end =3D 0x68000000 + 1; > > > > In an earlier patch you requested this to be changed to 0x798b1000, is= this > > correct? > > > > Yes, please leave it as it is for now. > > > > + > > > + /* interesting_start interesting_end > > > + * |--------------------------| > > > + * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> end > > > + * <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D start > > > + */ > > > + return end > interesting_start && /* after or overlaps... */ > > > + start < interesting_end; /* ...overlaps. */ > > > +} > > > + > > > #endif /* __MM_INTERNAL_H */ > > > diff --git a/mm/mmap.c b/mm/mmap.c > > > index dd4b35a25aeb..8a1d5c0da86f 100644 > > > --- a/mm/mmap.c > > > +++ b/mm/mmap.c > > > @@ -1341,6 +1341,18 @@ struct vm_area_struct *expand_stack(struct mm= _struct *mm, unsigned long addr) > > > return vma; > > > } > > > > > > +static void ljs_dump(struct mm_struct *mm, > > > + unsigned long addr, unsigned long len, > > > + vm_flags_t vm_flags, bool is_unmap) > > > +{ > > > + if (!check_interesting(addr, addr + len)) > > > + return; > > > + > > > + pr_err("LJS: %s mm=3D%p [0x%lx, 0x%lx) [vm_flags=3D%lu]\n", > > > + is_unmap ? "munmap" : "mmap", mm, addr, addr + len, > > > + vm_flags); > > > +} > > > + > > > /* do_munmap() - Wrapper function for non-maple tree aware do_munma= p() calls. > > > * @mm: The mm_struct > > > * @start: The start address to munmap > > > @@ -1354,6 +1366,8 @@ int do_munmap(struct mm_struct *mm, unsigned l= ong start, size_t len, > > > { > > > VMA_ITERATOR(vmi, mm, start); > > > > > > + ljs_dump(mm, start, len, 0, true); > > > + > > > return do_vmi_munmap(&vmi, mm, start, len, uf, false); > > > } > > > > > > @@ -1375,6 +1389,8 @@ unsigned long mmap_region(struct file *file, u= nsigned long addr, > > > VMA_ITERATOR(vmi, mm, addr); > > > VMG_STATE(vmg, mm, &vmi, addr, end, vm_flags, pgoff); > > > > > > + ljs_dump(mm, addr, len, vm_flags, false); > > > + > > > vmg.file =3D file; > > > /* Find the first overlapping VMA */ > > > vma =3D vma_find(&vmi, end); > > > @@ -1390,6 +1406,12 @@ unsigned long mmap_region(struct file *file, = unsigned long addr, > > > > > > vmg.next =3D vms.next; > > > vmg.prev =3D vms.prev; > > > + > > > + if (check_interesting(addr, addr + len)) > > > + pr_err("LJS: prev=3D[%lx, %lx), next=3D[%lx, %lx)\n", > > > + vmg.prev ? vmg.prev->vm_start : 0, vmg.prev ? vmg.prev->v= m_end : 0, > > > + vmg.next ? vmg.next->vm_start : 0, vmg.next ? vmg.next->v= m_end : 0); > > > + > > > vma =3D NULL; > > > } else { > > > vmg.next =3D vma_iter_next_rewind(&vmi, &vmg.prev); > > > @@ -1413,9 +1435,29 @@ unsigned long mmap_region(struct file *file, = unsigned long addr, > > > vmg.flags =3D vm_flags; > > > } > > > > > > + if (check_interesting(addr, addr + len)) { > > > + char *special =3D vm_flags & VM_SPECIAL ? "special" : ""; > > > + char *has_file =3D file ? "file-backed" : ""; > > > + > > > + pr_err("LJS: Interesting [%lx, %lx) flags=3D%lu, special=3D[%s] f= ile=3D[%s]\n", > > > + addr, addr+len, vm_flags, special, has_file); > > > + } > > > + > > > vma =3D vma_merge_new_range(&vmg); > > > - if (vma) > > > + if (vma) { > > > + if (check_interesting(addr, addr + len)) { > > > + pr_err("LJS: Merged to [%lx, %lx), addr=3D%lx, end=3D%lx\n", > > > + vma->vm_start, vma->vm_end, vma_iter_addr(&vmi), > > > + vma_iter_end(&vmi)); > > > + > > > + mt_validate(&mm->mm_mt); > > > + } > > > + > > > goto expanded; > > > + } else if (check_interesting(addr, addr + len)) { > > > + pr_err("LJS: Failed to merge [%lx, %lx), reset...\n", > > > + addr, addr + len); > > > + } > > > /* > > > * Determine the object being mapped and call the appropriate > > > * specific mapper. the address has already been validated, but > > > @@ -1441,6 +1483,11 @@ unsigned long mmap_region(struct file *file, = unsigned long addr, > > > if (error) > > > goto unmap_and_free_vma; > > > > > > + if (check_interesting(addr, addr + len)) { > > > + pr_err("LJS: call_mmap() on [%lx, %lx) old_flags=3D%lu new_flags= =3D%lu new range=3D[%lx, %lx)\n", > > > + addr, addr + end, vm_flags, vma->vm_flags, vma->vm_start,= vma->vm_end); > > > + } > > > + > > > if (vma_is_shared_maywrite(vma)) { > > > error =3D mapping_map_writable(file->f_mapping); > > > if (error) > > > @@ -1467,6 +1514,11 @@ unsigned long mmap_region(struct file *file, = unsigned long addr, > > > /* If this fails, state is reset ready for a reattempt. */ > > > merge =3D vma_merge_new_range(&vmg); > > > > > > + if (check_interesting(addr, addr + len)) > > > + pr_err("LJS: flags changed for [%lx, %lx) from %lu to %lu %s", > > > + vma->vm_start, vma->vm_end, vm_flags, vma->vm_flags, > > > + merge ? "merged" : ""); > > > + > > > if (merge) { > > > /* > > > * ->mmap() can change vma->vm_file and fput > > > @@ -1510,10 +1562,18 @@ unsigned long mmap_region(struct file *file,= unsigned long addr, > > > > > > /* Lock the VMA since it is modified after insertion into VMA tree= */ > > > vma_start_write(vma); > > > + > > > + if (check_interesting(addr, addr + len)) > > > + pr_err("LJS: mm=3D%p: iter store addr=3D%lx, end=3D%lx, vma=3D[%l= x, %lx)\n", > > > + mm, vma_iter_addr(&vmi), vma_iter_end(&vmi), vma->vm_start= , vma->vm_end); > > > + > > > vma_iter_store(&vmi, vma); > > > mm->map_count++; > > > vma_link_file(vma); > > > > > > + if (check_interesting(addr, addr + len)) > > > + mt_validate(&mm->mm_mt); > > > + > > > /* > > > * vma_merge_new_range() calls khugepaged_enter_vma() too, the bel= ow > > > * call covers the non-merge case. > > > @@ -1530,6 +1590,10 @@ unsigned long mmap_region(struct file *file, = unsigned long addr, > > > perf_event_mmap(vma); > > > > > > /* Unmap any existing mapping in the area */ > > > + > > > + if (check_interesting(addr, addr + len)) > > > + mt_validate(&mm->mm_mt); > > > + > > > vms_complete_munmap_vmas(&vms, &mas_detach); > > > > > > vm_stat_account(mm, vm_flags, pglen); > > > diff --git a/mm/vma.c b/mm/vma.c > > > index 4737afcb064c..33f80e82704b 100644 > > > --- a/mm/vma.c > > > +++ b/mm/vma.c > > > @@ -1108,8 +1108,13 @@ void vms_clean_up_area(struct vma_munmap_stru= ct *vms, > > > vms_clear_ptes(vms, mas_detach, true); > > > mas_set(mas_detach, 0); > > > mas_for_each(mas_detach, vma, ULONG_MAX) > > > - if (vma->vm_ops && vma->vm_ops->close) > > > + if (vma->vm_ops && vma->vm_ops->close) { > > > + if (check_interesting(vma->vm_start, vma->vm_end)) > > > + pr_err("LJS: mm=3D%p Closing [%lx, %lx)\n", > > > + vma->vm_mm, vma->vm_start, vma->vm_end); > > > + > > > vma->vm_ops->close(vma); > > > + } > > > vms->closed_vm_ops =3D true; > > > } > > > > > > @@ -1179,6 +1184,10 @@ int vms_gather_munmap_vmas(struct vma_munmap_= struct *vms, > > > struct vm_area_struct *next =3D NULL; > > > int error; > > > > > > + if (check_interesting(vms->vma->vm_start, vms->vma->vm_end)) > > > + pr_err("LJS2 vms->start=3D%lx, vms->vma->vm_start=3D%lx\n", > > > + vms->start, vms->vma->vm_start); > > > + > > > /* > > > * If we need to split any vma, do it now to save pain later. > > > * Does it split the first one? > > > @@ -1202,6 +1211,11 @@ int vms_gather_munmap_vmas(struct vma_munmap_= struct *vms, > > > goto start_split_failed; > > > } > > > > > > + if (check_interesting(vms->vma->vm_start, vms->vma->vm_end)) > > > + pr_err("LJS: mm=3D%p vms=3D[%lx, %lx) split START of [%lx, %lx)\= n", > > > + vms->vma->vm_mm, vms->start, vms->end, > > > + vms->vma->vm_start, vms->vma->vm_end); > > > + > > > error =3D __split_vma(vms->vmi, vms->vma, vms->start, 1); > > > if (error) > > > goto start_split_failed; > > > @@ -1217,12 +1231,23 @@ int vms_gather_munmap_vmas(struct vma_munmap= _struct *vms, > > > for_each_vma_range(*(vms->vmi), next, vms->end) { > > > long nrpages; > > > > > > + if (check_interesting(vms->vma->vm_start, vms->vma->vm_end)) > > > + pr_err("LJS: mm=3D%p vms=3D[%lx, %lx) UNMAP [%lx, %lx)\n", > > > + vms->vma->vm_mm, vms->start, vms->end, > > > + next->vm_start, next->vm_end); > > > + > > > if (!can_modify_vma(next)) { > > > error =3D -EPERM; > > > goto modify_vma_failed; > > > } > > > /* Does it split the end? */ > > > if (next->vm_end > vms->end) { > > > + > > > + if (check_interesting(next->vm_start, next->vm_end)) > > > + pr_err("LJS: mm=3D%p vms=3D[%lx, %lx) split END of [%lx, %lx)\n= ", > > > + next->vm_mm, vms->start, vms->end, > > > + next->vm_start, next->vm_end); > > > + > > > error =3D __split_vma(vms->vmi, next, vms->end, 0); > > > if (error) > > > goto end_split_failed; > > > @@ -1295,9 +1320,14 @@ int vms_gather_munmap_vmas(struct vma_munmap_= struct *vms, > > > } > > > #endif > > > > > > - while (vma_iter_addr(vms->vmi) > vms->start) > > > + while (vma_iter_addr(vms->vmi) > vms->start) { > > > vma_iter_prev_range(vms->vmi); > > > > > > + if (check_interesting(vms->vma->vm_start, vms->vma->vm_end)) > > > + pr_err("LJS3: addr=3D%lx, vms->start=3D%lx\n", > > > + vma_iter_addr(vms->vmi), vms->start); > > > + } > > > + > > > vms->clear_ptes =3D true; > > > return 0; > > > > > > -- > > > 2.46.2 > > > > I just tested the "hunch" commit (without this patch) and it crashed i= n the same > > way. Here are more detailed instructions of how I create the crash: > > > > The game used is Rogue Heroes: Ruins of Tasos (which is basically Zeld= a). The > > game itself does not work anymore (even on unaffected kernel versions)= , it has > > been crashing with a > > > > Unhandled Exception: > > Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Fa= iled to > > create graphics device! ---> System.TypeInitializationException: The t= ype > > initializer for 'Microsoft.Xna.Framework.Graphics.GraphicsAdapter' thr= ew an > > exception. ---> SharpDX.SharpDXException: HRESULT: [0x80004005], Modul= e: > > [General], ApiCode: [E_FAIL/Unspecified error], Message: Call failed. > > > > error for sometime (probably a year). > > > > 1. Go to Properties->Compatibility and select "Force the use of specif= ic Steam > > Play compatibility tool" and the select Proton 7.0-6 > > 2. start the game, the game should then crash with the Xna error above > > 3. Go to Properties->Compatibility and unselect "Force the use of spec= ific Steam > > Play compatibility tool" > > 4. start the game again, this will usually give the vma error (on two = occasions > > so far the whole procedure (1-4) had to be done twice to get the error= . > > > > Thanks for this, however the game does work for me, at least on nvidia := )) I > continue to suspect an amd-specific issue here. I will try on my intel g= pu > laptop too. > > > Bert Karwatzki > > I just figured out what was wrong for me in "Ruins of Tasos", I didn't hav= e the 32bit vulkan drivers installed, so perhaps if you remove your 32bit vulkan driver package you can get the crash, too. Bert Karwatzki