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: <87r0eusgl9.fsf@meer.lwn.net>
Date: Wed, 24 Apr 2024 13:31:14 -0600
From: Jonathan Corbet <corbet@....net>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: Kees Cook <keescook@...omium.org>, Alexander Lobakin
 <aleksander.lobakin@...el.com>, Jakub Kicinski <kuba@...nel.org>, Dan
 Williams <dan.j.williams@...el.com>, "Gustavo A. R. Silva"
 <gustavoars@...nel.org>, Keith Packard <keithp@...thp.com>,
 nex.sw.ncis.osdt.itp.upstreaming@...el.com, linux-doc@...r.kernel.org,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel-doc: fix struct_group_tagged() parsing

Alexander Lobakin <aleksander.lobakin@...el.com> writes:

> From: Kees Cook <keescook@...omium.org>
>
> kernel-doc emits a warning on struct_group_tagged() if you describe your
> struct group member:
>
> include/net/libeth/rx.h:69: warning: Excess struct member 'fp' description in 'libeth_fq'
>
> The code:
>
> /**
>  * struct libeth_fq - structure representing a buffer queue
>  * @fp: hotpath part of the structure
>  * @pp: &page_pool for buffer management
> [...]
>  */
> struct libeth_fq {
> 	struct_group_tagged(libeth_fq_fp, fp,
> 		struct page_pool	*pp;
> [...]
> 	);
>
> When a struct_group_tagged() is encountered, we need to build a
> `struct TAG NAME;` from it, so that it will be treated as a valid
> embedded struct.
> Decouple the regex and do the replacement there. As far as I can see,
> this doesn't produce any new warnings on the current mainline tree.
>
> Reported-by: Jakub Kicinski <kuba@...nel.org>
> Closes: https://lore.kernel.org/netdev/20240405212513.0d189968@kernel.org
> Fixes: 50d7bd38c3aa ("stddef: Introduce struct_group() helper macro")
> Signed-off-by: Kees Cook <keescook@...omium.org>
> Co-developed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> ---
>  scripts/kernel-doc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

So, in docs-next, applying this *adds* two warnings:

> ./include/net/page_pool/types.h:77: warning: Function parameter or struct member 'fast' not described in 'page_pool_params'
> ./include/net/page_pool/types.h:77: warning: Function parameter or struct member 'slow' not described in 'page_pool_params'

In truth, the warnings look correct.  I guess I'll leave this applied,
but perhaps a fix for the warnings should go into the net tree?

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ