diff options
author | Mark Rutland <mark.rutland@arm.com> | 2014-12-17 17:57:38 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-01-07 20:33:33 +0000 |
commit | cca547e9aa3a6d561fe65e75a4bb2c18d80c541a (patch) | |
tree | abe9fe828d06386be6df66bc1eefe31d9d5771d7 /arch/arm/mm/fsr-3level.c | |
parent | 841ee230253f2ceb647f89a218e6e0575d961435 (diff) | |
download | linux-cca547e9aa3a6d561fe65e75a4bb2c18d80c541a.tar.gz linux-cca547e9aa3a6d561fe65e75a4bb2c18d80c541a.tar.bz2 linux-cca547e9aa3a6d561fe65e75a4bb2c18d80c541a.zip |
ARM: 8249/1: mm: dump: don't skip regions
Currently the arm page table dumping code starts dumping page tables
from USER_PGTABLES_CEILING. This is unnecessary for skipping any entries
related to userspace as the swapper_pg_dir does not contain such
entries, and results in a couple of unfortuante side effects.
Firstly, any kernel mappings which might exist below
USER_PGTABLES_CEILING will not be accounted in the dump output. This
masks any entries erroneously created below this address.
Secondly, if the final page table entry walked is part of a valid
mapping the page table dumping code will not log the region this entry
is part of, as the final note_page call in walk_pgd will trigger an
early return when 0 < USER_PGTABLES_CEILING. Luckily this isn't seen on
contemporary systems as they typically don't have enough RAM to extend
the linear mapping right to the end of the address space.
Due to the way addr is constructed in the walk_* functions, it can never
be less than USER_PGTABLES_CEILING when walking the page tables, so it
is not necessary to avoid dereferencing invalid table addresses. The
existing checks for st->current_prot and st->marker[1].start_address are
sufficient to ensure we will not print and/or dereference garbage when
trying to log information.
This patch removes both problematic uses of USER_PGTABLES_CEILING from
the arm page table dumping code, preventing both of these issues. We
will now report any low mappings, and the final note_page call will not
return early, ensuring all regions are logged.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/fsr-3level.c')
0 files changed, 0 insertions, 0 deletions