linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	gregkh@linuxfoundation.org
Cc: kbuild-all@lists.01.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH 2/3] staging: rtl8723bs: Use existing arc4 implementation
Date: Sat, 10 Apr 2021 23:25:55 +0800	[thread overview]
Message-ID: <202104102325.KYjxjrVd-lkp@intel.com> (raw)
In-Reply-To: <6a4aebf9feb9ece975734f2e51da5ecae2996cee.1618055514.git.christophe.jaillet@wanadoo.fr>

[-- Attachment #1: Type: text/plain, Size: 7145 bytes --]

Hi Christophe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Christophe-JAILLET/staging-rtl8188eu-Use-existing-arc4-implementation/20210410-213656
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 32abcac8037da5dc570c22abf266cbb92eee9fc9
config: arm-randconfig-s032-20210410 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-279-g6d5d9b42-dirty
        # https://github.com/0day-ci/linux/commit/e0f0911d8f1c282314b6c6df1c03a0656f575f77
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christophe-JAILLET/staging-rtl8188eu-Use-existing-arc4-implementation/20210410-213656
        git checkout e0f0911d8f1c282314b6c6df1c03a0656f575f77
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm 

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

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8723bs/core/rtw_security.c: In function 'rtw_wep_encrypt':
>> drivers/staging/rtl8723bs/core/rtw_security.c:144:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     144 | }
         | ^
   drivers/staging/rtl8723bs/core/rtw_security.c: In function 'rtw_wep_decrypt':
   drivers/staging/rtl8723bs/core/rtw_security.c:181:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     181 | }
         | ^
   drivers/staging/rtl8723bs/core/rtw_security.c: In function 'rtw_tkip_encrypt':
   drivers/staging/rtl8723bs/core/rtw_security.c:583:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     583 | }
         | ^
   drivers/staging/rtl8723bs/core/rtw_security.c: In function 'rtw_tkip_decrypt':
   drivers/staging/rtl8723bs/core/rtw_security.c:679:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     679 | }
         | ^


vim +144 drivers/staging/rtl8723bs/core/rtw_security.c

554c0a3abf216c Hans de Goede      2017-03-29   92  
554c0a3abf216c Hans de Goede      2017-03-29   93  	unsigned char crc[4];
e0f0911d8f1c28 Christophe JAILLET 2021-04-10   94  	struct arc4_ctx mycontext;
554c0a3abf216c Hans de Goede      2017-03-29   95  
d495c5503d1339 Marco Cesati       2021-03-12   96  	signed int	curfragnum, length;
554c0a3abf216c Hans de Goede      2017-03-29   97  	u32 keylength;
554c0a3abf216c Hans de Goede      2017-03-29   98  
554c0a3abf216c Hans de Goede      2017-03-29   99  	u8 *pframe, *payload, *iv;    /* wepkey */
554c0a3abf216c Hans de Goede      2017-03-29  100  	u8 wepkey[16];
554c0a3abf216c Hans de Goede      2017-03-29  101  	u8 hw_hdr_offset = 0;
554c0a3abf216c Hans de Goede      2017-03-29  102  	struct pkt_attrib *pattrib = &((struct xmit_frame *)pxmitframe)->attrib;
554c0a3abf216c Hans de Goede      2017-03-29  103  	struct security_priv *psecuritypriv = &padapter->securitypriv;
554c0a3abf216c Hans de Goede      2017-03-29  104  	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
554c0a3abf216c Hans de Goede      2017-03-29  105  
554c0a3abf216c Hans de Goede      2017-03-29  106  	if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
554c0a3abf216c Hans de Goede      2017-03-29  107  		return;
554c0a3abf216c Hans de Goede      2017-03-29  108  
554c0a3abf216c Hans de Goede      2017-03-29  109  	hw_hdr_offset = TXDESC_OFFSET;
554c0a3abf216c Hans de Goede      2017-03-29  110  	pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset;
554c0a3abf216c Hans de Goede      2017-03-29  111  
554c0a3abf216c Hans de Goede      2017-03-29  112  	/* start to encrypt each fragment */
554c0a3abf216c Hans de Goede      2017-03-29  113  	if ((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_)) {
554c0a3abf216c Hans de Goede      2017-03-29  114  		keylength = psecuritypriv->dot11DefKeylen[psecuritypriv->dot11PrivacyKeyIndex];
554c0a3abf216c Hans de Goede      2017-03-29  115  
554c0a3abf216c Hans de Goede      2017-03-29  116  		for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
554c0a3abf216c Hans de Goede      2017-03-29  117  			iv = pframe+pattrib->hdrlen;
554c0a3abf216c Hans de Goede      2017-03-29  118  			memcpy(&wepkey[0], iv, 3);
554c0a3abf216c Hans de Goede      2017-03-29  119  			memcpy(&wepkey[3], &psecuritypriv->dot11DefKey[psecuritypriv->dot11PrivacyKeyIndex].skey[0], keylength);
554c0a3abf216c Hans de Goede      2017-03-29  120  			payload = pframe+pattrib->iv_len+pattrib->hdrlen;
554c0a3abf216c Hans de Goede      2017-03-29  121  
554c0a3abf216c Hans de Goede      2017-03-29  122  			if ((curfragnum+1) == pattrib->nr_frags) {	/* the last fragment */
554c0a3abf216c Hans de Goede      2017-03-29  123  
554c0a3abf216c Hans de Goede      2017-03-29  124  				length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len;
554c0a3abf216c Hans de Goede      2017-03-29  125  
554c0a3abf216c Hans de Goede      2017-03-29  126  				*((__le32 *)crc) = getcrc32(payload, length);
554c0a3abf216c Hans de Goede      2017-03-29  127  
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  128  				arc4_setkey(&mycontext, wepkey, 3 + keylength);
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  129  				arc4_crypt(&mycontext, payload, payload, length);
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  130  				arc4_crypt(&mycontext, payload + length, crc, 4);
554c0a3abf216c Hans de Goede      2017-03-29  131  
554c0a3abf216c Hans de Goede      2017-03-29  132  			} else {
554c0a3abf216c Hans de Goede      2017-03-29  133  				length = pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len;
554c0a3abf216c Hans de Goede      2017-03-29  134  				*((__le32 *)crc) = getcrc32(payload, length);
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  135  				arc4_setkey(&mycontext, wepkey, 3 + keylength);
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  136  				arc4_crypt(&mycontext, payload, payload, length);
e0f0911d8f1c28 Christophe JAILLET 2021-04-10  137  				arc4_crypt(&mycontext, payload + length, crc, 4);
554c0a3abf216c Hans de Goede      2017-03-29  138  
554c0a3abf216c Hans de Goede      2017-03-29  139  				pframe += pxmitpriv->frag_len;
87fe08d74ca66d Ross Schmidt       2020-10-03  140  				pframe = (u8 *)round_up((SIZE_PTR)(pframe), 4);
554c0a3abf216c Hans de Goede      2017-03-29  141  			}
554c0a3abf216c Hans de Goede      2017-03-29  142  		}
554c0a3abf216c Hans de Goede      2017-03-29  143  	}
554c0a3abf216c Hans de Goede      2017-03-29 @144  }
554c0a3abf216c Hans de Goede      2017-03-29  145  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30594 bytes --]

  reply	other threads:[~2021-04-10 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 11:54 [PATCH 1/3] staging: rtl8188eu: Use existing arc4 implementation Christophe JAILLET
2021-04-10 11:55 ` Christophe JAILLET
2021-04-10 11:56 ` [PATCH 3/3] staging: rtl8712: " Christophe JAILLET
2021-04-10 12:09   ` Greg KH
2021-04-10 15:39   ` kernel test robot
2021-04-17 12:57   ` kernel test robot
2021-04-10 13:35 ` [PATCH 2/3] staging: rtl8723bs: " Christophe JAILLET
2021-04-10 15:25   ` kernel test robot [this message]
2021-04-12  9:34   ` Greg KH
2021-04-12 21:09     ` Christophe JAILLET

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104102325.KYjxjrVd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).