From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C006012B9A for ; Thu, 5 Oct 2023 12:19:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ob2iAc3p" Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=UsVE557PzrNyYPiLJjrpDiv6e1odj4+yvG6YntgxdCg=; b=ob2iAc3pk+z+RLvlwJM5ZEIvGo 1xjlUmYsHVt79MNTw4fGTMR0RYJ9EwHjkC8TchD6JndeNF9j7AL1U3YCLbp1cCTTPnSxL+D9XEjOz T2sXoNyUQjP4sXh2lkD/iqCFjHrfBqeIGpf9fdLQhjmwQX1ZzGnhB+C1SlebzOsIODjoZBD5Y0Cah oi6qGj3u6Dkn9AZ9iOkLgfcFEtKORAT1NAnzJlwUfCVQQZyqSAUE8tQTBRAJqj9Ts0hBfCxNPz35E FGLRIWC3XppZ0LoiouEOuc4j5NIaBhHZzY7aFkvgE/YWal0MMIJfbB3fG4pIIBrDnIuE6RkpeSBy0 4gZf7Lfg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qoNKS-009IID-A4; Thu, 05 Oct 2023 12:19:44 +0000 Date: Thu, 5 Oct 2023 13:19:44 +0100 From: Matthew Wilcox To: Oleksandr Natalenko 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 Message-ID: References: <13360591.uLZWGnKmhe@natalenko.name> <2160215.irdbgypaU6@natalenko.name> <3254850.aeNJFYEL58@natalenko.name> Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3254850.aeNJFYEL58@natalenko.name> On Thu, Oct 05, 2023 at 09:56:03AM +0200, Oleksandr Natalenko wrote: > Hello. > > On čtvrtek 5. října 2023 9:44:42 CEST Thomas Zimmermann wrote: > > Hi > > > > Am 02.10.23 um 17:38 schrieb Oleksandr Natalenko: > > > On pondělí 2. října 2023 16:32:45 CEST Matthew Wilcox wrote: > > >> On Mon, Oct 02, 2023 at 01:02:52PM +0200, Oleksandr Natalenko wrote: > > >>>>>>> BUG: KFENCE: memory corruption in drm_gem_put_pages+0x186/0x250 > > >>>>>>> > > >>>>>>> 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 have the same cause as 0b62af28f249b9c4036a05acfb053058dc02e2e2 which got fixed by 863a8eb3f27098b42772f668e3977ff4cae10b04? > > >> > > >> Yes, entirely plausible. I think you have two useful points to look at > > >> before delving into a full bisect -- 863a8e and the parent of 0b62af. > > >> If either of them work, I think you have no more work to do. > > > > > > OK, I've did this against v6.5.5: > > > > > > ``` > > > 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 folio_batch" > > > ``` > > > > > > then rebooted the host multiple times, and the issue is not seen any more. > > > > > > So I guess 3291e09a463870610b8227f32b16b19a587edf33 is the culprit. > > > > Ignore my other email. It's apparently been fixed already. Thanks! > > Has it? I think I was able to identify offending commit, but I'm not aware of any fix to that. I don't understand; you said reverting those DRM commits fixed the problem, so 863a8eb3f270 is the solution. No? 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C0FEE9370C for ; Thu, 5 Oct 2023 12:19:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 56F5510E050; Thu, 5 Oct 2023 12:19:55 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8156410E050 for ; Thu, 5 Oct 2023 12:19:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=UsVE557PzrNyYPiLJjrpDiv6e1odj4+yvG6YntgxdCg=; b=ob2iAc3pk+z+RLvlwJM5ZEIvGo 1xjlUmYsHVt79MNTw4fGTMR0RYJ9EwHjkC8TchD6JndeNF9j7AL1U3YCLbp1cCTTPnSxL+D9XEjOz T2sXoNyUQjP4sXh2lkD/iqCFjHrfBqeIGpf9fdLQhjmwQX1ZzGnhB+C1SlebzOsIODjoZBD5Y0Cah oi6qGj3u6Dkn9AZ9iOkLgfcFEtKORAT1NAnzJlwUfCVQQZyqSAUE8tQTBRAJqj9Ts0hBfCxNPz35E FGLRIWC3XppZ0LoiouEOuc4j5NIaBhHZzY7aFkvgE/YWal0MMIJfbB3fG4pIIBrDnIuE6RkpeSBy0 4gZf7Lfg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qoNKS-009IID-A4; Thu, 05 Oct 2023 12:19:44 +0000 Date: Thu, 5 Oct 2023 13:19:44 +0100 From: Matthew Wilcox To: Oleksandr Natalenko Subject: Re: [REGRESSION] BUG: KFENCE: memory corruption in drm_gem_put_pages+0x186/0x250 Message-ID: References: <13360591.uLZWGnKmhe@natalenko.name> <2160215.irdbgypaU6@natalenko.name> <3254850.aeNJFYEL58@natalenko.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3254850.aeNJFYEL58@natalenko.name> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Regressions , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sumit Semwal , linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, Andrew Morton , Maxime Ripard , Thomas Zimmermann , Bagas Sanjaya , Christian =?iso-8859-1?Q?K=F6nig?= , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Oct 05, 2023 at 09:56:03AM +0200, Oleksandr Natalenko wrote: > Hello. > > On čtvrtek 5. října 2023 9:44:42 CEST Thomas Zimmermann wrote: > > Hi > > > > Am 02.10.23 um 17:38 schrieb Oleksandr Natalenko: > > > On pondělí 2. října 2023 16:32:45 CEST Matthew Wilcox wrote: > > >> On Mon, Oct 02, 2023 at 01:02:52PM +0200, Oleksandr Natalenko wrote: > > >>>>>>> BUG: KFENCE: memory corruption in drm_gem_put_pages+0x186/0x250 > > >>>>>>> > > >>>>>>> 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 have the same cause as 0b62af28f249b9c4036a05acfb053058dc02e2e2 which got fixed by 863a8eb3f27098b42772f668e3977ff4cae10b04? > > >> > > >> Yes, entirely plausible. I think you have two useful points to look at > > >> before delving into a full bisect -- 863a8e and the parent of 0b62af. > > >> If either of them work, I think you have no more work to do. > > > > > > OK, I've did this against v6.5.5: > > > > > > ``` > > > 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 folio_batch" > > > ``` > > > > > > then rebooted the host multiple times, and the issue is not seen any more. > > > > > > So I guess 3291e09a463870610b8227f32b16b19a587edf33 is the culprit. > > > > Ignore my other email. It's apparently been fixed already. Thanks! > > Has it? I think I was able to identify offending commit, but I'm not aware of any fix to that. I don't understand; you said reverting those DRM commits fixed the problem, so 863a8eb3f270 is the solution. No?