diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2013-05-18 23:34:30 +0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2013-05-20 11:48:23 -0700 |
commit | 51fc41a90603eaee7b6d03b6027be8f22fcf8ef9 (patch) | |
tree | 87f240d64051f5747027e07592f0ec50cbdd4e37 /arch/xtensa | |
parent | 7711ece9b31f0f3cf15ca16005dfd78988ea8f7e (diff) | |
download | op-kernel-dev-51fc41a90603eaee7b6d03b6027be8f22fcf8ef9.zip op-kernel-dev-51fc41a90603eaee7b6d03b6027be8f22fcf8ef9.tar.gz |
xtensa: fix fast_store_prohibited _PAGE_WRITABLE_BIT test
Before _PAGE_WRITABLE_BIT test fast_store_prohibited must make sure that
PTE is present. Otherwise 'writable' bit is undefined and may be reused
in the 'file offset' or 'swap type' PTE fields.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 5082507..fa94512 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -1792,10 +1792,15 @@ ENTRY(fast_store_prohibited) l32i a0, a0, 0 beqz a0, 2f - /* Note that we assume _PAGE_WRITABLE_BIT is only set if pte is valid.*/ + /* + * Note that we test _PAGE_WRITABLE_BIT only if PTE is present + * and is not PAGE_NONE. See pgtable.h for possible PTE layouts. + */ _PTE_OFFSET(a0, a1, a4) l32i a4, a0, 0 # read pteval + movi a1, _PAGE_CA_INVALID + ball a4, a1, 2f bbci.l a4, _PAGE_WRITABLE_BIT, 2f movi a1, _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_HW_WRITE |