Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5236179pxj; Wed, 26 May 2021 06:09:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz68Lw9T/faNyKl96KMFvzQmveqizj8veigdArqgk7sgLRFrSl4OcoePkZU2gIbbLzF/IAL X-Received: by 2002:a17:906:5488:: with SMTP id r8mr33710570ejo.374.1622034548700; Wed, 26 May 2021 06:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622034548; cv=none; d=google.com; s=arc-20160816; b=F3/TAcVcQ4pVY0XVF8MFfsGHpGDuCCSq8FaGj6xLmjYrSjmhbtJtfcFBx1z90J2wCo 0S/wXUbqkxaG1Szo+G89eWiQC/HHxVeQ+91MDrTjJw4YDsf/RuFLFltaOfwXEqs0u1M8 8UVHhCMcwifA0cjXPmoSnxNE01gZHFaFcWOP+otWOw7+RvPCwJXXo86TtUvZeW5j67np 8bEQ8W9FNNu0Wl6Apsc7XKpiMcB+beTNPBafZZW3GYGkY0iJrjZH5ps1xHjYLKTg0SN/ yOoKXW/U/JlAjlP7+bCHGEW1jqHjL8/ky1u0i48/uXnulz5KT5PcU6+5RsLfYoqWiTub s/Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:in-reply-to:date:sender:references:subject:cc:to:from :dkim-signature:dkim-filter; bh=gCJ0rIGLjNAWVrx9kpX2mzO+HVS/Mtj4phJXnJzE1og=; b=FDMAJ2Q5y61oWhS9Kn++L/IIyl3+PM5YVbD1b1Grkghv4BOpm2OdIsr2IDGo7Vxpui 9SJzQWOevgdNKGkoDlrkmBWkwEvLq3Dlt89VQie/78vmX4eiwAwpk7BMoq7f0zzwVQO+ eRM4ri7kOKz8OqwuoHNPJHz+q/LNtRcsfKc4a2y5K5A2/r335lQjOph3+SOjGmJDVjmb yyTARyiWEr/HWzjUjKAEoXPYX4fb9/ZPhKqvhUlbBg21baJnSmEheIjvQbaMm20ptVAc ztQbmb/TXLErcMUivg+IBbq4m4q8k9tzcgZAxCPj0X8vEaeQ2f6dhil1rsrVBCKTDg+w Fuig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=K2cPDuyo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u11si19068123edq.89.2021.05.26.06.08.46; Wed, 26 May 2021 06:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=K2cPDuyo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233236AbhEZMak (ORCPT + 99 others); Wed, 26 May 2021 08:30:40 -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