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: <202008260158.7JXtfxl4%lkp@intel.com>
Date:   Wed, 26 Aug 2020 01:59:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Chris Packham <chris.packham@...iedtelesis.co.nz>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/staging/octeon/ethernet.c:158:45: sparse: sparse: invalid
 access past the end of 'ipd_ctl_status' (4 8)

Hi Chris,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a
commit: 8ef0c4f06432b5b2f4e32f37b81708eae1e20c8c Revert "staging/octeon: Mark Ethernet driver as BROKEN"
date:   7 months ago
config: i386-randconfig-s002-20200826 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 8ef0c4f06432b5b2f4e32f37b81708eae1e20c8c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/octeon/ethernet.c:158:45: sparse: sparse: invalid access past the end of 'ipd_ctl_status' (4 8)
   drivers/staging/octeon/ethernet.c:157:45: sparse: sparse: invalid access past the end of 'ipd_ctl_status' (4 8)
   drivers/staging/octeon/ethernet.c:271:48: sparse: sparse: invalid access past the end of 'frm_len_chk' (4 8)
   drivers/staging/octeon/ethernet.c:270:48: sparse: sparse: invalid access past the end of 'frm_len_chk' (4 8)
   drivers/staging/octeon/ethernet.c:321:46: sparse: sparse: invalid access past the end of 'control' (4 8)
   drivers/staging/octeon/ethernet.c:318:46: sparse: sparse: invalid access past the end of 'control' (4 8)
   drivers/staging/octeon/ethernet.c:308:42: sparse: sparse: invalid access past the end of 'control' (4 8)
   drivers/staging/octeon/ethernet.c:311:42: sparse: sparse: invalid access past the end of 'control' (4 8)
   drivers/staging/octeon/ethernet.c:303:34: sparse: sparse: invalid access past the end of 'control' (4 8)
   drivers/staging/octeon/ethernet.c:487:33: sparse: sparse: invalid access past the end of 'link_info' (4 8)
   drivers/staging/octeon/ethernet.c:471:24: sparse: sparse: invalid access past the end of 'gmx_cfg' (4 8)
   drivers/staging/octeon/ethernet.c:510:24: sparse: sparse: invalid access past the end of 'link_info' (4 8)
   drivers/staging/octeon/ethernet.c:753:59: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:752:59: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:750:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:749:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:748:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:747:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:746:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:745:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:744:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:743:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:742:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:741:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:740:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)
   drivers/staging/octeon/ethernet.c:739:67: sparse: sparse: invalid access past the end of 'pip_prt_tagx' (4 8)

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ef0c4f06432b5b2f4e32f37b81708eae1e20c8c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8ef0c4f06432b5b2f4e32f37b81708eae1e20c8c
vim +/ipd_ctl_status +158 drivers/staging/octeon/ethernet.c

422d97b8b05ed38 Chris Packham 2020-02-05  139  
422d97b8b05ed38 Chris Packham 2020-02-05  140  static void cvm_oct_configure_common_hw(void)
422d97b8b05ed38 Chris Packham 2020-02-05  141  {
422d97b8b05ed38 Chris Packham 2020-02-05  142  	/* Setup the FPA */
422d97b8b05ed38 Chris Packham 2020-02-05  143  	cvmx_fpa_enable();
422d97b8b05ed38 Chris Packham 2020-02-05  144  	cvm_oct_mem_fill_fpa(CVMX_FPA_PACKET_POOL, CVMX_FPA_PACKET_POOL_SIZE,
422d97b8b05ed38 Chris Packham 2020-02-05  145  			     num_packet_buffers);
422d97b8b05ed38 Chris Packham 2020-02-05  146  	cvm_oct_mem_fill_fpa(CVMX_FPA_WQE_POOL, CVMX_FPA_WQE_POOL_SIZE,
422d97b8b05ed38 Chris Packham 2020-02-05  147  			     num_packet_buffers);
422d97b8b05ed38 Chris Packham 2020-02-05  148  	if (CVMX_FPA_OUTPUT_BUFFER_POOL != CVMX_FPA_PACKET_POOL)
422d97b8b05ed38 Chris Packham 2020-02-05  149  		cvm_oct_mem_fill_fpa(CVMX_FPA_OUTPUT_BUFFER_POOL,
422d97b8b05ed38 Chris Packham 2020-02-05  150  				     CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE, 1024);
422d97b8b05ed38 Chris Packham 2020-02-05  151  
422d97b8b05ed38 Chris Packham 2020-02-05  152  #ifdef __LITTLE_ENDIAN
422d97b8b05ed38 Chris Packham 2020-02-05  153  	{
422d97b8b05ed38 Chris Packham 2020-02-05  154  		union cvmx_ipd_ctl_status ipd_ctl_status;
422d97b8b05ed38 Chris Packham 2020-02-05  155  
422d97b8b05ed38 Chris Packham 2020-02-05  156  		ipd_ctl_status.u64 = cvmx_read_csr(CVMX_IPD_CTL_STATUS);
422d97b8b05ed38 Chris Packham 2020-02-05  157  		ipd_ctl_status.s.pkt_lend = 1;
422d97b8b05ed38 Chris Packham 2020-02-05 @158  		ipd_ctl_status.s.wqe_lend = 1;
422d97b8b05ed38 Chris Packham 2020-02-05  159  		cvmx_write_csr(CVMX_IPD_CTL_STATUS, ipd_ctl_status.u64);
422d97b8b05ed38 Chris Packham 2020-02-05  160  	}
422d97b8b05ed38 Chris Packham 2020-02-05  161  #endif
422d97b8b05ed38 Chris Packham 2020-02-05  162  
422d97b8b05ed38 Chris Packham 2020-02-05  163  	cvmx_helper_setup_red(num_packet_buffers / 4, num_packet_buffers / 8);
422d97b8b05ed38 Chris Packham 2020-02-05  164  }
422d97b8b05ed38 Chris Packham 2020-02-05  165  

:::::: The code at line 158 was first introduced by commit
:::::: 422d97b8b05ed38cc5f67522ddb821868ea272a7 Revert "staging: octeon: delete driver"

:::::: TO: Chris Packham <chris.packham@...iedtelesis.co.nz>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ