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: <20200922143506.GA26664@lst.de>
Date:   Tue, 22 Sep 2020 16:35:06 +0200
From:   Christoph Hellwig <hch@....de>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, hch@....de,
        Uladzislau Rezki <urezki@...il.com>
Subject: Re: [PATCH 2/2] vfree: Update documentation

On Mon, Sep 21, 2020 at 11:46:28PM +0100, Matthew Wilcox (Oracle) wrote:
>  * Document that you can call vfree() on an address returned from vmap()
>  * Remove the note about the minimum size -- the minimum size of a vmalloc
>    allocation is one page
>  * Add a Context: section
>  * Fix capitalisation
>  * Reword the prohibition on calling from NMI context to avoid a double
>    negative
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
>  mm/vmalloc.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 3893fc8915c4..942a44bdeec6 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2313,20 +2313,20 @@ static void __vfree(const void *addr)
>  }
>  
>  /**
> - * vfree - release memory allocated by vmalloc()
> - * @addr:  memory base address
> + * vfree - Release memory allocated by vmalloc()
> + * @addr:  Memory base address
>   *
>   * Free the virtually continuous memory area starting at @addr, as
> + * obtained from vmalloc(), vmalloc_32() or __vmalloc().  If called
> + * on an @addr obtained from vmap(), it will put one refcount on each
> + * mapped page, which will free the page if this is the last refcount
> + * on the page.  If @addr is NULL, no operation is performed.

This reads a little confusing.  First it only allows vmalloc* and
then it mentions vmap in the next sentence.  And what about
vmalloc_32_user, vzalloc_node, vmalloc_node, vmalloc_user, vzalloc and
__vmalloc_node?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ