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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Jun 2018 09:50:52 +0300
From:   Oleksandr Andrushchenko <Oleksandr_Andrushchenko@...m.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Oleksandr Andrushchenko <andr2000@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
        jgross@...e.com, konrad.wilk@...cle.com
Cc:     daniel.vetter@...el.com, dongwon.kim@...el.com,
        matthew.d.roper@...el.com
Subject: Re: [PATCH v3 3/9] xen/balloon: Share common memory reservation
 routines

On 06/13/2018 04:07 AM, Boris Ostrovsky wrote:
>
>
> On 06/12/2018 09:41 AM, Oleksandr Andrushchenko wrote:
>
>
>
> One more thing: please add a comment here saying that frames array is 
> array of PFNs (in Xen granularity), which is what 
> XENMEM_populate_physmap requires. And remove (or update to name the 
> actual call you are making) the corresponding comment in 
> increase_reservation().
>
I will remove corresponding comments from the balloon's 
{increase|decrease}_reservation
and move those into xenmem_reservation{increase|decrease} where they 
belong now.
I will also put a comment close to xenmem_reservation{increase|decrease}:

/* @frames is an array of PFNs */
int xenmem_reservation_increase(int count, xen_pfn_t *frames)
{
     [...]
}

/* @frames is an array of GFNs */
int xenmem_reservation_decrease(int count, xen_pfn_t *frames)
{
     [...]
}
>
>> +
>> +int xenmem_reservation_increase(int count, xen_pfn_t *frames)
>> +{
>> +    struct xen_memory_reservation reservation = {
>> +        .address_bits = 0,
>> +        .extent_order = EXTENT_ORDER,
>> +        .domid        = DOMID_SELF
>> +    };
>> +
>> +    set_xen_guest_handle(reservation.extent_start, frames);
>> +    reservation.nr_extents = count;
>> +    return HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
>> +}
>> +EXPORT_SYMBOL_GPL(xenmem_reservation_increase);
>
>
> And similarly, here we are requesting GFNs, and update 
> decrease_reservation().
>
Please see above
>
> -boris
>
Thank you,
Oleksandr
>> +
>> +int xenmem_reservation_decrease(int count, xen_pfn_t *frames)
>> +{
>> +    struct xen_memory_reservation reservation = {
>> +        .address_bits = 0,
>> +        .extent_order = EXTENT_ORDER,
>> +        .domid        = DOMID_SELF
>> +    };
>> +
>> +    set_xen_guest_handle(reservation.extent_start, frames);
>> +    reservation.nr_extents = count;
>> +    return HYPERVISOR_memory_op(XENMEM_decrease_reservation, 
>> &reservation);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ