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]
Date:   Tue, 28 Jun 2022 16:32:38 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hannes Reinecke <hare@...e.de>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Sagi Grimberg <sagi@...mberg.me>
Subject: [hare-scsi-devel:auth.v15 10/11] drivers/nvme/target/auth.c:491:18:
 warning: format specifies type 'unsigned long' but the argument has type
 'size_t' (aka 'unsigned int')

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v15
head:   2a3a7d0493841ac5944dc0ba861b53d1c2b28014
commit: 59e3ea5fe9113bf2026d17fc969d69001bc1b746 [10/11] nvmet-auth: Diffie-Hellman key exchange support
config: riscv-randconfig-c006-20220627 (https://download.01.org/0day-ci/archive/20220628/202206281641.MOCcvNmX-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 016342e319fd31e41cf5ed16a6140a8ea2de74dd)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=59e3ea5fe9113bf2026d17fc969d69001bc1b746
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel auth.v15
        git checkout 59e3ea5fe9113bf2026d17fc969d69001bc1b746
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/nvme/target/

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

All warnings (new ones prefixed by >>):

>> drivers/nvme/target/auth.c:491:18: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
                           ctrl->cntlid, ctrl->dh_keysize, buf_size);
                                         ^~~~~~~~~~~~~~~~
   include/linux/printk.h:528:37: note: expanded from macro 'pr_warn'
           printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
                                      ~~~     ^~~~~~~~~~~
   include/linux/printk.h:475:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:447:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   error: A dwo section may not contain relocations
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   1 warning and 20 errors generated.


vim +491 drivers/nvme/target/auth.c

   478	
   479	int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
   480					u8 *buf, int buf_size)
   481	{
   482		struct nvmet_ctrl *ctrl = req->sq->ctrl;
   483		int ret = 0;
   484	
   485		if (!ctrl->dh_key) {
   486			pr_warn("ctrl %d no DH public key!\n", ctrl->cntlid);
   487			return -ENOKEY;
   488		}
   489		if (buf_size != ctrl->dh_keysize) {
   490			pr_warn("ctrl %d DH public key size mismatch, need %lu is %d\n",
 > 491				ctrl->cntlid, ctrl->dh_keysize, buf_size);
   492			ret = -EINVAL;
   493		} else {
   494			memcpy(buf, ctrl->dh_key, buf_size);
   495			pr_debug("%s: ctrl %d public key %*ph\n", __func__,
   496				 ctrl->cntlid, (int)buf_size, buf);
   497		}
   498	
   499		return ret;
   500	}
   501	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ