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 C045BECAAD2 for ; Fri, 26 Aug 2022 08:39:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FA626B0074; Fri, 26 Aug 2022 04:39:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AA456B0075; Fri, 26 Aug 2022 04:39:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2724D940007; Fri, 26 Aug 2022 04:39:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 17DF46B0074 for ; Fri, 26 Aug 2022 04:39:37 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DED62AC40B for ; Fri, 26 Aug 2022 08:39:36 +0000 (UTC) X-FDA: 79841095152.30.D5E5A0C Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by imf25.hostedemail.com (Postfix) with ESMTP id 66938A0009 for ; Fri, 26 Aug 2022 08:39:36 +0000 (UTC) Received: from [37.24.11.236] ([37.24.11.236]) by web-mail.kundenserver.de (3c-app-1and1-bs05.server.lan [172.19.170.160]) (via HTTP); Fri, 26 Aug 2022 10:39:31 +0200 MIME-Version: 1.0 Message-ID: From: "max.schulze@online.de" To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, naush@raspberrypi.com, linux-mm@kvack.org, akpm@linux-foundation.org Subject: Aw: Re: BUG: Bad page map in process/Bad Swap file entry, RPI CM4 on clone syscall Content-Type: text/plain; charset=UTF-8 Date: Fri, 26 Aug 2022 10:39:31 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <20220824153045.GA18443@willie-the-truck> References: <20220815142213.GA10448@willie-the-truck> <20220824153045.GA18443@willie-the-truck> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:RW9d5oamFPyF4pGX2xTJDP5op0c/MTM67PmdIifW509jJz+qcv4uSv/7OCcCSxjtCwTiv 67KEO8sXrCFd3Pt2enKTctL9+dQ10yIFskwgeSQ7UCWYVwYVGBXOUKL71khFrvDM7Q+2wZ2jn4lu yMpXhDoRd+8lGpy+mdxZcJgmivcduhvAFdsj61qVKcGYZ1B1QNG4DXvp3CRoUZhd8uWo1J7cWBqU 4m042oFn6+wLuZ9hZyDa6kDyDE/sjOjIyKGt1w0Ld5iIkiK+7oRnFCijqdVR1MWvUdea5ounkhzS C8= X-UI-Out-Filterresults: notjunk:1;V03:K0:BgHhPZaGzgE=:hxSgf6nXK28B8t46x/hhj9 gJsZDLY8ZT8yEDK6ZSl4/MA59BzRQbmLvUeFLXXAy4fr+9jqGP16YyWtbE7grchNLJIXmkItL Tk3+eU3wIqxDNmZkUMwbDpE3ft8RvU1R9gISgcXLeADXfDaJUxQX3Ft2ZEkLOby/nuw9BDUTG YKyJie8o2ZdncXyANuZwDxSIKhuNr4qmxIlZAMppYMCm9UCi7xDb/xSnq6ORHhk8Gum8biwBP BAFl9HpVkuRtontg/asKWcnl4+Ptw0qGAkNxufBYa+l1CaeFOEcxgWYPn87LKeRiTIEgQwTpP ecLln2swirrPhfvyJlXxHw7Vjec4aFToGPFBTWpCWDPk4fZTLeGbaR2MypxS2ccuv5CGO1Q9g nSygKIQJmCqDkaBC0cReHINMJFIv6kLbBHxrvnhhuFFCCrdAx6GDurj47ykOySmMVP4DZ2c+c Us3LrTtCVGR9O8mv2KosznXUKh/G0RJSZicky9H2jx9t90ynAhw6j/wdlspY1AI9KrJCRoH4y w== ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of max.schulze@online.de designates 212.227.126.187 as permitted sender) smtp.mailfrom=max.schulze@online.de; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661503176; a=rsa-sha256; cv=none; b=DQooQacoEB3q8Wmlh/PVwgL66BNrshT2NREA9dX4oGOoSmVdIQufzxaVVvL+RrXg0f6Yc0 JIRpdAsfjEpF+POe+KPmBN2nUaDO5drtzjL0ff8ShF4WX6OqYRct4GdpCegygd/Eqr8ZBT 5aYQOeXLDCjn3DHl4c2F3+9E993bMl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661503176; 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; bh=4CofFmoeY26jjb21wxg7jQXoinpWhR9s0f98Z8X8JnI=; b=dWlaZc2/YqZ0hsb9eQlbEQMP0RCy14EQNCbTnudQLJ+RoCk7irI2+9S88p8UpvRsql0IKo Xju3Mr9UJniffH+Og1f7G6dDUlh92OUogI2SdYT5kvXA4kgFj4bFdg60wWR++E+7cK042N 6qJPh1AlhmzVvbYcJQYUhgun7yLVlXU= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 66938A0009 X-Rspam-User: X-Stat-Signature: 1sau59khcbejr9mniir39bnzqn39gtx4 Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of max.schulze@online.de designates 212.227.126.187 as permitted sender) smtp.mailfrom=max.schulze@online.de; dmarc=none X-HE-Tag: 1661503176-667676 X-Bogosity: Ham, tests=bogofilter, spamicity=0.062070, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > > > 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 Very valuable thought. I am streaming camera data, and generally the image captured from my desk is very dark (so these might be 8-bit brightness values from a mono ov9281 sensor). I then set the camera to generate a test pattern, i.e. it will only produce output like this 00000090: ffff ffff ffff ffff ffff 00ff 00ff 00ff 000000a0: 00ff 00ff 00ff 00ff 00ff 00ff 00ff 00ff ( also ff00 and 0000 ). And those were the crashes that followed: [ 54.838582] BUG: Bad page map in process pool-upowerd pte:ff00ffffffffff pmd:800000001801003 [ 54.839187] BUG: Bad page map in process pool-upowerd pte:ff00ff00ff00ff pmd:800000001801003 [ 54.839615] BUG: Bad page map in process pool-upowerd pte:ff00ff00ff00ff pmd:800000001801003 [ 54.845439] BUG: Bad page map in process pool-upowerd pte:ff00ff00ff00ff pmd:800000001801003 [ 49.664066] BUG: Bad page map in process gmain pte:ff00ffffffffff pmd:800000001801003 [ 49.664515] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.664879] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.665245] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.665610] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.665973] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.666336] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.666698] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 [ 49.667061] BUG: Bad page map in process gmain pte:ff00ff00ff00ff pmd:800000001801003 That confirms my suspicion of a dma write-out-of-bounds from a very separate angle (thanks again for the valuable idea). I have since taken this to https://github.com/raspberrypi/linux/issues/5138 but will update the list once investigation has found a solution. Thanks, Max