diff options
author | David Daney <david.daney@cavium.com> | 2011-07-06 01:34:46 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-07-26 07:47:47 +0200 |
commit | bf28607fbe529e20180080c4a0295b0a47834fde (patch) | |
tree | 101ca3c89186e1feb07ceb61ba91a9150d19218f /MAINTAINERS | |
parent | MIPS: Add uasm UASM_i_SRL_SAFE macro. (diff) | |
download | linux-bf28607fbe529e20180080c4a0295b0a47834fde.tar.xz linux-bf28607fbe529e20180080c4a0295b0a47834fde.zip |
MIPS: Close races in TLB modify handlers.
Page table entries are made invalid by writing a zero into the the PTE
slot in a page table. This creates a race condition with the TLB
modify handlers when they are updating the PTE.
CPU0 CPU1
Test for _PAGE_PRESENT
. set to not _PAGE_PRESENT (zero)
Set to _PAGE_VALID
So now the page not present value (zero) is suddenly valid and user
space programs have access to physical page zero.
We close the race by putting the test for _PAGE_PRESENT and setting of
_PAGE_VALID into an atomic LL/SC section. This requires more registers
than just K0 and K1 in the handlers, so we need to save some registers
to a save area and then restore them when we are done.
The save area is an array of cacheline aligned structures that should
not suffer cache line bouncing as they are CPU private.
[ralf@linux-mips.org: Fix !defined(CONFIG_MIPS_PGD_C0_CONTEXT) build error.]
Signed-off-by: David Daney <david.daney@cavium.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2577/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions