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: Thu, 14 Dec 2023 17:02:15 -0800
From: Kees Cook <keescook@...omium.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
	linux-doc@...r.kernel.org,
	Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH] scripts/kernel-doc: restore warning for Excess
 struct/union

On Wed, Dec 13, 2023 at 11:05:42PM -0800, Randy Dunlap wrote:
> (correcting Mauro's email address)
> 
> 
> On 12/13/23 23:02, Randy Dunlap wrote:
> > The warning for Excess struct or union member description was
> > removed when the $nested parameter of check_sections() was removed.
> > This causes some kernel-doc notation warnings to be missed.
> > 
> > Recently the kernel test robot somehow reported an Excess member. The
> > code in kernel-doc has not issued that warning since kernel v4.16, so I
> > don't know how the robot did it. (See the Link for the report.)
> > 
> >   drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs'
> > 
> > I patched that warning away even though I could not reproduce the
> > warning from kernel-doc. The warning should be issued for extraneous
> > struct member or union member description, so restore it.
> > 
> > Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter")
> > Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> > Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/
> > Cc: Mauro Carvalho Chehab <mchehab@...pensource.com>
> > Cc: Jonathan Corbet <corbet@....net>
> > Cc: linux-doc@...r.kernel.org
> > ---
> >  scripts/kernel-doc |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff -- a/scripts/kernel-doc b/scripts/kernel-doc
> > --- a/scripts/kernel-doc
> > +++ b/scripts/kernel-doc
> > @@ -1659,6 +1659,13 @@ sub check_sections($$$$$) {
> >  					"'$sects[$sx]' " .
> >  					"description in '$decl_name'\n");
> >  			}
> > +			elsif (($decl_type eq "struct") or
> > +		       	       ($decl_type eq "union")) {
> > +				emit_warning("${file}:$.",
> > +					"Excess $decl_type member " .
> > +					"'$sects[$sx]' " .
> > +					"description in '$decl_name'\n");
> > +			}
> >  		}
> >  	}
> >  }

Yes, please!

Reviewed-by: Kees Cook <keescook@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ