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: <6a108876-19b7-49d0-3de2-9e10f984736c@oracle.com>
Date:   Fri, 18 May 2018 18:04:07 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     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, matthew.d.roper@...el.com,
        dongwon.kim@...el.com,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

On 05/17/2018 04:26 AM, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>


A commit message would be useful.


>
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
>
>  	for (i = 0; i < nr_pages; i++) {
> -		page = alloc_page(gfp);
> -		if (page == NULL) {
> -			nr_pages = i;
> -			state = BP_EAGAIN;
> -			break;
> +		if (ext_pages) {
> +			page = ext_pages[i];
> +		} else {
> +			page = alloc_page(gfp);
> +			if (page == NULL) {
> +				nr_pages = i;
> +				state = BP_EAGAIN;
> +				break;
> +			}
>  		}
>  		scrub_page(page);
>  		list_add(&page->lru, &pages);
> @@ -529,7 +565,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
>  	i = 0;
>  	list_for_each_entry_safe(page, tmp, &pages, lru) {
>  		/* XENMEM_decrease_reservation requires a GFN */
> -		frame_list[i++] = xen_page_to_gfn(page);
> +		frames[i++] = xen_page_to_gfn(page);
>  
>  #ifdef CONFIG_XEN_HAVE_PVMMU
>  		/*
> @@ -552,18 +588,22 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
>  #endif
>  		list_del(&page->lru);
>  
> -		balloon_append(page);
> +		if (!ext_pages)
> +			balloon_append(page);


So what you are proposing is not really ballooning. You are just
piggybacking on existing interfaces, aren't you?

-boris


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ