ARM: 8790/1: signal: always use __copy_to_user to save iwmmxt context
authorJulien Thierry <julien.thierry@arm.com>
Thu, 14 Feb 2019 02:10:07 +0000 (21:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:20:45 +0000 (10:20 +0100)
commita26e4c1f48b7f1f666a78a9805dce6641220d03b
tree81094fba0e0bfc690135215e6ea8624cd6a4a9d6
parent56a0f2f329032f7feef14390bf6ea10476590e67
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