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 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 0EBBCC2B9F7 for ; Wed, 26 May 2021 12:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6DBE613CC for ; Wed, 26 May 2021 12:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233514AbhEZMal (ORCPT ); Wed, 26 May 2021 08:30:41 -0400 Received: from ni.piap.pl ([195.187.100.5]:52350 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbhEZMaj (ORCPT ); Wed, 26 May 2021 08:30:39 -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 7B9794441CC; Wed, 26 May 2021 14:29:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 7B9794441CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1622032147; bh=gCJ0rIGLjNAWVrx9kpX2mzO+HVS/Mtj4phJXnJzE1og=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=K2cPDuyonovbOg74Sk9BWLn5l9jsYqv2Jq40kxJwaG/WoJ22a+s+S9aF43tuZk4d1 m8A74B0JejkJjC6OvKXGxO0whj4x9mgV9zYGrl5PHrhw/s+FnafuGPMKZtkGfMfw3a m/5rml4r7zvVjE4e2AXCdbEXX3/CfWxjhhaWZP9s= 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> Sender: khalasa@piap.pl Date: Wed, 26 May 2021 14:29:07 +0200 In-Reply-To: <20210526100843.GD30436@shell.armlinux.org.uk> (Russell King's message of "Wed, 26 May 2021 11:08: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: > Surely someone is not using copy_*_user() to copy data from userspace > direct to MMIO space... that would be crazy. No, it's the other way around: reading MMIO mapped to userspace (mmap on /dev/mem) and copying it to simple kernel buffer (e.g. pipe buffer). I.e., the MMIO is the userspace here (thus copy_from_user()). --=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 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 84128C47082 for ; Wed, 26 May 2021 14:07:57 +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 43874613C9 for ; Wed, 26 May 2021 14:07:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43874613C9 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=UeVbftZiMttXP4vzjJqlFhrHifNs4DWhWX6+MvmwDO4=; b=CMg+YlKoBc4fjn wQkDBvH5MEmTA1uzP7ArugQuR3d4l+i96T6sh9GuyHFQ7TqJLGz07B+Uxvg2D8YYaMhFQ8xz/o55n f8wV8FDGtK19DpWp4WnTk2se8CZ6js8+BS8sf8OoI7iDM5ym56HDsIbFQ0KC1McA+0GBpONEkpILb 5oUplkem6MNoMEgCCWUeGmycXKl4g+wnqS9yxLkuLwBCmE3BihttCnnen/RAr5gA2Ysi29EHqkKPV s8+23Yl9FVFvuaia7p2FMRWWQiDcc0ER/Ty89gsXPOEZT99Qz37BM23iMBURIhJBDM2fkH2orvPhw 63WTTFTQpxltftVQ8vFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lluA5-00Ehjo-Ek; Wed, 26 May 2021 14:05:30 +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 1llset-00DynR-SG for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 12:29:17 +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 7B9794441CC; Wed, 26 May 2021 14:29:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 7B9794441CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1622032147; bh=gCJ0rIGLjNAWVrx9kpX2mzO+HVS/Mtj4phJXnJzE1og=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=K2cPDuyonovbOg74Sk9BWLn5l9jsYqv2Jq40kxJwaG/WoJ22a+s+S9aF43tuZk4d1 m8A74B0JejkJjC6OvKXGxO0whj4x9mgV9zYGrl5PHrhw/s+FnafuGPMKZtkGfMfw3a m/5rml4r7zvVjE4e2AXCdbEXX3/CfWxjhhaWZP9s= 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> Date: Wed, 26 May 2021 14:29:07 +0200 In-Reply-To: <20210526100843.GD30436@shell.armlinux.org.uk> (Russell King's message of "Wed, 26 May 2021 11:08: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-20210526_052912_131375_58674B20 X-CRM114-Status: UNSURE ( 8.11 ) X-CRM114-Notice: Please train this message. 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 PiBTdXJlbHkgc29tZW9uZSBpcyBub3QgdXNpbmcgY29weV8qX3VzZXIoKSB0byBjb3B5IGRhdGEg ZnJvbSB1c2Vyc3BhY2UKPiBkaXJlY3QgdG8gTU1JTyBzcGFjZS4uLiB0aGF0IHdvdWxkIGJlIGNy YXp5LgoKTm8sIGl0J3MgdGhlIG90aGVyIHdheSBhcm91bmQ6IHJlYWRpbmcgTU1JTyBtYXBwZWQg dG8gdXNlcnNwYWNlIChtbWFwCm9uIC9kZXYvbWVtKSBhbmQgY29weWluZyBpdCB0byBzaW1wbGUg a2VybmVsIGJ1ZmZlciAoZS5nLiBwaXBlIGJ1ZmZlcikuCkkuZS4sIHRoZSBNTUlPIGlzIHRoZSB1 c2Vyc3BhY2UgaGVyZSAodGh1cyBjb3B5X2Zyb21fdXNlcigpKS4KLS0gCktyenlzenRvZiBIYcWC YXNhCgpTaWXEhyBCYWRhd2N6YSDFgXVrYXNpZXdpY3oKUHJ6ZW15c8WCb3d5IEluc3R5dHV0IEF1 dG9tYXR5a2kgaSBQb21pYXLDs3cgUElBUApBbC4gSmVyb3pvbGltc2tpZSAyMDIsIDAyLTQ4NiBX YXJzemF3YQoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18K bGludXgtYXJtLWtlcm5lbCBtYWlsaW5nIGxpc3QKbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZy YWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGlu dXgtYXJtLWtlcm5lbAo=