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 86238CE7CF4 for ; Tue, 1 Oct 2024 08:38:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 130DC28005D; Tue, 1 Oct 2024 04:38:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E108280036; Tue, 1 Oct 2024 04:38:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F120128005D; Tue, 1 Oct 2024 04:38:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D3495280036 for ; Tue, 1 Oct 2024 04:38:40 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 80B0740752 for ; Tue, 1 Oct 2024 08:38:40 +0000 (UTC) X-FDA: 82624382400.07.3F3C9AE Received: from mout.web.de (mout.web.de [212.227.15.3]) by imf12.hostedemail.com (Postfix) with ESMTP id 859FD40004 for ; Tue, 1 Oct 2024 08:38:38 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=web.de header.s=s29768273 header.b="ktfeJ/HX"; spf=pass (imf12.hostedemail.com: domain of spasswolf@web.de designates 212.227.15.3 as permitted sender) smtp.mailfrom=spasswolf@web.de; dmarc=pass (policy=quarantine) header.from=web.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727771791; 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=dHQWjXb/fiVQ65uoEfpRU6TEaFt3ZDC/VibtSLbrQ+s=; b=C1R8vhXV0sFa9zb6SMjB8jvRrBts6GWHY5d37vquBM6hwEu+iqRihwAYMzxRGiH+iVeAzb ScEhrb2aaAdbOH1WVui1YUGo6AW1ywYNWvObWNlhed3dLfsSmDnL1agsIXOLraukeLWmbb es7mfxdoRCRAkKqERCPLGeNYpcVHl2A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727771791; a=rsa-sha256; cv=none; b=V1XdE8GRdtFydeixUHWCrIIokMbUJTa5BXebnxu7/TloU5MYmLry0F4N5DO8FejYkJzHMp 2wvbn5OCVZIUhPpCMz71w2yHkL5MiZ7e9vEKn1fcG9N1UEa5bu7b8004D14/E283yHO5Ey OTF6bh8pYN1cCXVsb5J2PTh0LbHzJwM= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=web.de header.s=s29768273 header.b="ktfeJ/HX"; spf=pass (imf12.hostedemail.com: domain of spasswolf@web.de designates 212.227.15.3 as permitted sender) smtp.mailfrom=spasswolf@web.de; dmarc=pass (policy=quarantine) header.from=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1727771916; x=1728376716; i=spasswolf@web.de; bh=dHQWjXb/fiVQ65uoEfpRU6TEaFt3ZDC/VibtSLbrQ+s=; 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=ktfeJ/HXlqqlxPhDfS8gfnpmnezMZgLTw5bheN4OMEtAqCrrFKMAfFvxJkhRlqL5 xo3L2+jxV5LQfAHumqXEe3zmBdEUSosYb1IysB/SIjcc+Y3AVQg/7fF3JsNKEc1er 62dQlHHnVBTt5WKuMMUAvPfLBOc3l6U8pah573pKw9ljMgvLVmqZd6+u3hd+PwnMx n7AtJRevxYky4BJe9aLcE5/F+KNMKuOgYI8nNNFNf9SlMNI/LF8mMUNV21Juerhd/ UUAGx+OUWoBw6iWNhFvufosmIDM37b7zxZfNb5YO4e3g3MHuw+r2iSCaonsWSwAsw PyqL47S6HboYS7CR7g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.0.101] ([84.119.92.193]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MyvB8-1rzizR3bDm-00rrk4; Tue, 01 Oct 2024 10:38:35 +0200 Message-ID: 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, spasswolf@web.de Date: Tue, 01 Oct 2024 10:38:35 +0200 In-Reply-To: <5ec8665e-2f51-4b06-b68a-c878a969fb06@lucifer.local> References: <20241001023402.3374-1-spasswolf@web.de> <5ec8665e-2f51-4b06-b68a-c878a969fb06@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:GGItFS/1Z9tQ88jusPBjFxPCaWHDc5CSRmJZwl5OWi+y/6MEafg umjpjEtwf5Yo9dP7CGMHN5O7ePH2KnQdoznCoUUl7mHMnkL2Kk/Lrig+GDUUYPjzbEGUFY6 pnN9ch4wtubSYurnt+XtM6/JI2tzyJaVfgGK+wD+DyZ+4kXvbpiuAnO+wLuTgW2IbnrmnU0 fE9AEOhvxgIcp04eF4S+w== UI-OutboundReport: notjunk:1;M01:P0:Rot/5fFBva0=;G8/D7byKipVGPn/ZrevaIODN6Ie yjckyPa5/FMfYGUcQm0U2L4RVV9XOac61JZaLWk1Ystke43AwJlR1yQjAvCFw4bF5RR+iqXEf 2MTraReWAcdaWuqcMASd4wwA2HHYUHwbFiHodDETdWezKsV5pU4JQbrwVui+p6H4xBMsLMnuN 8Sg2cacgzZjuDZl2UehdxQ6Ta2RkZbNxDmygYQ6Yj6MMY3/Rox9Yi140hsLuLa2D+6IEvkCCu I20EeOb9YffsuZV81ouwrWV/3SytxE7AuI8v4h1FEonfst2FV0YjChsx1RuG9KWadyHsj0kHR jrWZJYvdIz3rZZWuNKSP1xcbmbM5J19WWpwQV9pj2tM8jucTMasWsvDcWvzekLy3gqXX6i7Bd 6rpavyroFFx0bnq7nrPvKGlvD4ESvaniuzRitOyNuVY/GhVFZx19aC/aNu9TR2RJ810dkGwyh eLi3HLomvzdjw7WnAX6s918rewyMXHO10M0l1e+yG+OfwkaWwAkNdMdS7nvhcjcXDWNkFpSii sCzeb7vZrRyEph+a+rqIkEZ+0ef/Y8UQKhoNdf4kUFx1Ce8CacMDkvIm2UzXPbh+fdtudzM6s Ax97hDjEoK2yR8TUZy9BMPTk8T2BkJjLhkoHiSf2hCEM19wWFlWjKXHpxbdL5Vh9844Q27rsZ aDGc+SpungNCgtV/5q/+fZ10X/7VBVFowpDW4zxGHL8LEA+nfZ1iJIdFbUJe/h1to/G1rg2n0 BCwMHMBpWV9RJL3uwA3+skCeTxRHy7/SbvUf9N8XXtx6jT/Xe0tN4oSS2N6LQXq4nqSt/40/k Y8d0jpxCphkxFQOvGSgdsQjA== X-Stat-Signature: 7of8tpy6atxuow3qahjgz8qxkaeeg59a X-Rspamd-Queue-Id: 859FD40004 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1727771918-882285 X-HE-Meta: U2FsdGVkX182Q5lBeO9T92x+d/WiNFTfrijKTrSyeJOXyN4pmy+c7PniKbKc2rdvzDiO1OsNolLoCRNzSU68CFlIAlWDcBuWzHsSXWjUDFvbQzihbDabevu1iJj/HS9Yo7F5+GJRMbrt9JxiCWEs8FImEDFbS6XUd618taWSS6NkohZ5MEIksaniNPnNFSKz/233IToKjsw0VsoRJFPdWrl70aJdJAvw19QE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6rKiUlZNsc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 Dienstag, dem 01.10.2024 um 09:02 +0100 schrieb Lorenzo Stoakes: > On Tue, Oct 01, 2024 at 04:34:00AM GMT, Bert Karwatzki wrote: > > I just noticed (via a bisect between v6.11 and v6.12-rc1) that this pa= tch > > (commit f8d112a4e657 in linux-next tree) leads to a severe memory corr= uption > > error under these (rather rare) circumstances: > > 1. Start a 32bit windows game via steam (which uses proton, steam's ve= rsion of wine) > > 2. When starting the game you the proton version used has to be update= d > > Yikes. Thanks for the report, very very much appreciated. Will look into > this as Liam is out until next week. > > How repro is this? Is it consistent? Reproducability is 100%, only the method is weird, you have to switch to a= n older version of proton in the steam settings of the game, start the game = and then switch back to the new version and start the game again. It might also be possible using standard wine and repeatedly upgrading an= d downgrading wine and (I have not tried this, yet ...) > > Can you confirm exactly what commit you are at in the kernel when you > generate the below dmesg? > > If you are able to reliably repro, could you try again with: Kernel is "commit f8d112a4e657 (HEAD) mm/mmap: avoid zeroing vma tree in mmap_region()" in linux-next tree. > > CONFIG_DEBUG_VM, CONFIG_DEBUG_VM_MAPLE_TREE and CONFIG_DEBUG_MAPLE_TREE = enabled? > > Might be useful to get CONFIG_KASAN on the go too... and CONFIG_DEBUG_IN= FO :)) > > Actually CONFIG_LOCKDEP and CONFIG_PROVE_LOCKING would be handy here too= ... > > Very much appreciated! > > > > > The effect is the following: The updating process of proton hangs and = the game does > > not start and even after an exit from steam two processes remain, one = of them at > > 100% CPU: > > $ ps aux | grep rundll > > bert 222638 1.7 0.1 2054868 87492 ? Ss 23:14 0:01 C:\= windows\syswow64\rundll32.exe setupapi,InstallHinfSection Wow64Install 128= \\?\Z:\mnt\data\.steam\debian-installation\steamapps\common\Proton - Expe= rimental\files\share\wine\wine.inf > > bert 222639 99.8 0.0 2054868 2380 ? R 23:14 1:01 C:\= windows\syswow64\rundll32.exe setupapi,InstallHinfSection Wow64Install 128= \\?\Z:\mnt\data\.steam\debian-installation\steamapps\common\Proton - Expe= rimental\files\share\wine\wine.inf > > Is there any dmesg at this point? Or not? As long as I don not try to kill those processes there's no error message = (but I only have let them run for a few minutes ...) > > > > > When trying to kill those processes with "killall rundll32.exe", these= error happen: > > > > [ T4313] ------------[ cut here ]------------ > > [ T4313] WARNING: CPU: 6 PID: 4313 at include/linux/rwsem.h:85 free_pg= tables+0x233/0x250 > > That should be rwsem_assert_held_write_nolockdep() if my kernel is not t= oo > different from yours, which suggests we're asserting that a write lock i= s > held and it's not... > Yes, that's the warning. Bert Karwatzki