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 61C23E93709 for ; Thu, 5 Oct 2023 12:31:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C60266B0096; Thu, 5 Oct 2023 08:31:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C10086B0099; Thu, 5 Oct 2023 08:31:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD76F6B009D; Thu, 5 Oct 2023 08:31:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9B9876B0096 for ; Thu, 5 Oct 2023 08:31:17 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 72D9FB3A93 for ; Thu, 5 Oct 2023 12:31:17 +0000 (UTC) X-FDA: 81311342994.17.4947641 Received: from vulcan.natalenko.name (vulcan.natalenko.name [104.207.131.136]) by imf12.hostedemail.com (Postfix) with ESMTP id 1F09E40031 for ; Thu, 5 Oct 2023 12:31:14 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=natalenko.name header.s=dkim-20170712 header.b=dKdsqudq; dmarc=pass (policy=reject) header.from=natalenko.name; spf=pass (imf12.hostedemail.com: domain of oleksandr@natalenko.name designates 104.207.131.136 as permitted sender) smtp.mailfrom=oleksandr@natalenko.name ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696509075; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/S7sO6RIBOF4vIV+ArsfqILLGplFRTHSIr7ucl8RgcU=; b=3otJVcoRxy02+9uYTAruiqqfWeoyTLA0H6TROndD+Fv1sTZZDFAAg+lGk/KkXtPr9rNt7T RXbaF88T98ZVwVZX13clSaQWSUJbuaXVUFO3WwF1DqMMIkPqNmFtMTBnjTcbLFJTMKu4cy nj1QS+QeiWMT3Poy1Ss5TbAejlTt+tE= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=natalenko.name header.s=dkim-20170712 header.b=dKdsqudq; dmarc=pass (policy=reject) header.from=natalenko.name; spf=pass (imf12.hostedemail.com: domain of oleksandr@natalenko.name designates 104.207.131.136 as permitted sender) smtp.mailfrom=oleksandr@natalenko.name ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696509075; a=rsa-sha256; cv=none; b=TmNBLJWGhC4HxTpIXwcGmKgOFSzhRQ59RLCBZb7os4PzZhQKExqt1M8wx5M9maHDAIHhgO ZCavM+EFOHslxVotJV2+/idF3kGG1NteZzM0lQotwLy/jRL8tqQs/HpipNA+lltFx7f8Od Rx3KQUYWWvPdwAAlgKBqOPeI6hjyo1s= Received: from spock.localnet (unknown [94.142.239.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 28C07152EC14; Thu, 5 Oct 2023 14:31:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1696509072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/S7sO6RIBOF4vIV+ArsfqILLGplFRTHSIr7ucl8RgcU=; b=dKdsqudq0s8tzcvq9WwYKCnJB75WGj3Q+TxbsIUOt41RSK4oTHhaZpCpWTYP3GFlNrCRyl QjgTMW9kvm6qRUKKFdAxyeguyfc3Go1Fvitw0Vbvwnx4fPRPvj9rhbF3PEtpDMuRGBYnst t3efLn5VJy7aIewqLYsfbmP7Ke1Gte0= From: Oleksandr Natalenko To: Matthew Wilcox Cc: Thomas Zimmermann , Linux Regressions , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Christian =?ISO-8859-1?Q?K=F6nig?= , linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, Maxime Ripard , Bagas Sanjaya , Andrew Morton , Sumit Semwal , linux-media@vger.kernel.org Subject: Re: [REGRESSION] BUG: KFENCE: memory corruption in drm_gem_put_pages+0x186/0x250 Date: Thu, 05 Oct 2023 14:30:55 +0200 Message-ID: <22037450.EfDdHjke4D@natalenko.name> In-Reply-To: References: <13360591.uLZWGnKmhe@natalenko.name> <3254850.aeNJFYEL58@natalenko.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7578566.EvYhyI6sBW"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 1F09E40031 X-Stat-Signature: jwuoy5rcdbprrwi79pn6ceagcfqzpbim X-Rspam-User: X-HE-Tag: 1696509074-693025 X-HE-Meta: U2FsdGVkX19wWvbwi6grf9g+TVtXHD+1HqJ5QW82huzDsDWzjpvLBOvjhjFl5B48firdW4V3LEpbObhc2d9h01JeOeNCRd+OA8a1f0tiKUsKnF4/0lEUvEoFFdhF41SzpPNNZ8z2+BmDMN52As2GHM/EQtUBKsTygS3hsrh/mgGu93joeDtjaO6tWtYGlaK2aGGmTSlsL8woRPGS7SschQi/tvhAxw36juXiSroHEf9csOqshtJVGUXqNBJ3MVJ3VWYcLP+D0q2Ae58DCYgCCk7Tj4NPw2ckT3dq8GKyl25CpjOOHN0+olldJV8L4IRbc9gwe8SmNCzrRnl3NYvMlkMglgZp5Sjv/h4+P/JpbTYMRnLJ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l3pUdaChkD6S8CEmEYhDEzAuYBzFnYNcLazD9nujFTpeKQQEXN9eqfPs6Wt/bxlVTRuZD49/VyEhfKHsbCRMp+RcGQvXz5WZqXzN 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: --nextPart7578566.EvYhyI6sBW Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Oleksandr Natalenko To: Matthew Wilcox Date: Thu, 05 Oct 2023 14:30:55 +0200 Message-ID: <22037450.EfDdHjke4D@natalenko.name> In-Reply-To: MIME-Version: 1.0 Hello. On =C4=8Dtvrtek 5. =C5=99=C3=ADjna 2023 14:19:44 CEST Matthew Wilcox wrote: > On Thu, Oct 05, 2023 at 09:56:03AM +0200, Oleksandr Natalenko wrote: > > Hello. > >=20 > > On =C4=8Dtvrtek 5. =C5=99=C3=ADjna 2023 9:44:42 CEST Thomas Zimmermann = wrote: > > > Hi > > >=20 > > > Am 02.10.23 um 17:38 schrieb Oleksandr Natalenko: > > > > On pond=C4=9Bl=C3=AD 2. =C5=99=C3=ADjna 2023 16:32:45 CEST Matthew = Wilcox wrote: > > > >> On Mon, Oct 02, 2023 at 01:02:52PM +0200, Oleksandr Natalenko wrot= e: > > > >>>>>>> BUG: KFENCE: memory corruption in drm_gem_put_pages+0x186/0x2= 50 > > > >>>>>>> > > > >>>>>>> Corrupted memory at 0x00000000e173a294 [ ! ! ! ! ! ! ! ! ! ! = ! ! ! ! ! ! ] (in kfence-#108): > > > >>>>>>> drm_gem_put_pages+0x186/0x250 > > > >>>>>>> drm_gem_shmem_put_pages_locked+0x43/0xc0 > > > >>>>>>> drm_gem_shmem_object_vunmap+0x83/0xe0 > > > >>>>>>> drm_gem_vunmap_unlocked+0x46/0xb0 > > > >>>>>>> drm_fbdev_generic_helper_fb_dirty+0x1dc/0x310 > > > >>>>>>> drm_fb_helper_damage_work+0x96/0x170 > > > >>> > > > >>> Matthew, before I start dancing around, do you think ^^ could hav= e the same cause as 0b62af28f249b9c4036a05acfb053058dc02e2e2 which got fixe= d by 863a8eb3f27098b42772f668e3977ff4cae10b04? > > > >> > > > >> Yes, entirely plausible. I think you have two useful points to lo= ok at > > > >> before delving into a full bisect -- 863a8e and the parent of 0b62= af. > > > >> If either of them work, I think you have no more work to do. > > > >=20 > > > > OK, I've did this against v6.5.5: > > > >=20 > > > > ``` > > > > git log --oneline HEAD~3.. > > > > 7c1e7695ca9b8 (HEAD -> test) Revert "mm: remove struct pagevec" > > > > 8f2ad53b6eac6 Revert "mm: remove check_move_unevictable_pages()" > > > > fa1e3c0b5453c Revert "drm: convert drm_gem_put_pages() to use a fol= io_batch" > > > > ``` > > > >=20 > > > > then rebooted the host multiple times, and the issue is not seen an= y more. > > > >=20 > > > > So I guess 3291e09a463870610b8227f32b16b19a587edf33 is the culprit. > > >=20 > > > Ignore my other email. It's apparently been fixed already. Thanks! > >=20 > > Has it? I think I was able to identify offending commit, but I'm not aw= are of any fix to that. >=20 > I don't understand; you said reverting those DRM commits fixed the > problem, so 863a8eb3f270 is the solution. No? No-no, sorry for possible confusion. Let me explain again: 1. we had an issue with i915, which was introduced by 0b62af28f249, and lat= er was fixed by 863a8eb3f270 2. now I've discovered another issue, which looks very similar to 1., but i= n a VM with Cirrus VGA, and it happens even while having 863a8eb3f270 appli= ed 3. I've tried reverting 3291e09a4638, after which I cannot reproduce the is= sue with Cirrus VGA, but clearly there was no fix for it discussed IOW, 863a8eb3f270 is the fix for 0b62af28f249, but not for 3291e09a4638. It= looks like 3291e09a4638 requires a separate fix. Hope this gets clear. Thanks. =2D-=20 Oleksandr Natalenko (post-factum) --nextPart7578566.EvYhyI6sBW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZUOOw5ESFLHZZtOKil/iNcg8M0sFAmUerH8ACgkQil/iNcg8 M0uSnQ/8D3tmJs/f/83sUR46G/rwqMpmxwX6gQNu0TmxXVWRtMhvcJ0aPMOFOFyd 4gIyLgpN6iwrx7q6CN4XH38pCgmbozKW1zhUC0WhUHgipOChC/levjj1yQbmPaYB zm0JAjP39Uq7JnUgdD0JwW54kJJy5ENthILoHDWhIMIXj7DHowiNIWxD16sBvRbG /ISVR18MvPTGL4J8M+Jj1HNWToBirW72r1xx6nO8G+rCnS/+vP6o5u/rJPoMBuKJ fZ/6gNzSKQ5r0VYHWdOB5ye+YI6WjCDgwBSKabQW3iZ4e53LS1m0xpUrqAU4J3w3 q8CgV2cwe3ls36ihNwkJEU8dog1rJgLxphcA2Llqs3lweBi2D62EhLk3oHVsg5kD qeEymkFsYZYxvAymu/bgu6Jf0sniYYI7UxcWvFDEijM6NJiJ9F/u0bCsriaY392E HfGX70BX7lWVh0LXGkUgNqt1cAOthcmUGBL8SeD8vqKvqsZIv2GwqhzkuD+0lTAF mOpICu+WgTasm7naR9xvd8gj1OXgJZcZ8wVtzqi3hek+0e4n7Bzqb1E7b0iaUlf1 SWKp+IQV6qEXmslnoMe8pYjJtTrT7fxTyZ5728wO5bakh5RzUEl99ilYA99abw19 DaPTa54wxN/HxWZmyPJ2YZWqcjbIDBBhSTY07aWvZUcrvdbHToE= =ROyz -----END PGP SIGNATURE----- --nextPart7578566.EvYhyI6sBW--