[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 3/4] Revert "xen/balloon: Fix crash when ballooning on x86 32 bit PAE"


  • To: <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Mon, 27 Jul 2020 11:13:41 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 27 Jul 2020 09:15:21 +0000
  • Ironport-sdr: CaWT5LIbKdSm6bglJh6wY7Rm9pQCl8a6jhy9q8a+NizdhgIBcUgMJIVzAoXIXdLIYwEyNXjysu jSQTvNe1bbYVQi7e3KcyTmEZFi3CsDbUMupe+asAciCVSRx7faRfhMETYPniYTT+tB4f4E/ny3 8Z9NHVXMK/B/ZfpG36jfHVTra6T4EWIxWxLV5SwAHLLEW5I157sJPAJSregsF8/dAdp6FxmzH3 k9ZqiAppaKjGEJvBHAgFr+VIUtwQG6LUpdZxvOwrLfYO2QKjsRrmZ1Z54Lp0a4thonvBtWrRo4 ohI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This reverts commit dfd74a1edfaba5864276a2859190a8d242d18952.

This has been fixed by commit dca4436d1cf9e0d237c which added the out
of bounds check to __add_memory, so that trying to add blocks past
MAX_PHYSMEM_BITS will fail.

Note the check in the Xen balloon driver was bogus anyway, as it
checked the start address of the resource, but it should instead test
the end address to assert the whole resource falls below
MAX_PHYSMEM_BITS.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
---
 drivers/xen/balloon.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 292413b27575..b1d8b028bf80 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -266,20 +266,6 @@ static struct resource 
*additional_memory_resource(phys_addr_t size)
                return NULL;
        }
 
-#ifdef CONFIG_SPARSEMEM
-       {
-               unsigned long limit = 1UL << (MAX_PHYSMEM_BITS - PAGE_SHIFT);
-               unsigned long pfn = res->start >> PAGE_SHIFT;
-
-               if (pfn > limit) {
-                       pr_err("New System RAM resource outside addressable RAM 
(%lu > %lu)\n",
-                              pfn, limit);
-                       release_memory_resource(res);
-                       return NULL;
-               }
-       }
-#endif
-
        return res;
 }
 
-- 
2.27.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.