Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
arch
/
arm64
/
lib
/
clear_user.S
diff --git
a/kernel/arch/arm64/lib/clear_user.S
b/kernel/arch/arm64/lib/clear_user.S
index
c17967f
..
a9723c7
100644
(file)
--- a/
kernel/arch/arm64/lib/clear_user.S
+++ b/
kernel/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>
* 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/assembler.h>
+#include <asm/cpufeature.h>
+#include <asm/sysreg.h>
.text
.text
@@
-29,6
+33,8
@@
* Alignment fixed up by hardware.
*/
ENTRY(__clear_user)
* 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
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
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)
ret
ENDPROC(__clear_user)