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]
Date:   Wed, 12 Apr 2023 06:17:43 +0000
From:   zhao xinchao <ChrisXinchao@...look.com>
To:     Bagas Sanjaya <bagasdotme@...il.com>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "cl@...ux.com" <cl@...ux.com>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "penberg@...nel.org" <penberg@...nel.org>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "vbabka@...e.cz" <vbabka@...e.cz>
Subject: 答复: [PATCH v2] mm: Fixed incorrect comment for _kmem_cache_create function

I don't think kmem_cache_create is associated with __kmem_cache_create, 
__kmem_cache_create is not exported as an API, it is a function called internally by the kernel.
So the kernel documentation does not document this internal interface.

-----邮件原件-----
发件人: Bagas Sanjaya [mailto:bagasdotme@...il.com] 
发送时间: 2023年4月12日 11:40
收件人: zhaoxinchao <ChrisXinchao@...look.com>
抄送: akpm@...ux-foundation.org; cl@...ux.com; iamjoonsoo.kim@....com; linux-kernel@...r.kernel.org; linux-mm@...ck.org; penberg@...nel.org; rientjes@...gle.com; vbabka@...e.cz
主题: Re: [PATCH v2] mm: Fixed incorrect comment for _kmem_cache_create function

On 4/11/23 16:13, zhaoxinchao wrote:
> diff --git a/mm/slab.c b/mm/slab.c
> index edbe722fb..399daa4d0 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1893,7 +1893,12 @@ static bool set_on_slab_cache(struct kmem_cache *cachep,
>   * @cachep: cache management descriptor
>   * @flags: SLAB flags
>   *
> - * Returns a ptr to the cache on success, NULL on failure.
> + * Returns zero on success, nonzero on failure.
> + * This function has three return positions.
> + * In addition to successfully return 0, the
> + * first failed position will return - E2BIG,
> + * and the second position will return nonzero
> + * value for setup_cpu_cache function failure.
>   * Cannot be called within an int, but can be interrupted.
>   * The @ctor is run when new pages are allocated by the cache.
>   *

I don't see any visible changes in my htmldocs build (since the kernel-doc is for inline version of kmem_cache_create()).
You will also need to update kernel-doc comment for
kmem_cache_create_usercopy() and kmem_cache_create() in mm/slab_common.c. Since the latter function is actually a wrapper on the former, the return value description (Return: field) should be same on both.

Thanks.

--
An old man doll... just what I always wanted! - Clara

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ