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] [day] [month] [year] [list]
Date:   Thu, 14 Mar 2019 15:16:37 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Juergen Gross <jgross@...e.com>,
        Julien Grall <julien.grall@....com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Matthew Wilcox <willy@...radead.org>
Cc:     k.khlebnikov@...sung.com,
        Stefano Stabellini <sstabellini@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        "VMware, Inc." <pv-drivers@...are.com>,
        osstest service owner <osstest-admin@...project.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-mm@...ck.org, Julien Freche <jfreche@...are.com>,
        Nadav Amit <namit@...are.com>, xen-devel@...ts.xenproject.org
Subject: Re: [Xen-devel] xen: Can't insert balloon page into VM userspace (WAS
 Re: [linux-linus bisection] complete test-arm64-arm64-xl-xsm)

On 14.03.19 15:15, Juergen Gross wrote:
> On 14/03/2019 15:12, Julien Grall wrote:
>> Hi,
>>
>> On 3/14/19 8:37 AM, Juergen Gross wrote:
>>> On 12/03/2019 20:46, David Hildenbrand wrote:
>>>> On 12.03.19 19:23, David Hildenbrand wrote:
>>>>
>>>> I guess something like this could do the trick if I understood it
>>>> correctly:
>>>>
>>>> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
>>>> index 39b229f9e256..d37dd5bb7a8f 100644
>>>> --- a/drivers/xen/balloon.c
>>>> +++ b/drivers/xen/balloon.c
>>>> @@ -604,6 +604,7 @@ int alloc_xenballooned_pages(int nr_pages, struct
>>>> page **pages)
>>>>          while (pgno < nr_pages) {
>>>>                  page = balloon_retrieve(true);
>>>>                  if (page) {
>>>> +                       __ClearPageOffline(page);
>>>>                          pages[pgno++] = page;
>>>>   #ifdef CONFIG_XEN_HAVE_PVMMU
>>>>                          /*
>>>> @@ -645,8 +646,10 @@ void free_xenballooned_pages(int nr_pages, struct
>>>> page **pages)
>>>>          mutex_lock(&balloon_mutex);
>>>>
>>>>          for (i = 0; i < nr_pages; i++) {
>>>> -               if (pages[i])
>>>> +               if (pages[i]) {
>>>> +                       __SetPageOffline(pages[i]);
>>>>                          balloon_append(pages[i]);
>>>> +               }
>>>>          }
>>>>
>>>>          balloon_stats.target_unpopulated -= nr_pages;
>>>>
>>>>
>>>> At least this way, the pages allocated (and thus eventually mapped to
>>>> user space) would not be marked, but the other ones would remain marked
>>>> and could be excluded by makedumptool.
>>>>
>>>
>>> I think this patch should do the trick. Julien, could you give it a
>>> try? On x86 I can't reproduce your problem easily as dom0 is PV with
>>> plenty of unpopulated pages for grant memory not suffering from
>>> missing "offline" bit.
>>
>> Sure. I managed to get the console working with the patch suggested by
>> David. Feel free to add my tested-by if when you resend it as is.
> 
> David, could you please send a proper patch with your Sob?
> 

Yes, on it :)

Cheers!

> 
> Juergen
> 


-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ