From: kernel test robot <lkp@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
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 3/3] staging: rtl8712: Use existing arc4 implementation
Date: Sat, 10 Apr 2021 23:39:33 +0800 [thread overview]
Message-ID: <202104102333.AEGTovOP-lkp@intel.com> (raw)
In-Reply-To: <a793f56d34e53397607df54c683943d2c48b84f7.1618055514.git.christophe.jaillet@wanadoo.fr>
[-- Attachment #1: Type: text/plain, Size: 7714 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/ea2709e5f53370e588967f79d2eb847555ea9d3b
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 ea2709e5f53370e588967f79d2eb847555ea9d3b
# 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/rtl8712/rtl871x_security.c: In function 'r8712_wep_encrypt':
>> drivers/staging/rtl8712/rtl871x_security.c:147:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
147 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_wep_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:182:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
182 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_tkip_encrypt':
drivers/staging/rtl8712/rtl871x_security.c:576:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
576 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_tkip_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:631:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
631 | }
| ^
vim +147 drivers/staging/rtl8712/rtl871x_security.c
2865d42c78a912 Larry Finger 2010-08-20 88
2865d42c78a912 Larry Finger 2010-08-20 89 /*
09b080f73a4191 Vijai Kumar K 2016-11-20 90 * Need to consider the fragment situation
2865d42c78a912 Larry Finger 2010-08-20 91 */
2865d42c78a912 Larry Finger 2010-08-20 92 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
2865d42c78a912 Larry Finger 2010-08-20 93 { /* exclude ICV */
2865d42c78a912 Larry Finger 2010-08-20 94 unsigned char crc[4];
ea2709e5f53370 Christophe JAILLET 2021-04-10 95 struct arc4_ctx mycontext;
b78559b60518eb Martin Homuth 2017-12-19 96 u32 curfragnum, length, keylength, pki;
2865d42c78a912 Larry Finger 2010-08-20 97 u8 *pframe, *payload, *iv; /*,*wepkey*/
2865d42c78a912 Larry Finger 2010-08-20 98 u8 wepkey[16];
2865d42c78a912 Larry Finger 2010-08-20 99 struct pkt_attrib *pattrib = &((struct xmit_frame *)
2865d42c78a912 Larry Finger 2010-08-20 100 pxmitframe)->attrib;
2865d42c78a912 Larry Finger 2010-08-20 101 struct security_priv *psecuritypriv = &padapter->securitypriv;
2865d42c78a912 Larry Finger 2010-08-20 102 struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
2865d42c78a912 Larry Finger 2010-08-20 103
2865d42c78a912 Larry Finger 2010-08-20 104 if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
2865d42c78a912 Larry Finger 2010-08-20 105 return;
2865d42c78a912 Larry Finger 2010-08-20 106 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + TXDESC_OFFSET;
2865d42c78a912 Larry Finger 2010-08-20 107 /*start to encrypt each fragment*/
2865d42c78a912 Larry Finger 2010-08-20 108 if ((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_)) {
b78559b60518eb Martin Homuth 2017-12-19 109 pki = psecuritypriv->PrivacyKeyIndex;
b78559b60518eb Martin Homuth 2017-12-19 110 keylength = psecuritypriv->DefKeylen[pki];
2865d42c78a912 Larry Finger 2010-08-20 111 for (curfragnum = 0; curfragnum < pattrib->nr_frags;
2865d42c78a912 Larry Finger 2010-08-20 112 curfragnum++) {
2865d42c78a912 Larry Finger 2010-08-20 113 iv = pframe + pattrib->hdrlen;
2865d42c78a912 Larry Finger 2010-08-20 114 memcpy(&wepkey[0], iv, 3);
2865d42c78a912 Larry Finger 2010-08-20 115 memcpy(&wepkey[3], &psecuritypriv->DefKey[
2865d42c78a912 Larry Finger 2010-08-20 116 psecuritypriv->PrivacyKeyIndex].skey[0],
2865d42c78a912 Larry Finger 2010-08-20 117 keylength);
2865d42c78a912 Larry Finger 2010-08-20 118 payload = pframe + pattrib->iv_len + pattrib->hdrlen;
2865d42c78a912 Larry Finger 2010-08-20 119 if ((curfragnum + 1) == pattrib->nr_frags) {
b78559b60518eb Martin Homuth 2017-12-19 120 length = pattrib->last_txcmdsz -
b78559b60518eb Martin Homuth 2017-12-19 121 pattrib->hdrlen -
b78559b60518eb Martin Homuth 2017-12-19 122 pattrib->iv_len -
2865d42c78a912 Larry Finger 2010-08-20 123 pattrib->icv_len;
dd9161483f420c Jannik Becher 2016-12-20 124 *((__le32 *)crc) = cpu_to_le32(getcrc32(
2865d42c78a912 Larry Finger 2010-08-20 125 payload, length));
ea2709e5f53370 Christophe JAILLET 2021-04-10 126 arc4_setkey(&mycontext, wepkey, 3 + keylength);
ea2709e5f53370 Christophe JAILLET 2021-04-10 127 arc4_crypt(&mycontext, payload, payload,
2865d42c78a912 Larry Finger 2010-08-20 128 length);
ea2709e5f53370 Christophe JAILLET 2021-04-10 129 arc4_crypt(&mycontext, payload + length,
2865d42c78a912 Larry Finger 2010-08-20 130 crc, 4);
2865d42c78a912 Larry Finger 2010-08-20 131 } else {
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 132 length = pxmitpriv->frag_len -
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 133 pattrib->hdrlen - pattrib->iv_len -
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 134 pattrib->icv_len;
dd9161483f420c Jannik Becher 2016-12-20 135 *((__le32 *)crc) = cpu_to_le32(getcrc32(
2865d42c78a912 Larry Finger 2010-08-20 136 payload, length));
ea2709e5f53370 Christophe JAILLET 2021-04-10 137 arc4_setkey(&mycontext, wepkey, 3 + keylength);
ea2709e5f53370 Christophe JAILLET 2021-04-10 138 arc4_crypt(&mycontext, payload, payload,
2865d42c78a912 Larry Finger 2010-08-20 139 length);
ea2709e5f53370 Christophe JAILLET 2021-04-10 140 arc4_crypt(&mycontext, payload + length,
2865d42c78a912 Larry Finger 2010-08-20 141 crc, 4);
2865d42c78a912 Larry Finger 2010-08-20 142 pframe += pxmitpriv->frag_len;
2865d42c78a912 Larry Finger 2010-08-20 143 pframe = (u8 *)RND4((addr_t)(pframe));
2865d42c78a912 Larry Finger 2010-08-20 144 }
2865d42c78a912 Larry Finger 2010-08-20 145 }
2865d42c78a912 Larry Finger 2010-08-20 146 }
2865d42c78a912 Larry Finger 2010-08-20 @147 }
2865d42c78a912 Larry Finger 2010-08-20 148
---
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 --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 3/3] staging: rtl8712: Use existing arc4 implementation
Date: Sat, 10 Apr 2021 23:39:33 +0800 [thread overview]
Message-ID: <202104102333.AEGTovOP-lkp@intel.com> (raw)
In-Reply-To: <a793f56d34e53397607df54c683943d2c48b84f7.1618055514.git.christophe.jaillet@wanadoo.fr>
[-- Attachment #1: Type: text/plain, Size: 7828 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/ea2709e5f53370e588967f79d2eb847555ea9d3b
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 ea2709e5f53370e588967f79d2eb847555ea9d3b
# 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/rtl8712/rtl871x_security.c: In function 'r8712_wep_encrypt':
>> drivers/staging/rtl8712/rtl871x_security.c:147:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
147 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_wep_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:182:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
182 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_tkip_encrypt':
drivers/staging/rtl8712/rtl871x_security.c:576:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
576 | }
| ^
drivers/staging/rtl8712/rtl871x_security.c: In function 'r8712_tkip_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:631:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
631 | }
| ^
vim +147 drivers/staging/rtl8712/rtl871x_security.c
2865d42c78a912 Larry Finger 2010-08-20 88
2865d42c78a912 Larry Finger 2010-08-20 89 /*
09b080f73a4191 Vijai Kumar K 2016-11-20 90 * Need to consider the fragment situation
2865d42c78a912 Larry Finger 2010-08-20 91 */
2865d42c78a912 Larry Finger 2010-08-20 92 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
2865d42c78a912 Larry Finger 2010-08-20 93 { /* exclude ICV */
2865d42c78a912 Larry Finger 2010-08-20 94 unsigned char crc[4];
ea2709e5f53370 Christophe JAILLET 2021-04-10 95 struct arc4_ctx mycontext;
b78559b60518eb Martin Homuth 2017-12-19 96 u32 curfragnum, length, keylength, pki;
2865d42c78a912 Larry Finger 2010-08-20 97 u8 *pframe, *payload, *iv; /*,*wepkey*/
2865d42c78a912 Larry Finger 2010-08-20 98 u8 wepkey[16];
2865d42c78a912 Larry Finger 2010-08-20 99 struct pkt_attrib *pattrib = &((struct xmit_frame *)
2865d42c78a912 Larry Finger 2010-08-20 100 pxmitframe)->attrib;
2865d42c78a912 Larry Finger 2010-08-20 101 struct security_priv *psecuritypriv = &padapter->securitypriv;
2865d42c78a912 Larry Finger 2010-08-20 102 struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
2865d42c78a912 Larry Finger 2010-08-20 103
2865d42c78a912 Larry Finger 2010-08-20 104 if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
2865d42c78a912 Larry Finger 2010-08-20 105 return;
2865d42c78a912 Larry Finger 2010-08-20 106 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + TXDESC_OFFSET;
2865d42c78a912 Larry Finger 2010-08-20 107 /*start to encrypt each fragment*/
2865d42c78a912 Larry Finger 2010-08-20 108 if ((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_)) {
b78559b60518eb Martin Homuth 2017-12-19 109 pki = psecuritypriv->PrivacyKeyIndex;
b78559b60518eb Martin Homuth 2017-12-19 110 keylength = psecuritypriv->DefKeylen[pki];
2865d42c78a912 Larry Finger 2010-08-20 111 for (curfragnum = 0; curfragnum < pattrib->nr_frags;
2865d42c78a912 Larry Finger 2010-08-20 112 curfragnum++) {
2865d42c78a912 Larry Finger 2010-08-20 113 iv = pframe + pattrib->hdrlen;
2865d42c78a912 Larry Finger 2010-08-20 114 memcpy(&wepkey[0], iv, 3);
2865d42c78a912 Larry Finger 2010-08-20 115 memcpy(&wepkey[3], &psecuritypriv->DefKey[
2865d42c78a912 Larry Finger 2010-08-20 116 psecuritypriv->PrivacyKeyIndex].skey[0],
2865d42c78a912 Larry Finger 2010-08-20 117 keylength);
2865d42c78a912 Larry Finger 2010-08-20 118 payload = pframe + pattrib->iv_len + pattrib->hdrlen;
2865d42c78a912 Larry Finger 2010-08-20 119 if ((curfragnum + 1) == pattrib->nr_frags) {
b78559b60518eb Martin Homuth 2017-12-19 120 length = pattrib->last_txcmdsz -
b78559b60518eb Martin Homuth 2017-12-19 121 pattrib->hdrlen -
b78559b60518eb Martin Homuth 2017-12-19 122 pattrib->iv_len -
2865d42c78a912 Larry Finger 2010-08-20 123 pattrib->icv_len;
dd9161483f420c Jannik Becher 2016-12-20 124 *((__le32 *)crc) = cpu_to_le32(getcrc32(
2865d42c78a912 Larry Finger 2010-08-20 125 payload, length));
ea2709e5f53370 Christophe JAILLET 2021-04-10 126 arc4_setkey(&mycontext, wepkey, 3 + keylength);
ea2709e5f53370 Christophe JAILLET 2021-04-10 127 arc4_crypt(&mycontext, payload, payload,
2865d42c78a912 Larry Finger 2010-08-20 128 length);
ea2709e5f53370 Christophe JAILLET 2021-04-10 129 arc4_crypt(&mycontext, payload + length,
2865d42c78a912 Larry Finger 2010-08-20 130 crc, 4);
2865d42c78a912 Larry Finger 2010-08-20 131 } else {
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 132 length = pxmitpriv->frag_len -
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 133 pattrib->hdrlen - pattrib->iv_len -
4ef2de5ae0377b Luis de Bethencourt 2015-10-19 134 pattrib->icv_len;
dd9161483f420c Jannik Becher 2016-12-20 135 *((__le32 *)crc) = cpu_to_le32(getcrc32(
2865d42c78a912 Larry Finger 2010-08-20 136 payload, length));
ea2709e5f53370 Christophe JAILLET 2021-04-10 137 arc4_setkey(&mycontext, wepkey, 3 + keylength);
ea2709e5f53370 Christophe JAILLET 2021-04-10 138 arc4_crypt(&mycontext, payload, payload,
2865d42c78a912 Larry Finger 2010-08-20 139 length);
ea2709e5f53370 Christophe JAILLET 2021-04-10 140 arc4_crypt(&mycontext, payload + length,
2865d42c78a912 Larry Finger 2010-08-20 141 crc, 4);
2865d42c78a912 Larry Finger 2010-08-20 142 pframe += pxmitpriv->frag_len;
2865d42c78a912 Larry Finger 2010-08-20 143 pframe = (u8 *)RND4((addr_t)(pframe));
2865d42c78a912 Larry Finger 2010-08-20 144 }
2865d42c78a912 Larry Finger 2010-08-20 145 }
2865d42c78a912 Larry Finger 2010-08-20 146 }
2865d42c78a912 Larry Finger 2010-08-20 @147 }
2865d42c78a912 Larry Finger 2010-08-20 148
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30594 bytes --]
next prev parent reply other threads:[~2021-04-10 15:40 UTC|newest]
Thread overview: 13+ 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 [this message]
2021-04-10 15:39 ` kernel test robot
2021-04-17 12:57 ` 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
2021-04-10 15:25 ` kernel test robot
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=202104102333.AEGTovOP-lkp@intel.com \
--to=lkp@intel.com \
--cc=Larry.Finger@lwfinger.net \
--cc=christophe.jaillet@wanadoo.fr \
--cc=florian.c.schilhabel@googlemail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.