xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] xen: fix upper bound of pmd loop in xen_cleanhighmap()
       [not found] <1466658747-1623-1-git-send-email-jgross@suse.com>
@ 2016-06-23  9:56 ` David Vrabel
  0 siblings, 0 replies; 2+ messages in thread
From: David Vrabel @ 2016-06-23  9:56 UTC (permalink / raw)
  To: Juergen Gross, xen-devel, linux-kernel
  Cc: boris.ostrovsky, torvalds, david.vrabel

On 23/06/16 06:12, Juergen Gross wrote:
> xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper
> bound of the loop setting non-kernel-image entries to zero should not
> exceed the size of level2_kernel_pgt.

Applied to for-linus-4.7b, thanks.

David

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] xen: fix upper bound of pmd loop in xen_cleanhighmap()
@ 2016-06-23  5:12 Juergen Gross
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Gross @ 2016-06-23  5:12 UTC (permalink / raw)
  To: xen-devel, linux-kernel
  Cc: Juergen Gross, boris.ostrovsky, torvalds, david.vrabel

xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper
bound of the loop setting non-kernel-image entries to zero should not
exceed the size of level2_kernel_pgt.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 arch/x86/xen/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 478a2de..2693b7e 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1113,7 +1113,7 @@ static void __init xen_cleanhighmap(unsigned long vaddr,
 
 	/* NOTE: The loop is more greedy than the cleanup_highmap variant.
 	 * We include the PMD passed in on _both_ boundaries. */
-	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PAGE_SIZE));
+	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PTRS_PER_PMD));
 			pmd++, vaddr += PMD_SIZE) {
 		if (pmd_none(*pmd))
 			continue;
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-23  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1466658747-1623-1-git-send-email-jgross@suse.com>
2016-06-23  9:56 ` [PATCH] xen: fix upper bound of pmd loop in xen_cleanhighmap() David Vrabel
2016-06-23  5:12 Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).