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 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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 8B5B5C4708F for ; Mon, 31 May 2021 04:32:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4DAC161057 for ; Mon, 31 May 2021 04:32:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DAC161057 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=piap.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:MIME-Version:Message-ID:In-Reply-To: Date:References:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yqXof5DH4xwiwFgTt+CFNrUnpWOWo08GpSe9OFdLXSA=; b=0xiNBq1uIeh04b D5J1/h12FtrwaGtmN6RSzQqaN9Z6W+VPIMfEb/iS6e1A+q7gZ+lPi9UCzZZgEDkbUr5PC84d+kIj+ pA+NB1hhFM4JkTahGJBqyQSi7S6hHTalWLA4sixXBwnfEw4HVbjJ/oZvLHH7y4SzsmsbvTwZHqXK9 Kguyj5F2Pm/aN4H7603LOV6bonfKD/iYSN8rmoj8NUMPehkmfxNFHzG4dGy9coKQn9cjEVe1UuoV5 XObm0lyNnUZOQtWtXsyfBgz/wdgt8w6FX2ZjswU8CHuO1bBEoR9AgJt25rsLMlGhnbg8GLxf9Q4HU TPOGVp9LxzYvvXYxA87g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZZL-00AgfM-3v; Mon, 31 May 2021 04:30:27 +0000 Received: from ni.piap.pl ([195.187.100.5]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZZG-00Agei-0F for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 04:30:25 +0000 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> 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210530_213023_197448_B777CC18 X-CRM114-Status: GOOD ( 16.21 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org IlJ1c3NlbGwgS2luZyAoT3JhY2xlKSIgPGxpbnV4QGFybWxpbnV4Lm9yZy51az4gd3JpdGVzOgoK Pj4gTERNMTI6IDEgMyA0IDUgNiA3IDggOSBBIEIgQyBECj4KPiBUaGF0J3MgcmF0aGVyIHNhZCwg YW5kIGRvZXMgbG9vayB2ZXJ5IG11Y2ggbGlrZSBhIGhhcmR3YXJlIGJ1Zy4KPgo+IFRoZSBxdWVz dGlvbiBpcyB3aGF0IHRvIGRvIGFib3V0IGl0Li4uIHRoZXJlJ3MgTG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