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: <202210120623.M35YDDf1-lkp@intel.com>
Date:   Wed, 12 Oct 2022 06:43:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Jason A. Donenfeld" <zx2c4@...nel.org>
Cc:     kbuild-all@...ts.01.org, Ammar Faizi <ammarfaizi2@...weeb.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:crng/random/jd/get_random_u32_below 11/11]
 net/netfilter/nf_nat_helper.c:226:30: error: implicit declaration of
 function 'prandom_u32_max'; did you mean 'prandom_u32_state'?

tree:   https://github.com/ammarfaizi2/linux-block crng/random/jd/get_random_u32_below
head:   88ef60788111180aee2af8aa92c88192ab1cbc9d
commit: 88ef60788111180aee2af8aa92c88192ab1cbc9d [11/11] prandom: remove prandom_u32_max()
config: openrisc-randconfig-r001-20221010
compiler: or1k-linux-gcc (GCC) 12.1.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://github.com/ammarfaizi2/linux-block/commit/88ef60788111180aee2af8aa92c88192ab1cbc9d
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block crng/random/jd/get_random_u32_below
        git checkout 88ef60788111180aee2af8aa92c88192ab1cbc9d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash net/

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

All errors (new ones prefixed by >>):

   net/netfilter/nf_nat_helper.c: In function 'nf_nat_exp_find_port':
>> net/netfilter/nf_nat_helper.c:226:30: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
     226 |                 port = min + prandom_u32_max(range);
         |                              ^~~~~~~~~~~~~~~
         |                              prandom_u32_state
   cc1: some warnings being treated as errors


vim +226 net/netfilter/nf_nat_helper.c

c92c2717104055 Florian Westphal 2022-09-06  201  
c92c2717104055 Florian Westphal 2022-09-06  202  u16 nf_nat_exp_find_port(struct nf_conntrack_expect *exp, u16 port)
c92c2717104055 Florian Westphal 2022-09-06  203  {
adda60cc2bb0fa Florian Westphal 2022-09-06  204  	static const unsigned int max_attempts = 128;
adda60cc2bb0fa Florian Westphal 2022-09-06  205  	int range, attempts_left;
adda60cc2bb0fa Florian Westphal 2022-09-06  206  	u16 min = port;
adda60cc2bb0fa Florian Westphal 2022-09-06  207  
adda60cc2bb0fa Florian Westphal 2022-09-06  208  	range = USHRT_MAX - port;
adda60cc2bb0fa Florian Westphal 2022-09-06  209  	attempts_left = range;
adda60cc2bb0fa Florian Westphal 2022-09-06  210  
adda60cc2bb0fa Florian Westphal 2022-09-06  211  	if (attempts_left > max_attempts)
adda60cc2bb0fa Florian Westphal 2022-09-06  212  		attempts_left = max_attempts;
adda60cc2bb0fa Florian Westphal 2022-09-06  213  
c92c2717104055 Florian Westphal 2022-09-06  214  	/* Try to get same port: if not, try to change it. */
adda60cc2bb0fa Florian Westphal 2022-09-06  215  	for (;;) {
c92c2717104055 Florian Westphal 2022-09-06  216  		int res;
c92c2717104055 Florian Westphal 2022-09-06  217  
c92c2717104055 Florian Westphal 2022-09-06  218  		exp->tuple.dst.u.tcp.port = htons(port);
c92c2717104055 Florian Westphal 2022-09-06  219  		res = nf_ct_expect_related(exp, 0);
c92c2717104055 Florian Westphal 2022-09-06  220  		if (res == 0)
c92c2717104055 Florian Westphal 2022-09-06  221  			return port;
c92c2717104055 Florian Westphal 2022-09-06  222  
adda60cc2bb0fa Florian Westphal 2022-09-06  223  		if (res != -EBUSY || (--attempts_left < 0))
c92c2717104055 Florian Westphal 2022-09-06  224  			break;
adda60cc2bb0fa Florian Westphal 2022-09-06  225  
adda60cc2bb0fa Florian Westphal 2022-09-06 @226  		port = min + prandom_u32_max(range);

:::::: The code at line 226 was first introduced by commit
:::::: adda60cc2bb0fa46bed004070f29f90db96afbb3 netfilter: nat: avoid long-running port range loop

:::::: TO: Florian Westphal <fw@...len.de>
:::::: CC: Florian Westphal <fw@...len.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (153406 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ