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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9F960C00140 for ; Wed, 24 Aug 2022 15:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zs7SzPvJ2gx7RNPMI0NQR6HL5tpKPdCiQk3jER8fRPo=; b=R6lV1j0QA7dPv4 doIsUepKS+IPqeBEkyF+waP/8RL7mpYfieEHcar0a/tJYKQfb7OZdRmQ9Y405REqsnX9iFI2XtPpw ERBcdr2qxENBdUbd3eRf52AJu+MHOk2JP9dOq7rkKiVRUTKicoWCVLapOWFBWo/6K/vbwTqErc0Va HGy7EZ8CoK0FN1bIfvlvBaproY55VRFzCiGc6fh+ABicDS4blc1vq+t1ZDNuVTscDyFrjjeWGqVrG lj5w2z7cYjUQ9bhTslME0SQ11Drj//XdJF5vXnXABwiLuswY/7CxQnPLeHMJnlL4nQ/NKUS9V+t9r vjLcZk8miq2N5FmeHGhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQsLL-00E465-7m; Wed, 24 Aug 2022 15:30:59 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQsLH-00E44K-Nh for linux-arm-kernel@lists.infradead.org; Wed, 24 Aug 2022 15:30:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A4E59618D6; Wed, 24 Aug 2022 15:30:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF94DC433C1; Wed, 24 Aug 2022 15:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661355053; bh=bdHWlWdZibPjvG9Ig5Z3u7zlLp/Dweo2dUzjMlR/vFw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=geWFbMj1asn2pA14t1ItPmvrZRl02ucR9eK9c7pHGlNj1EKI3zCtJFPuwX1LiT+R9 xTDPh434On1t0xJv7X1+gHWES2D2F6i3m3AzeH6zKoMhdK8gHtWBW/uWYPovjJjU8G 1sxeW6q/ABP9Yco194fvlo3PBExxSSuJaNogL2A/4Qk2ZWCX/8vybh3X14k6Y37Gky SiIPkPx7HIGXcsVxdZShNZvHmBUsG8uY53I353pLNchhaZR3Y/3EF1PsSs1Iz8C0ZO +ZiRUOO10wLn85uRxVgLxuqjB3rQDgOxyKfD6h/hVUTfd1lwe8WXzV3FVejcQ4MNMJ CmcRkw4xQ4cBQ== Date: Wed, 24 Aug 2022 16:30:47 +0100 From: Will Deacon To: Max Schulze Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, naush@raspberrypi.com, linux-mm@kvack.org, akpm@linux-foundation.org Subject: Re: BUG: Bad page map in process/Bad Swap file entry, RPI CM4 on clone syscall Message-ID: <20220824153045.GA18443@willie-the-truck> References: <20220815142213.GA10448@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220824_083055_852666_4D07A60C X-CRM114-Status: GOOD ( 22.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 18, 2022 at 07:14:12PM +0200, Max Schulze wrote: > > On 15.08.22 16:22, Will Deacon wrote: > >>> [20:47:09] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready > >>> [20:48:46] BUG: Bad page map in process projecta=A0 pte:1110111111111= 111 pmd:800000001c40003 > >>> [20:48:46] addr:0000007fa1c00000 vm_flags:00100073 anon_vma:ffffff805= bf80d08 mapping:0000000000000000 index:7fa1c00 > >>> [20:48:46] file:(null) fault:0x0 mmap:0x0 read_folio:0x0 > = > > = > >> I hate to say it, but this all looks like memory corruption hitting the > >> page table and possibly the 'struct page' array to me :/ > > = > > Perhaps a note on the occcurence: across devices, the "bad page map" > > differs at pte, but somehow is mostly consistent at pmd:800000001c40003 > > (though I have seen 800000001c02003 and 800000001c40003). Is this some > > "magic value"? Because when not, I think it would be highly unlikely to > > be the hardware. > > = > > It is not only my program that has the problem, I have seen > > = > > [Sun Aug 14 17:30:38 2022] BUG: Bad page map in process llvmpipe-3 pte= :262d2626292a2627 pmd:800000001c01003 > > = > > and > > [Sat Aug 13 11:53:43 2022] BUG: Bad page map in process Xorg:disk$1 pt= e:a098a09aa29ea8a4 pmd:800000001c01003 > > [Sat Aug 13 11:53:43 2022] addr:00000055a961e000 vm_flags:200100073 ano= n_vma:ffffff804c07d8f8 mapping:0000000000000000 index:55a961e > > [Sat Aug 13 11:53:43 2022] file:(null) fault:0x0 mmap:0x0 read_folio:0x0 > > = > > = > [..] > = > I am able to reproduce this on 6.0.0-rc1 . = > It looks like vm_normal_page does not recognize the page as being "normal= " (?). > (mm/memory.c) I think the issue is much more fundamental than that; you appear to have page-table corruption (for example, "pte:262d2626292a2627" and "pte:1110111111111111" are definitely corrupted) and so anything dealing with 'struct page' derived from the physical address in the pte is going to go wonky. >From the logs here, the pmds look ok but these are the pte values I spotted: 0x1110111111111111 0x262d2626292a2627 0xa098a09aa29ea8a4 0x212725231f242323 0x2626262023222323 which don't seem to correspond to any sort of poison, but are possibly artifacts of repeated patterns with random bits cleared? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel