linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'
@ 2023-12-14 20:53 kernel test robot
  2023-12-14 21:50 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-12-14 20:53 UTC (permalink / raw)
  To: Kees Cook
  Cc: oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Gustavo A. R. Silva,
	Peter Oberparleiter

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
commit: fbd126f5a658b92c7f6af986a6d89cf5e5693268 gcov: annotate struct gcov_iterator with __counted_by
date:   8 weeks ago
config: i386-buildonly-randconfig-001-20231214 (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312150432.oBngC94A-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'


vim +103 kernel/gcov/fs.c

7a1d55b987dfcb Johannes Berg 2021-05-06   90  
7a1d55b987dfcb Johannes Berg 2021-05-06   91  /**
7a1d55b987dfcb Johannes Berg 2021-05-06   92   * struct gcov_iterator - specifies current file position in logical records
7a1d55b987dfcb Johannes Berg 2021-05-06   93   * @info: associated profiling data
7a1d55b987dfcb Johannes Berg 2021-05-06   94   * @buffer: buffer containing file data
7a1d55b987dfcb Johannes Berg 2021-05-06   95   * @size: size of buffer
7a1d55b987dfcb Johannes Berg 2021-05-06   96   * @pos: current position in file
7a1d55b987dfcb Johannes Berg 2021-05-06   97   */
7a1d55b987dfcb Johannes Berg 2021-05-06   98  struct gcov_iterator {
7a1d55b987dfcb Johannes Berg 2021-05-06   99  	struct gcov_info *info;
7a1d55b987dfcb Johannes Berg 2021-05-06  100  	size_t size;
7a1d55b987dfcb Johannes Berg 2021-05-06  101  	loff_t pos;
fbd126f5a658b9 Kees Cook     2023-09-22  102  	char buffer[] __counted_by(size);
7a1d55b987dfcb Johannes Berg 2021-05-06 @103  };
7a1d55b987dfcb Johannes Berg 2021-05-06  104  

:::::: The code at line 103 was first introduced by commit
:::::: 7a1d55b987dfcbddecdb67eecc76fe555d4348ba gcov: combine common code

:::::: TO: Johannes Berg <johannes.berg@intel.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'
  2023-12-14 20:53 kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator' kernel test robot
@ 2023-12-14 21:50 ` Kees Cook
  2023-12-15  1:10   ` Philip Li
  0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2023-12-14 21:50 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Gustavo A. R. Silva,
	Peter Oberparleiter, linux-doc, linux-hardening

On Fri, Dec 15, 2023 at 04:53:19AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
> commit: fbd126f5a658b92c7f6af986a6d89cf5e5693268 gcov: annotate struct gcov_iterator with __counted_by
> date:   8 weeks ago
> config: i386-buildonly-randconfig-001-20231214 (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202312150432.oBngC94A-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
> >> kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'
> 
> 
> vim +103 kernel/gcov/fs.c
> 
> 7a1d55b987dfcb Johannes Berg 2021-05-06   90  
> 7a1d55b987dfcb Johannes Berg 2021-05-06   91  /**
> 7a1d55b987dfcb Johannes Berg 2021-05-06   92   * struct gcov_iterator - specifies current file position in logical records
> 7a1d55b987dfcb Johannes Berg 2021-05-06   93   * @info: associated profiling data
> 7a1d55b987dfcb Johannes Berg 2021-05-06   94   * @buffer: buffer containing file data
> 7a1d55b987dfcb Johannes Berg 2021-05-06   95   * @size: size of buffer
> 7a1d55b987dfcb Johannes Berg 2021-05-06   96   * @pos: current position in file
> 7a1d55b987dfcb Johannes Berg 2021-05-06   97   */
> 7a1d55b987dfcb Johannes Berg 2021-05-06   98  struct gcov_iterator {
> 7a1d55b987dfcb Johannes Berg 2021-05-06   99  	struct gcov_info *info;
> 7a1d55b987dfcb Johannes Berg 2021-05-06  100  	size_t size;
> 7a1d55b987dfcb Johannes Berg 2021-05-06  101  	loff_t pos;
> fbd126f5a658b9 Kees Cook     2023-09-22  102  	char buffer[] __counted_by(size);
> 7a1d55b987dfcb Johannes Berg 2021-05-06 @103  };
> 7a1d55b987dfcb Johannes Berg 2021-05-06  104  

It looks like whatever produces that error is not parsing attributes
correctly. I suspect this is the "htmldocs" target and "__counted_by" is
missing from Documentation/conf.py. I'll investigate...

-- 
Kees Cook


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'
  2023-12-14 21:50 ` Kees Cook
@ 2023-12-15  1:10   ` Philip Li
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Li @ 2023-12-15  1:10 UTC (permalink / raw)
  To: Kees Cook
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Gustavo A. R. Silva,
	Peter Oberparleiter, linux-doc, linux-hardening

On Thu, Dec 14, 2023 at 01:50:05PM -0800, Kees Cook wrote:
> On Fri, Dec 15, 2023 at 04:53:19AM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
> > commit: fbd126f5a658b92c7f6af986a6d89cf5e5693268 gcov: annotate struct gcov_iterator with __counted_by
> > date:   8 weeks ago
> > config: i386-buildonly-randconfig-001-20231214 (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/config)
> > compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202312150432.oBngC94A-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator'
> > 
> > 
> > vim +103 kernel/gcov/fs.c
> > 
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   90  
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   91  /**
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   92   * struct gcov_iterator - specifies current file position in logical records
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   93   * @info: associated profiling data
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   94   * @buffer: buffer containing file data
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   95   * @size: size of buffer
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   96   * @pos: current position in file
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   97   */
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   98  struct gcov_iterator {
> > 7a1d55b987dfcb Johannes Berg 2021-05-06   99  	struct gcov_info *info;
> > 7a1d55b987dfcb Johannes Berg 2021-05-06  100  	size_t size;
> > 7a1d55b987dfcb Johannes Berg 2021-05-06  101  	loff_t pos;
> > fbd126f5a658b9 Kees Cook     2023-09-22  102  	char buffer[] __counted_by(size);
> > 7a1d55b987dfcb Johannes Berg 2021-05-06 @103  };
> > 7a1d55b987dfcb Johannes Berg 2021-05-06  104  
> 
> It looks like whatever produces that error is not parsing attributes
> correctly. I suspect this is the "htmldocs" target and "__counted_by" is
> missing from Documentation/conf.py. I'll investigate...

This is triggered by W=1 build

        make W=1 O=build_dir ARCH=i386 olddefconfig
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/gcov/

The detail step is at [1], hope it can help reproduce the issue

[1] https://download.01.org/0day-ci/archive/20231215/202312150432.oBngC94A-lkp@intel.com/reproduce

> 
> -- 
> Kees Cook
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-15  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 20:53 kernel/gcov/fs.c:103: warning: Excess struct member 'buffer' description in 'gcov_iterator' kernel test robot
2023-12-14 21:50 ` Kees Cook
2023-12-15  1:10   ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox