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: <202007291729.winQ3zbQ%lkp@intel.com>
Date:   Wed, 29 Jul 2020 17:09:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: arch/x86/boot/compressed/../string.c:43:5: warning: no previous
 prototype for 'bcmp'

Hi Nick,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6ba1b005ffc388c2aeaddae20da29e4810dea298
commit: b059f801a937d164e03b33c1848bb3dca67c0b04 x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS
date:   12 months ago
config: x86_64-randconfig-r032-20200729 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout b059f801a937d164e03b33c1848bb3dca67c0b04
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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 >>):

   In file included from arch/x86/boot/compressed/string.c:11:
>> arch/x86/boot/compressed/../string.c:43:5: warning: no previous prototype for 'bcmp' [-Wmissing-prototypes]
      43 | int bcmp(const void *s1, const void *s2, size_t len)
         |     ^~~~
>> arch/x86/boot/compressed/../string.c:146:6: warning: no previous prototype for 'simple_strtol' [-Wmissing-prototypes]
     146 | long simple_strtol(const char *cp, char **endp, unsigned int base)
         |      ^~~~~~~~~~~~~
>> arch/x86/boot/compressed/string.c:53:7: warning: no previous prototype for 'memmove' [-Wmissing-prototypes]
      53 | void *memmove(void *dest, const void *src, size_t n)
         |       ^~~~~~~
--
>> arch/x86/purgatory/purgatory.c:76:6: warning: no previous prototype for 'warn' [-Wmissing-prototypes]
      76 | void warn(const char *msg) {}
         |      ^~~~

vim +/bcmp +43 arch/x86/boot/compressed/../string.c

fb4cac573ef6dc arch/x86/boot/string.c  Vivek Goyal      2014-03-18   39  
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   40  /*
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   41   * Clang may lower `memcmp == 0` to `bcmp == 0`.
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   42   */
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07  @43  int bcmp(const void *s1, const void *s2, size_t len)
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   44  {
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   45  	return memcmp(s1, s2, len);
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   46  }
4ce97317f41d38 arch/x86/boot/string.c  Nick Desaulniers 2019-08-07   47  
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   48  int strcmp(const char *str1, const char *str2)
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   49  {
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   50  	const unsigned char *s1 = (const unsigned char *)str1;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   51  	const unsigned char *s2 = (const unsigned char *)str2;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   52  	int delta = 0;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   53  
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   54  	while (*s1 || *s2) {
1c1d046be69249 arch/x86/boot/string.c  Arjun Sreedharan 2015-03-16   55  		delta = *s1 - *s2;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   56  		if (delta)
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   57  			return delta;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   58  		s1++;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   59  		s2++;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   60  	}
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   61  	return 0;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   62  }
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   63  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   64  int strncmp(const char *cs, const char *ct, size_t count)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   65  {
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   66  	unsigned char c1, c2;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   67  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   68  	while (count) {
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   69  		c1 = *cs++;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   70  		c2 = *ct++;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   71  		if (c1 != c2)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   72  			return c1 < c2 ? -1 : 1;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   73  		if (!c1)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   74  			break;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   75  		count--;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   76  	}
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   77  	return 0;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   78  }
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   79  
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   80  size_t strnlen(const char *s, size_t maxlen)
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   81  {
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   82  	const char *es = s;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   83  	while (*es && maxlen) {
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   84  		es++;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   85  		maxlen--;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   86  	}
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   87  
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   88  	return (es - s);
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   89  }
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   90  
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   91  unsigned int atou(const char *s)
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   92  {
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   93  	unsigned int i = 0;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   94  	while (isdigit(*s))
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   95  		i = i * 10 + (*s++ - '0');
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   96  	return i;
5be86566151626 arch/i386/boot/string.c H. Peter Anvin   2007-07-11   97  }
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   98  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11   99  /* Works only for digits and letters, but small and fast */
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  100  #define TOLOWER(x) ((x) | 0x20)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  101  
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  102  static unsigned int simple_guess_base(const char *cp)
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  103  {
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  104  	if (cp[0] == '0') {
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  105  		if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2]))
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  106  			return 16;
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  107  		else
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  108  			return 8;
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  109  	} else {
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  110  		return 10;
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  111  	}
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  112  }
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  113  
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  114  /**
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  115   * simple_strtoull - convert a string to an unsigned long long
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  116   * @cp: The start of the string
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  117   * @endp: A pointer to the end of the parsed string will be placed here
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  118   * @base: The number base to use
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  119   */
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  120  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  121  unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  122  {
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  123  	unsigned long long result = 0;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  124  
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  125  	if (!base)
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  126  		base = simple_guess_base(cp);
ce0aa5dd20e443 arch/x86/boot/string.c  Yinghai Lu       2010-07-13  127  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  128  	if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x')
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  129  		cp += 2;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  130  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  131  	while (isxdigit(*cp)) {
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  132  		unsigned int value;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  133  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  134  		value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  135  		if (value >= base)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  136  			break;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  137  		result = result * base + value;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  138  		cp++;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  139  	}
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  140  	if (endp)
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  141  		*endp = (char *)cp;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  142  
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  143  	return result;
fa97bdf92709ad arch/x86/boot/string.c  Pekka Enberg     2010-07-11  144  }
291f36325f9f25 arch/x86/boot/string.c  Matt Fleming     2011-12-12  145  
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13 @146  long simple_strtol(const char *cp, char **endp, unsigned int base)
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  147  {
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  148  	if (*cp == '-')
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  149  		return -simple_strtoull(cp + 1, endp, base);
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  150  
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  151  	return simple_strtoull(cp, endp, base);
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  152  }
d52e7d5a952c5e arch/x86/boot/string.c  Baoquan He       2017-05-13  153  

:::::: The code at line 43 was first introduced by commit
:::::: 4ce97317f41d38584fb93578e922fcd19e535f5b x86/purgatory: Do not use __builtin_memcpy and __builtin_memset

:::::: TO: Nick Desaulniers <ndesaulniers@...gle.com>
:::::: CC: Thomas Gleixner <tglx@...utronix.de>

---
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" (30083 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ