diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2013-05-15 17:34:05 +0200 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2013-07-08 10:18:56 +0200 |
commit | a99e07ee5e887750f5136bc6799abe47a56fd2c9 (patch) | |
tree | 9464580bafe4ff135db21a6fb2a5165445d7bdaf /arch/xtensa/kernel | |
parent | xtensa: adjust boot parameters address when INITIALIZE_XTENSA_MMU_INSIDE_VMLI... (diff) | |
download | linux-a99e07ee5e887750f5136bc6799abe47a56fd2c9.tar.xz linux-a99e07ee5e887750f5136bc6799abe47a56fd2c9.zip |
xtensa: check TLB sanity on return to userspace
- check that user TLB mappings correspond to the current page table;
- check that TLB mapping VPN is in the kernel/user address range
in accordance with its ASID.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index fa94512ff84d..9298742f0fd0 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -458,7 +458,7 @@ common_exception_return: _bbsi.l a4, TIF_NEED_RESCHED, 3f _bbsi.l a4, TIF_NOTIFY_RESUME, 2f - _bbci.l a4, TIF_SIGPENDING, 4f + _bbci.l a4, TIF_SIGPENDING, 5f 2: l32i a4, a1, PT_DEPC bgeui a4, VALID_DOUBLE_EXCEPTION_ADDRESS, 4f @@ -476,6 +476,13 @@ common_exception_return: callx4 a4 j 1b +5: +#ifdef CONFIG_DEBUG_TLB_SANITY + l32i a4, a1, PT_DEPC + bgeui a4, VALID_DOUBLE_EXCEPTION_ADDRESS, 4f + movi a4, check_tlb_sanity + callx4 a4 +#endif 4: /* Restore optional registers. */ load_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT |