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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03cb5a7d-a10a-91b0-9e10-6a1147e56963@gmail.com>
Date:   Thu, 29 Dec 2022 15:27:19 +0900
From:   Soichiro Ueda <the.latticeheart@...il.com>
To:     Liu Shixin <liushixin2@...wei.com>, mst@...hat.com,
        david@...hat.com, jasowang@...hat.com, akpm@...ux-foundation.org
Cc:     virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kalutes@...gle.com, mhiramat@...nel.org, cwd@...gle.com
Subject: Re: [PATCH] virtio_balloon: high order allocation

Hi, Shixin.

Thanks for checking the patch!

>> +			for (i = 0; i < num_pfns; i++) {
>> +				set_page_pfns(vb, vb->pfns + vb->num_pfns + i,
>> +					      nth_page(page, i));
>> +			}
> Since the interval of vb->num_pfns is VIRTIO_BALLOON_PAGES_PER_PAGE,
> it seems that the pfns[] should be vb->pfns + vb->num_pfns + i * VIRTIO_BALLOON_PAGES_PER_PAGE.
Definitely.
>> +			vb->num_pages +=
>> +				num_pfns * VIRTIO_BALLOON_PAGES_PER_PAGE;
>> +			if (!virtio_has_feature(
>> +				    vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM))
>> +				adjust_managed_page_count(page, -num_pfns);
> num_pfns is of the unsigned int type so need be to converted to long manually.

Oh, the second argument of adjust_managed_page_count is long type. So it 
needs casting as you say.

I'll fix these problems in the v2 patch.

Thank you,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ