lists.openwall.net   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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <70c0102ea4c18ecab426.1232727981@localhost.localdomain>
Date:	Fri, 23 Jan 2009 16:26:21 +0000
From:	Ian Campbell <ian.campbell@...rix.com>
To:	linux-kernel@...r.kernel.org
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>, Ingo Molnar <mingo@...e.hu>,
	"dan.magenheimer@...cle.com" <dan.magenheimer@...cle.com>,
	Xen-devel <xen-devel@...ts.xensource.com>,
	Stable Kernel <stable@...nel.org>
Subject: [PATCH] xen: handle highmem pages correctly when shrinking a domain

This commit causes a crash if the page being released is a highmem
page.

  commit 1058a75f07b9bb8323fb5197be5526220f8b75cf
  Author: Dan Magenheimer <dan.magenheimer@...cle.com>
  Date:   Thu Jan 22 14:36:08 2009 -0800

    xen: actually release memory when shrinking domain

If a page is highmem then there is no need to unmap it.

Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: dan.magenheimer@...cle.com <dan.magenheimer@...cle.com>
Cc: Xen-devel <xen-devel@...ts.xensource.com>
Cc: Stable Kernel <stable@...nel.org>
---
 drivers/xen/balloon.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff -r 7f26a03c3e02 -r 70c0102ea4c1 drivers/xen/balloon.c
--- a/drivers/xen/balloon.c	Fri Jan 23 14:14:59 2009 +0000
+++ b/drivers/xen/balloon.c	Fri Jan 23 16:24:09 2009 +0000
@@ -292,10 +292,13 @@
 
 		scrub_page(page);
 
-		ret = HYPERVISOR_update_va_mapping(
-			(unsigned long)__va(pfn << PAGE_SHIFT),
-			__pte_ma(0), 0);
-		BUG_ON(ret);
+		if (!PageHighMem(page)) {
+			ret = HYPERVISOR_update_va_mapping(
+				(unsigned long)__va(pfn << PAGE_SHIFT),
+				__pte_ma(0), 0);
+			BUG_ON(ret);
+                }
+
 	}
 
 	/* Ensure that ballooned highmem pages don't have kmaps. */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ