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, 20 Jul 2021 18:44:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Daniel Palmer <daniel@...f.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [linux-chenxing:mstar_v5_14_rebase 137/352]
 drivers/crypto/mstar/msc313-rsa.c:131:34: warning: passing argument 3 of
 'msc313_rsa_write_memory' discards 'volatile' qualifier from pointer target
 type

tree:   git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head:   651efd0e52f225e60faa8b30f9768021e2104d3c
commit: cbe9cdba7d664459a2da9c99039edc76c578fb50 [137/352] crypto: mstar: RSA
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.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/linux-chenxing/linux/commit/cbe9cdba7d664459a2da9c99039edc76c578fb50
        git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
        git fetch --no-tags linux-chenxing mstar_v5_14_rebase
        git checkout cbe9cdba7d664459a2da9c99039edc76c578fb50
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 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/crypto/mstar/msc313-rsa.c: In function 'msc313_rsa_irq':
   drivers/crypto/mstar/msc313-rsa.c:57:21: warning: unused variable 'rsa' [-Wunused-variable]
      57 |  struct msc313_rsa *rsa = data;
         |                     ^~~
   drivers/crypto/mstar/msc313-rsa.c: In function 'msc313_rsa_test':
>> drivers/crypto/mstar/msc313-rsa.c:131:34: warning: passing argument 3 of 'msc313_rsa_write_memory' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
     131 |  msc313_rsa_write_memory(rsa, 0, test_in, ARRAY_SIZE(test_in));
         |                                  ^~~~~~~
   drivers/crypto/mstar/msc313-rsa.c:61:80: note: expected 'const u8 *' {aka 'const unsigned char *'} but argument is of type 'volatile u8 *' {aka 'volatile unsigned char *'}
      61 | static int msc313_rsa_write_memory(struct msc313_rsa *rsa, u16 addr, const u8 *buffer, unsigned int len)
         |                                                                      ~~~~~~~~~~^~~~~~
>> drivers/crypto/mstar/msc313-rsa.c:133:33: warning: passing argument 3 of 'msc313_rsa_read_memory' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
     133 |  msc313_rsa_read_memory(rsa, 0, test_out, ARRAY_SIZE(test_out));
         |                                 ^~~~~~~~
   drivers/crypto/mstar/msc313-rsa.c:83:73: note: expected 'u8 *' {aka 'unsigned char *'} but argument is of type 'volatile u8 *' {aka 'volatile unsigned char *'}
      83 | static int msc313_rsa_read_memory(struct msc313_rsa *rsa, u16 addr, u8 *buffer, unsigned int len)
         |                                                                     ~~~~^~~~~~
   drivers/crypto/mstar/msc313-rsa.c: In function 'msc313_rsa_probe':
   drivers/crypto/mstar/msc313-rsa.c:144:14: warning: unused variable 'irq' [-Wunused-variable]
     144 |  int i, ret, irq;
         |              ^~~
   drivers/crypto/mstar/msc313-rsa.c:144:9: warning: unused variable 'ret' [-Wunused-variable]
     144 |  int i, ret, irq;
         |         ^~~
   drivers/crypto/mstar/msc313-rsa.c:144:6: warning: unused variable 'i' [-Wunused-variable]
     144 |  int i, ret, irq;
         |      ^
   At top level:
   drivers/crypto/mstar/msc313-rsa.c:55:20: warning: 'msc313_rsa_irq' defined but not used [-Wunused-function]
      55 | static irqreturn_t msc313_rsa_irq(int irq, void *data)
         |                    ^~~~~~~~~~~~~~


vim +131 drivers/crypto/mstar/msc313-rsa.c

   116	
   117	
   118	static void msc313_rsa_test(struct msc313_rsa *rsa)
   119	{
   120		u8 i;
   121	
   122		regmap_field_write(rsa->reset, 1);
   123		clk_prepare_enable(rsa->clk);
   124		mdelay(10);
   125		regmap_field_write(rsa->reset, 0);
   126		mdelay(10);
   127	
   128		for(i = 0; i < ARRAY_SIZE(test_in); i++)
   129			test_in[i] = ~i;
   130	
 > 131		msc313_rsa_write_memory(rsa, 0, test_in, ARRAY_SIZE(test_in));
   132	
 > 133		msc313_rsa_read_memory(rsa, 0, test_out, ARRAY_SIZE(test_out));
   134	
   135		for(i = 0; i < ARRAY_SIZE(test_in); i++)
   136			printk("rsa: %d %x:%x\n", (int)i, (unsigned) test_in[i], (unsigned) test_out[i]);
   137	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ