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: <940e5d03-dc20-da0b-17e0-6f11cf480ec6@redhat.com>
Date:   Thu, 5 Dec 2019 11:13:11 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Igor Mammedov <imammedo@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Yumei Huang <yuhuang@...hat.com>, stable@...r.kernel.org,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>, Jiang Liu <liuj97@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH] virtio-balloon: fix managed page counts when migrating
 pages between zones

On 05.12.19 11:08, Igor Mammedov wrote:
> On Wed,  4 Dec 2019 21:48:07 +0100
> David Hildenbrand <david@...hat.com> wrote:
> 
>> In case we have to migrate a ballon page to a newpage of another zone, the
>> managed page count of both zones is wrong. Paired with memory offlining
>> (which will adjust the managed page count), we can trigger kernel crashes
>> and all kinds of different symptoms.
>>
>> One way to reproduce:
>> 1. Start a QEMU guest with 4GB, no NUMA
>> 2. Hotplug a 1GB DIMM and only the memory to ZONE_NORMAL
>                             ^^^^
> should it be "online" ?

Very right!
[...]

>>  	mutex_unlock(&vb->balloon_lock);
>>  
>> +	/* fixup the managed page count (esp. of the zone) */
>> +	if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) {
> what happens when balloon has the feature?

With that feature we don't touch the managed page counts at all (see the
other 2 adjust_managed_page_count() callers in this file).

> 
>> +		adjust_managed_page_count(page, 1);
>> +		adjust_managed_page_count(newpage, -1);
>> +	}
>> +
>>  	put_page(page); /* balloon reference */
>>  
>>  	return MIGRATEPAGE_SUCCESS;
> 

BTW, I posted a v2 just some minutes ago
(https://lkml.kernel.org/r/20191205092420.6934-1-david@redhat.com)

Thanks!

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ