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>] [day] [month] [year] [list]
Message-ID: <202111110045.DsNsKG7H-lkp@intel.com>
Date:   Thu, 11 Nov 2021 00:46:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>
Subject: kernel/time/clocksource.c:1053:9: warning: no previous prototype for
 'sysfs_get_uname'

Hi Arnd,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 686092e7daaa9f43396c57ea0044799e47f0d9da parisc: use legacy_timer_tick
date:   1 year ago
config: parisc-buildonly-randconfig-r005-20210927 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=686092e7daaa9f43396c57ea0044799e47f0d9da
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 686092e7daaa9f43396c57ea0044799e47f0d9da
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> kernel/time/clocksource.c:1053:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes]
    1053 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
         |         ^~~~~~~~~~~~~~~


vim +/sysfs_get_uname +1053 kernel/time/clocksource.c

734efb467b31e56 John Stultz     2006-06-26  1052  
891292a767c2453 Patrick Palka   2013-10-11 @1053  ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
29b5407819f5973 Thomas Gleixner 2013-04-25  1054  {
29b5407819f5973 Thomas Gleixner 2013-04-25  1055  	size_t ret = cnt;
29b5407819f5973 Thomas Gleixner 2013-04-25  1056  
29b5407819f5973 Thomas Gleixner 2013-04-25  1057  	/* strings from sysfs write are not 0 terminated! */
29b5407819f5973 Thomas Gleixner 2013-04-25  1058  	if (!cnt || cnt >= CS_NAME_LEN)
29b5407819f5973 Thomas Gleixner 2013-04-25  1059  		return -EINVAL;
29b5407819f5973 Thomas Gleixner 2013-04-25  1060  
29b5407819f5973 Thomas Gleixner 2013-04-25  1061  	/* strip of \n: */
29b5407819f5973 Thomas Gleixner 2013-04-25  1062  	if (buf[cnt-1] == '\n')
29b5407819f5973 Thomas Gleixner 2013-04-25  1063  		cnt--;
29b5407819f5973 Thomas Gleixner 2013-04-25  1064  	if (cnt > 0)
29b5407819f5973 Thomas Gleixner 2013-04-25  1065  		memcpy(dst, buf, cnt);
29b5407819f5973 Thomas Gleixner 2013-04-25  1066  	dst[cnt] = 0;
29b5407819f5973 Thomas Gleixner 2013-04-25  1067  	return ret;
29b5407819f5973 Thomas Gleixner 2013-04-25  1068  }
29b5407819f5973 Thomas Gleixner 2013-04-25  1069  

:::::: The code at line 1053 was first introduced by commit
:::::: 891292a767c2453af0e5be9465e95b06b4b29ebe time: Fix signedness bug in sysfs_get_uname() and its callers

:::::: TO: Patrick Palka <patrick@...cs.ath.cx>
:::::: CC: John Stultz <john.stultz@...aro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (39072 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ