Fix copy_from_user if BCM2835_FAST_MEMCPY=n
authorTim Gover <tim.gover@raspberrypi.org>
Thu, 14 Mar 2019 10:16:02 +0000 (10:16 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:32:54 +0000 (16:32 +0100)
commita2e7ef2e6f690811bd30d91a97a05c8729a937ac
treedb6a1a4fc902487a9e03dee6c0312bb3d1cf1145
parent5990e4c8fb84892e900781f5075f5ab219fa8476
Fix copy_from_user if BCM2835_FAST_MEMCPY=n

The change which introduced CONFIG_BCM2835_FAST_MEMCPY unconditionally
changed the behaviour of arm_copy_from_user. The page pinning code
is not safe on ARMv7 if LPAE & high memory is enabled and causes
crashes which look like PTE corruption.

Make __copy_from_user_memcpy conditional on CONFIG_2835_FAST_MEMCPY=y
which is really an ARMv6 / Pi1 optimization and not necessary on newer
ARM processors.
arch/arm/lib/uaccess_with_memcpy.c