lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 28 Feb 2019 15:14:36 +0000
From:   Will Deacon <>
To:     Sasha Levin <>
Subject: Re: [PATCH AUTOSEL 4.20 60/81] arm64: ptdump: Don't iterate kernel
 page tables using PTRS_PER_PXX

On Thu, Feb 28, 2019 at 10:07:52AM -0500, Sasha Levin wrote:
> From: Will Deacon <>
> [ Upstream commit d23c808c6fc6132e812690648e14c0d6b0cbe273 ]
> When 52-bit virtual addressing is enabled for userspace
> (CONFIG_ARM64_USER_VA_BITS_52=y), the kernel continues to utilise 48-bit
> virtual addressing in TTBR1. Consequently, PTRS_PER_PGD reflects the
> larger page table size for userspace and the pgd pointer for kernel page
> tables is offset before being written to TTBR1.
> This means that we can't use PTRS_PER_PGD to iterate over kernel page
> tables unless we apply the same offset, which is fiddly to get right and
> leads to some non-idiomatic walking code. Instead, just follow the usual
> pattern when walking page tables by using a while loop driven by
> pXd_offset() and pXd_addr_end().
> Reported-by: Qian Cai <>
> Tested-by: Qian Cai <>
> Acked-by: Steve Capper <>
> Tested-by: Steve Capper <>
> Signed-off-by: Will Deacon <>
> Signed-off-by: Sasha Levin <>
> ---
>  arch/arm64/mm/dump.c | 59 ++++++++++++++++++++++----------------------
>  1 file changed, 29 insertions(+), 30 deletions(-)

4.20 doesn't support 52-bit VAs, so this isn't needed there afaict (and is
why I didn't tag the commit for stable in the first place).


Powered by blists - more mailing lists