UPSTREAM: ARM: domains: switch to keeping domain value in register

Rather than modifying both the domain access control register and our
per-thread copy, modify only the domain access control register, and
use the per-thread copy to save and restore the register over context
switches.  We can also avoid the explicit initialisation of the
init thread_info structure.

This allows us to avoid needing to gain access to the thread information
at the uaccess control sites.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Bug: 25672827
Patchset: PAN emulation

(cherry picked from commit 1eef5d2f1b461c120bcd82077edee5ec706ac53b)
Signed-off-by: Kees Cook <keescook@google.com>

Change-Id: If903ec86006c4de1a440bf918c5d2491e34ade05
4 files changed