]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix CONFIG_DEBUG_WX address reporting
authorMark Rutland <mark.rutland@arm.com>
Wed, 13 Dec 2017 11:45:42 +0000 (11:45 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 14 Dec 2017 10:18:23 +0000 (10:18 +0000)
commit7cf68b655e84235efedc692d8abb1193bf99529c
tree3358dfba081ea3db3c807a7565bfb26ce836c95e
parent7b44063f66a4693e06bb5d5a777feb32207acd3d
arm64: fix CONFIG_DEBUG_WX address reporting

In ptdump_check_wx(), we pass walk_pgd() a start address of 0 (rather
than VA_START) for the init_mm. This means that any reported W&X
addresses are offset by VA_START, which is clearly wrong and can make
them appear like userspace addresses.

Fix this by telling the ptdump code that we're walking init_mm starting
at VA_START. We don't need to update the addr_markers, since these are
still valid bounds regardless.

Cc: <stable@vger.kernel.org>
Fixes: cecd453a8a57 ("arm64: dump: Add checking for writable and exectuable pages")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>
Reported-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/dump.c