summaryrefslogtreecommitdiffstats
path: root/scripts/checkkconfigsymbols.py
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@arm.com>2018-11-02 08:53:22 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-12-19 17:47:52 +0000
commit6794ad5443a2118243e13879f94228524a1a2b92 (patch)
treee9f966b148af35f7c40688b08d35ef0e49178425 /scripts/checkkconfigsymbols.py
parent107352a24900fb458152b92a4e72fbdc83fd5510 (diff)
downloadlinux-6794ad5443a2118243e13879f94228524a1a2b92.tar.bz2
KVM: arm/arm64: Fix unintended stage 2 PMD mappings
There are two things we need to take care of when we create block mappings in the stage 2 page tables: (1) The alignment within a PMD between the host address range and the guest IPA range must be the same, since otherwise we end up mapping pages with the wrong offset. (2) The head and tail of a memory slot may not cover a full block size, and we have to take care to not map those with block descriptors, since we could expose memory to the guest that the host did not intend to expose. So far, we have been taking care of (1), but not (2), and our commentary describing (1) was somewhat confusing. This commit attempts to factor out the checks of both into a common function, and if we don't pass the check, we won't attempt any PMD mappings for neither hugetlbfs nor THP. Note that we used to only check the alignment for THP, not for hugetlbfs, but as far as I can tell the check needs to be applied to both scenarios. Cc: Ralph Palutke <ralph.palutke@fau.de> Cc: Lukas Braun <koomi@moshbit.net> Reported-by: Lukas Braun <koomi@moshbit.net> Signed-off-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'scripts/checkkconfigsymbols.py')
0 files changed, 0 insertions, 0 deletions