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] [day] [month] [year] [list]
Date: Tue, 26 Mar 2024 22:49:11 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, Stephen Rothwell <sfr@...b.auug.org.au>, 
	Kent Overstreet <kent.overstreet@...ux.dev>, Vlastimil Babka <vbabka@...e.cz>, 
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: Re: [PATCH] mm/slab: fix kcalloc() kernel-doc warnings

On Tue, Mar 26, 2024 at 9:46 PM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> Fix the parameter names for kcalloc() in slab.h to prevent kernel-doc
> warnings:
>
> include/linux/slab.h:730: warning: Function parameter or struct member '_n' not described in 'kcalloc'
> include/linux/slab.h:730: warning: Function parameter or struct member '_size' not described in 'kcalloc'
> include/linux/slab.h:730: warning: Function parameter or struct member '_flags' not described in 'kcalloc'
> include/linux/slab.h:730: warning: Excess function parameter 'n' description in 'kcalloc'
> include/linux/slab.h:730: warning: Excess function parameter 'size' description in 'kcalloc'
> include/linux/slab.h:730: warning: Excess function parameter 'flags' description in 'kcalloc'
>
> Fixes: bc7b83f5e4bf ("mm/slab: enable slab allocation tagging for kmalloc and friends")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Link: https://lore.kernel.org/linux-next/20240325123603.1bdd6588@canb.auug.org.au/
> Cc: Suren Baghdasaryan <surenb@...gle.com>
> Cc: Kent Overstreet <kent.overstreet@...ux.dev>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-mm@...ck.org

Doh! I noticed these warnings but completely forgot to fix them in my
fixup patchset :(
Thanks for the fix!

Tested-by: Suren Baghdasaryan <surenb@...gle.com>


> ---
>  include/linux/slab.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -- a/include/linux/slab.h b/include/linux/slab.h
> --- a/include/linux/slab.h
> +++ b/include/linux/slab.h
> @@ -727,7 +727,7 @@ static inline __realloc_size(2, 3) void
>   * @size: element size.
>   * @flags: the type of memory to allocate (see kmalloc).
>   */
> -#define kcalloc(_n, _size, _flags)             kmalloc_array(_n, _size, (_flags) | __GFP_ZERO)
> +#define kcalloc(n, size, flags)                kmalloc_array(n, size, (flags) | __GFP_ZERO)
>
>  void *kmalloc_node_track_caller_noprof(size_t size, gfp_t flags, int node,
>                                   unsigned long caller) __alloc_size(1);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ