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: <b9046572-8802-b213-a74f-68f58a58ae6a@gmail.com>
Date:   Thu, 31 May 2018 10:51:45 +0300
From:   Oleksandr Andrushchenko <andr2000@...il.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.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,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [PATCH 2/8] xen/balloon: Move common memory reservation routines
 to a module

On 05/30/2018 10:24 PM, Boris Ostrovsky wrote:
> On 05/30/2018 01:46 PM, Oleksandr Andrushchenko wrote:
>> On 05/30/2018 06:54 PM, Boris Ostrovsky wrote:
>>>
>>> BTW, I also think you can further simplify
>>> xenmem_reservation_va_mapping_* routines by bailing out right away if
>>> xen_feature(XENFEAT_auto_translated_physmap). In fact, you might even
>>> make them inlines, along the lines of
>>>
>>> inline void xenmem_reservation_va_mapping_reset(unsigned long count,
>>>                       struct page **pages)
>>> {
>>> #ifdef CONFIG_XEN_HAVE_PVMMU
>>>      if (!xen_feature(XENFEAT_auto_translated_physmap))
>>>          __xenmem_reservation_va_mapping_reset(...)
>>> #endif
>>> }
>> How about:
>>
>> #ifdef CONFIG_XEN_HAVE_PVMMU
>> static inline __xenmem_reservation_va_mapping_reset(struct page *page)
>> {
>> [...]
>> }
>> #endif
>>
>> and
>>
>> void xenmem_reservation_va_mapping_reset(unsigned long count,
>>                       struct page **pages)
>> {
>> #ifdef CONFIG_XEN_HAVE_PVMMU
>>      if (!xen_feature(XENFEAT_auto_translated_physmap)) {
>>          int i;
>>
>>          for (i = 0; i < count; i++)
>>              __xenmem_reservation_va_mapping_reset(pages[i]);
>>      }
>> #endif
>> }
>>
>> This way I can use __xenmem_reservation_va_mapping_reset(page);
>> instead of xenmem_reservation_va_mapping_reset(1, &page);
>
> Sure, this also works.
Could you please take look at the patch attached if this is what we want?
> -boris
>
Thank you,
Oleksandr

View attachment "0001-xen-balloon-Share-common-memory-reservation-routines.patch" of type "text/x-patch" (10965 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ