[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17] tools/libxl: Correct error message units in libxl__domain_set_paging_mempool_size()
- To: Henry Wang <Henry.Wang@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Mon, 21 Nov 2022 10:50:07 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EVVapN5AyFBIbz8p+YHaAbuk84v6u4IHoGC2r3i8diI=; b=K6gUz4VcHOthYQm69t5W9Wx5EQjNEv09XOK6QX6yt7Zz93lnEnoVwEx4L5mHmiEh4/tkpzZnlT3JC778g32plQj6YQEsK5IFZ7TK+nCj1eiDxQsKUTH6GAhiNXtaR9FmSSTsfzXsb2Vo5JIVtAX0iD4V33l4IbUWfRHdfmgidydSR8UllvMhr4siqAk2VIeIdCTog8DqoxRzMoiCf/0hwM0iDhEO3I8vmPbBKQhRjYNzgmtE74boiD3KyBLQX/BPqTW24fIqv4FinHAhnZiH1haF2o2XxwquikjnlYyKkWdxHpZlhgGPYjyFAzQUBjc9PTiBdTZk+e9PA4i+SyZPYQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cq6NRp2ZcVtostVA6SCpynJPIrclFt2ZQUKHBB7NL6PuAMN37+RMsspFnVEGt7q0HUjsR8u70ylgWhhczHtl76tr1JyXGIeXHO8Czi5Lh0HybbTiVZpGxENHFQwMw22Vy1i3uxmvwe5ZClGihEcXJOz/mXOH1PwlfkjI+rdHNPTxnfQD6lyXZNxJgE/4ptKENvwy3EkO0TT3kzrpaFFRJo0pTccRu3ZH5L9OQ7CUZGHO/bNhGmhDOrmYKYVDOBC9h+NEB9ONUkYrqVCmpnM+kcdGmFSTPbcSgfypH2JNHtB+N+hyz+wABD99J3/k4snwq0wV6H46QF7y8RjAp9eZEw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 21 Nov 2022 10:50:23 +0000
- Ironport-data: A9a23:X+OSIK/+4Jk5dvqj7SizDrUDmX+TJUtcMsCJ2f8bNWPcYEJGY0x3n DdLCmmOMv/eNjekL4p1b4u1oE0DuMDRz9dgGVBoryg8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnPKoS5Aa2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklX8 /8hdSBKZSuz2cSqzuqbRrZOt+MKeZyD0IM34hmMzBn/JNN/GdXmfP+P4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWOilUpj9ABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTCN9MSezlraACbFu73DwKJAUcWH2AodK62k2RC89Zc kpOw397xUQ13AnxJjXnZDWYrXier1gjUtxfO+Qg7UeGza+8yxaUAC0IQyBMbPQitdQqXno62 1mRhdTrCDdz9rqPRhqgGqy8qDqzPW0QMjUEbCpdFQ8duYC7/8c0kw7FSctlHOitlNrpFDrsw jeM6i8jm7EUis1N3KK+lbzavw+RSlHyZlZdzm3qsqiNt2uVuKbNi1SU1GXm
- Ironport-hdrordr: A9a23:MnGa5a5T3M/Se8b9lwPXweCCI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc0AxhI03Jmbi7Scq9qeu1z+853WBjB8bZYOCAghrlEGgC1/qp/9SEIUHDH4FmpM BdmsRFaeEYSGIK9foSgzPIXOrIouP3lpxA7N22pxgCcegpUdAY0+4TMHf4LqQCfngjOXNPLu v42iMonVqdUEVSSv7+KmgOXuDFqdGOvJX6YSQeDxpixBiSgSiu4LvaFQHd+hsFSTtAzZor7G CAymXCl+SemsD+7iWZ+37Y7pxQltek4txfBPaUgsxQBiTwhh2ubIFBXaTHmDwuuumg5Hsjjd GJiRY9OMZY7W/XYwiO0FXQ8jil9Axrx27pyFeej3emi9f+XigGB81Igp8cWgfF6mI71esMk5 5j7ia8jd56HBnAlCPy65zjTBdxjHe5pnIkjKo6k2Ffa40Dc7VcxLZvvn+9Ua1wWR4S2rpXV9 WGP/usosq+tmnqNkwxi1MfhOBEmE5DRituDHJy4fB9mAIm4UyRh3FouPD32E1wtK7VAqM0md gteM5T5c5zZ95TYqRnCOgbR8yrTmTLXBLXKWqXZU/qDacdJhv22tfKCZgOlZaXkaYzve0PsY WEVEkduX85ekroB8HL1JpX8grVSGH4WTj20MlR65Vwp7W5HdPQQGa+YUFrl9Hlr+QUA8XdVf r2MJVKA+X7JW+rHYpSxQXxV5RbNHFbWswIvdQwXU6Iv6vwW8XXn/2edOyWKKvmED4iVG+6Cn wfXCLrLMEF9UyvUm+QummkZ5osQD2LwXtdKtmowwFI8vl9CmRliHlktX2poseWNDZFrqs6OE NjPbKPqNLImVWL
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHY+2+HxzzdtfVo7EqtEeJLb7BMnq5E7LOAgACNwgCAA7y1gA==
- Thread-topic: [PATCH for-4.17] tools/libxl: Correct error message units in libxl__domain_set_paging_mempool_size()
On 19/11/2022 01:45, Henry Wang wrote:
> Hi Anthony and Andrew,
>
>> -----Original Message-----
>> From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>> Subject: Re: [PATCH for-4.17] tools/libxl: Correct error message units in
>> libxl__domain_set_paging_mempool_size()
>>
>> On Fri, Nov 18, 2022 at 05:02:13PM +0000, Andrew Cooper wrote:
>>> diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c
>>> index b59bbe00bb30..68ad9763b6ba 100644
>>> --- a/tools/libs/light/libxl_dom.c
>>> +++ b/tools/libs/light/libxl_dom.c
>>> @@ -1459,7 +1459,8 @@ int libxl__domain_set_paging_mempool_size(
>>> int r = xc_set_paging_mempool_size(CTX->xch, domid, shadow_mem);
>>> if (r) {
>>> LOGED(ERROR, domid,
>>> - "Failed to set paging mempool size to %"PRIu64"kB",
>> shadow_mem);
>>> + "Failed to set paging mempool size to %lukB",
>>> + d_config->b_info.shadow_memkb);
>> Unless I miss read, `shadow_memkb` is also "uint64_t", so I'm pretty
>> sure the format doesn't need to be changed, and we should keep using
>> PRIu64.
> I did a grep in current code, and:
> In libs/light/libxl_types.idl, "shadow_memkb" is defined as MemKB, which
> is MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT", json_gen_fn =
> "libxl__uint64_gen_json")
> so yes it is 64bit indeed. Using PRIu64 seems correct.
It highlights that there's yet another overflow bug, pre-existing from
the old implementation.
~Andrew
|