Re: Data corruption on i.MX6 IPU in arm_copy_from_user()

From: Krzysztof Hałasa
Date: Wed May 26 2021 - 08:29:11 EST


"Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx> 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()).
--
Krzysztof Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa