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: <52ab5f00-c59b-9cfa-3837-10c1391fea33@redhat.com>
Date:   Mon, 7 Dec 2020 11:55:30 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Stefano Garzarella <sgarzare@...hat.com>,
        virtualization@...ts.linux-foundation.org
Cc:     Stefan Hajnoczi <stefanha@...hat.com>,
        "Michael S. Tsirkin" <mst@...hat.com>, Oren Duer <oren@...dia.com>,
        Laurent Vivier <lvivier@...hat.com>,
        linux-kernel@...r.kernel.org, Max Gurtovoy <mgurtovoy@...dia.com>,
        Shahaf Shuler <shahafs@...dia.com>, Eli Cohen <elic@...dia.com>
Subject: Re: [PATCH v3 04/19] vhost/iotlb: add VHOST_IOTLB_UNLIMITED macro


On 2020/12/4 上午1:04, Stefano Garzarella wrote:
> It's possible to allocate an unlimited IOTLB calling
> vhost_iotlb_alloc() with 'limit' = 0.
>
> Add a new macro (VHOST_IOTLB_UNLIMITED) for this case and document
> it in the vhost_iotlb_alloc() documentation block.
>
> Suggested-by: Jason Wang <jasowang@...hat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>


Acked-by: Jason Wang <jasowang@...hat.com>


> ---
>   include/linux/vhost_iotlb.h | 2 ++
>   drivers/vhost/iotlb.c       | 3 ++-
>   2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/vhost_iotlb.h b/include/linux/vhost_iotlb.h
> index 6b09b786a762..47019f97f795 100644
> --- a/include/linux/vhost_iotlb.h
> +++ b/include/linux/vhost_iotlb.h
> @@ -4,6 +4,8 @@
>   
>   #include <linux/interval_tree_generic.h>
>   
> +#define VHOST_IOTLB_UNLIMITED 0
> +
>   struct vhost_iotlb_map {
>   	struct rb_node rb;
>   	struct list_head link;
> diff --git a/drivers/vhost/iotlb.c b/drivers/vhost/iotlb.c
> index 0fd3f87e913c..80fdde78ee5a 100644
> --- a/drivers/vhost/iotlb.c
> +++ b/drivers/vhost/iotlb.c
> @@ -100,7 +100,8 @@ EXPORT_SYMBOL_GPL(vhost_iotlb_del_range);
>   
>   /**
>    * vhost_iotlb_alloc - add a new vhost IOTLB
> - * @limit: maximum number of IOTLB entries
> + * @limit: maximum number of IOTLB entries (use VHOST_IOTLB_UNLIMITED for an
> + *         unlimited IOTLB)
>    * @flags: VHOST_IOTLB_FLAG_XXX
>    *
>    * Returns an error is memory allocation fails

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ