ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context
authorJulien Thierry <julien.thierry@arm.com>
Wed, 13 Feb 2019 21:32:08 +0000 (16:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:25:36 +0000 (10:25 +0100)
commit3a59b35c3cb88e3fa1f050c34bea2f3f849851b4
treedbb30d2ae9147524e72c12c199b279b50ccfada7
parentec4842816f04dc67638d1105b2001f418c462071
ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context

Commit 73839798af7ebc6c8d0c9271ebbbc148700e521f upstream.

When setting a dummy iwmmxt context, create a local instance and
use __copy_to_user both cases whether iwmmxt is being used or not.
This has the benefit of disabling/enabling PAN once for the whole copy
intead of once per write.

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David A. Long <dave.long@linaro.org>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/kernel/signal.c