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

Re: [PATCH] modify acquire_domstatic_pages to take an unsigned int size parameter

  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 17 Sep 2021 08:51:27 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K9l25Mm1Xmd8Y5fKa3uYtWfNkiU7OCS2lWznkeIB720=; b=JElDhx5mDBM7tHytj4PJnqkHyMHkgVow3fPboaE0XQnGa9k/Na+ohxtFqw2OiHTBhcvhZZii4f/U5imsZMQ0QEQwG2IkYpiz9nkhboTYFnhsOdi2UVeKQwMB6xotObGOhapkR+DHKKHJqs7sRDJa7LPBfoN/etsse47jB+QilmtYyi6Lo6FSIM7sboU/1nGWZqNO5H+VIPNxcU2PCvs3iSuRAx9YSjTdX9Nl2EbCULoWp5RTBFmTiKH8h/H7R82WFRUUfvSxg+OP5LWhccbebfBbFThUtq7JhwMzUr5K40ZdPWcxKeIrE855V+L3heXKGB3zbPC/qvpRp3gqr5DwRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZRMVErH8R/MHI9FykEhHGlAOwfJbpT8u/+qepnZ3q8hjgasuuK7pfxsz46DlVG/ezLBIz5KQZWhdOH3PAvmBh0SbJbNsyYOregH5MVrMeYepyySB9jjd2w83lkgFsvb4A56Zc9rZwANnI8tBH/9XZqFtWOSl1whAUCwnBhKwjQVLBM6HVnHP5t6XpcqyWNQmyigcKk9iGqZENkM+2ofysOQhmujz+sgJPs8Cj5r1wJrXeKFkuc0Y2Wg2+AhS5ziUXg/FSeb10JSGrqL4O0SjKCPwcnJAQZ4p3dvOSKfoPcL78KaYdItqPzzZ6IbCHc1bEAUgZHLvr1bz4GWNGI+X7g==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: penny.zheng@xxxxxxx, Bertrand.Marquis@xxxxxxx, Wei.Chen@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, julien@xxxxxxx
  • Delivery-date: Fri, 17 Sep 2021 06:51:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.09.2021 22:47, Stefano Stabellini wrote:
> acquire_domstatic_pages currently takes an unsigned long nr_mfns
> parameter, but actually it cannot handle anything larger than an
> unsigned int nr_mfns. That's because acquire_domstatic_pages is based on
> assign_pages which also takes an unsigned int nr parameter.
> So modify the nr_mfns parameter of acquire_domstatic_pages to be
> unsigned int.
> There is only one caller in
> xen/arch/arm/domain_build.c:allocate_static_memory. Check that the value
> to be passed to acquire_domstatic_pages is no larger than UINT_MAX. If
> it is, print an error and goto fail.
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> ---
> Jan, I took your suggestion of moving the check closer to where the
> value is read from DT. At that point I also took the opportunity to
> change acquire_domstatic_pages to take an unsigned int parameter
> instead of unsigned long.

Fine by me; fwiw
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>




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