From: Marc Zyngier <marc.zyngier@arm.com>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
Andre Przywara <Andre.Przywara@arm.com>,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: arm/arm64: Fix HYP unmapping going off limits
Date: Mon, 11 Dec 2017 09:19:42 +0000 [thread overview]
Message-ID: <61a6f0bd-cdfc-e569-6289-b969b80a1f2f@arm.com> (raw)
In-Reply-To: <20171211090520.GC910@cbox>
On 11/12/17 09:05, Christoffer Dall wrote:
> On Thu, Dec 07, 2017 at 11:45:45AM +0000, Marc Zyngier wrote:
>> When we unmap the HYP memory, we try to be clever and unmap one
>> PGD at a time. If we start with a non-PGD aligned address and try
>> to unmap a whole PGD, things go horribly wrong in unmap_hyp_range
>> (addr and end can never match, and it all goes really badly as we
>> keep incrementing pgd and parse random memory as page tables...).
>>
>> The obvious fix is to let unmap_hyp_range do what it does best,
>> which is to iterate over a range.
>
> Would you mind terribly if I add the following to the commit message?
>
> The size of the linear mapping, which begins at PAGE_OFFSET, can be
> easily calculated by subtracting PAGE_OFFSET form high_memory, because
> high_memory is defined as the linear map address of the last byte of
> DRAM, plus one.
>
> The size of the vmalloc region is given trivially by VMALLOC_END -
> VMALLOC_START.
Please do!
> Otherwise:
>
> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Thanks,
M.
--
Jazz is not dead. It just smells funny...
prev parent reply other threads:[~2017-12-11 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 11:45 [PATCH] KVM: arm/arm64: Fix HYP unmapping going off limits Marc Zyngier
2017-12-07 15:57 ` Andre Przywara
2017-12-11 9:05 ` Christoffer Dall
2017-12-11 9:19 ` Marc Zyngier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61a6f0bd-cdfc-e569-6289-b969b80a1f2f@arm.com \
--to=marc.zyngier@arm.com \
--cc=Andre.Przywara@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox