diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:45:29 -0600 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:45:29 -0600 |
commit | 1d10e9e61dedad92bcf380a421d08f021e62ff1b (patch) | |
tree | 8e7641caa0710f4eba713a7f25de5eb314720993 /arch/arm64/lib/clear_user.S | |
parent | d532db8c82faef41ad16e6db7a8459aa21f4a822 (diff) | |
parent | 9f41e6b222c4a04c7b46068df82842a6188b4a57 (diff) |
Merge tag 'lsk-v4.1-15.12' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1linux-lng-4.1.14-2016.03linux-lng-4.1.14-2016.02linux-lng-4.1.14-2016.01linux-linaro-lng-v4.1
LSK 15.12 v4.1
Diffstat (limited to 'arch/arm64/lib/clear_user.S')
-rw-r--r-- | arch/arm64/lib/clear_user.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/lib/clear_user.S b/arch/arm64/lib/clear_user.S index c17967fdf5f6..a9723c71c52b 100644 --- a/arch/arm64/lib/clear_user.S +++ b/arch/arm64/lib/clear_user.S @@ -16,7 +16,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <linux/linkage.h> + +#include <asm/alternative.h> #include <asm/assembler.h> +#include <asm/cpufeature.h> +#include <asm/sysreg.h> .text @@ -29,6 +33,8 @@ * Alignment fixed up by hardware. */ ENTRY(__clear_user) +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(0)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) mov x2, x1 // save the size for fixup return subs x1, x1, #8 b.mi 2f @@ -48,6 +54,8 @@ USER(9f, strh wzr, [x0], #2 ) b.mi 5f USER(9f, strb wzr, [x0] ) 5: mov x0, #0 +ALTERNATIVE("nop", __stringify(SET_PSTATE_PAN(1)), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) ret ENDPROC(__clear_user) |