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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C6CC47082 for ; Mon, 31 May 2021 04:30:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA1F161008 for ; Mon, 31 May 2021 04:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbhEaEb7 (ORCPT ); Mon, 31 May 2021 00:31:59 -0400 Received: from ni.piap.pl ([195.187.100.5]:37872 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbhEaEby (ORCPT ); Mon, 31 May 2021 00:31:54 -0400 Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ni.piap.pl (Postfix) with ESMTPSA id 67CBC4441AA; Mon, 31 May 2021 06:30:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 67CBC4441AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1622435411; bh=l4NPvVhYwcCMSvsz+fATcKqeBrkYke26i4Qu64Bnbw8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ck8rmuk1u2sqYDwFInX8OlXhOPW+/tfZY0HhLdclfnCwdpYo+3B4J/eGu3kfBKruT 36bLdfAE5uWq3BpJs7JnTtXMqoCfw00tklJC6ARLEoRAIZn+safgRUNa09+nOfjDG5 uY9PTFbKSQvxXsWi9FKKZmXqZhuRZKu0sygnXm+E= From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: "Russell King (Oracle)" Cc: linux-arm-kernel , lkml Subject: Re: Data corruption on i.MX6 IPU in arm_copy_from_user() References: <20210526100843.GD30436@shell.armlinux.org.uk> <20210526131853.GE30436@shell.armlinux.org.uk> <20210528143544.GQ30436@shell.armlinux.org.uk> Sender: khalasa@piap.pl Date: Mon, 31 May 2021 06:30:10 +0200 In-Reply-To: <20210528143544.GQ30436@shell.armlinux.org.uk> (Russell King's message of "Fri, 28 May 2021 15:35:44 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 4 X-KLMS-Message-Action: skipped X-KLMS-AntiSpam-Status: not scanned, whitelist X-KLMS-AntiPhishing: not scanned, whitelist X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, not scanned, whitelist Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Russell King (Oracle)" writes: >> LDM12: 1 3 4 5 6 7 8 9 A B C D > > That's rather sad, and does look very much like a hardware bug. > > The question is what to do about it... there's Linus' "do not break > userspace" edict and that's exactly what this change has done. So I > suppose we're going to have to revert the change and put up with > everything being slightly slower on arm32 than it otherwise would > have been. That probably means we'll end up with almost every kernel > tree out there carrying a revert of the revert to work around the > fact that seemingly NXP broke their hardware - which itself is not > a good idea. I guess we're just going to have to put up with that. For userspace, it's quite a corner case, basically development-only - and I guess there are very few people who will do things like this. The same problem can manifest itself without any kernel involvement - it's enough to mmap /dev/mem and use LDM on in completely in userspace. This can't be fixed - unless we disallow IPU mmap. Perhaps making sure the bug is clearly documented is better than doing a partial fix. Ideally NXP should document it in their papers, and we should add notes to IPU driver code. The last one - I guess I can do. --=20 Krzysztof Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa