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: <202107260822.AjV1mNLn-lkp@intel.com>
Date:   Mon, 26 Jul 2021 08:16:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luca Coelho <luciano.coelho@...el.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: drivers/net/wireless/intel/iwlwifi/fw/uefi.c:51:14: warning: format
 specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned
 long'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ff1176468d368232b684f75e82563369208bc371
commit: 84c3c9952afbf7df39937095aa0ad70b58703e91 iwlwifi: move UEFI code to a separate file
date:   5 weeks ago
config: arm-randconfig-r002-20210726 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c63dbd850182797bc4b76124d08e1c320ab2365d)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=84c3c9952afbf7df39937095aa0ad70b58703e91
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 84c3c9952afbf7df39937095aa0ad70b58703e91
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

>> drivers/net/wireless/intel/iwlwifi/fw/uefi.c:51:14: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long' [-Wformat]
                                err, package_size);
                                     ^~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:64: note: expanded from macro 'IWL_DEBUG_FW'
   #define IWL_DEBUG_FW(p, f, a...)        IWL_DEBUG(p, IWL_DL_FW, f, ## a)
                                                                   ~     ^
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:88:49: note: expanded from macro 'IWL_DEBUG'
           __IWL_DEBUG_DEV((m)->dev, level, false, fmt, ##args)
                                                   ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:49: note: expanded from macro '__IWL_DEBUG_DEV'
                   __iwl_dbg(dev, level, limit, __func__, fmt, ##args);    \
                                                          ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/fw/uefi.c:57:61: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long' [-Wformat]
           IWL_DEBUG_FW(trans, "Read PNVM from UEFI with size %zd\n", package_size);
                                                              ~~~     ^~~~~~~~~~~~
                                                              %lu
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:64: note: expanded from macro 'IWL_DEBUG_FW'
   #define IWL_DEBUG_FW(p, f, a...)        IWL_DEBUG(p, IWL_DL_FW, f, ## a)
                                                                   ~     ^
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:88:49: note: expanded from macro 'IWL_DEBUG'
           __IWL_DEBUG_DEV((m)->dev, level, false, fmt, ##args)
                                                   ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:49: note: expanded from macro '__IWL_DEBUG_DEV'
                   __iwl_dbg(dev, level, limit, __func__, fmt, ##args);    \
                                                          ~~~    ^~~~
   2 warnings generated.


vim +51 drivers/net/wireless/intel/iwlwifi/fw/uefi.c

    13	
    14	#define IWL_EFI_VAR_GUID EFI_GUID(0x92daaf2f, 0xc02b, 0x455b,	\
    15					  0xb2, 0xec, 0xf5, 0xa3,	\
    16					  0x59, 0x4f, 0x4a, 0xea)
    17	
    18	void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
    19	{
    20		struct efivar_entry *pnvm_efivar;
    21		void *data;
    22		unsigned long package_size;
    23		int err;
    24	
    25		pnvm_efivar = kzalloc(sizeof(*pnvm_efivar), GFP_KERNEL);
    26		if (!pnvm_efivar)
    27			return ERR_PTR(-ENOMEM);
    28	
    29		memcpy(&pnvm_efivar->var.VariableName, IWL_UEFI_OEM_PNVM_NAME,
    30		       sizeof(IWL_UEFI_OEM_PNVM_NAME));
    31		pnvm_efivar->var.VendorGuid = IWL_EFI_VAR_GUID;
    32	
    33		/*
    34		 * TODO: we hardcode a maximum length here, because reading
    35		 * from the UEFI is not working.  To implement this properly,
    36		 * we have to call efivar_entry_size().
    37		 */
    38		package_size = IWL_HARDCODED_PNVM_SIZE;
    39	
    40		data = kmalloc(package_size, GFP_KERNEL);
    41		if (!data) {
    42			data = ERR_PTR(-ENOMEM);
    43			*len = 0;
    44			goto out;
    45		}
    46	
    47		err = efivar_entry_get(pnvm_efivar, NULL, &package_size, data);
    48		if (err) {
    49			IWL_DEBUG_FW(trans,
    50				     "PNVM UEFI variable not found %d (len %zd)\n",
  > 51				     err, package_size);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ