[linux-next:master 6701/9662] net/qrtr/qrtr.c:1119:22: sparse: sparse: incorrect type in initializer (different address spaces)
by kbuild test robot
Hi Manivannan,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: bdecf38f228bcca73b31ada98b5b7ba1215eb9c9
commit: e42671084361302141a09284fde9bbc14fdd16bf [6701/9662] net: qrtr: Do not depend on ARCH_QCOM
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout e42671084361302141a09284fde9bbc14fdd16bf
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/qrtr/qrtr.c:185:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderevoid const * @@
net/qrtr/qrtr.c:185:23: sparse: expected void const *
net/qrtr/qrtr.c:185:23: sparse: got void [noderef] <asn:4> *
net/qrtr/qrtr.c:356:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] confirm_rx @@ got e] confirm_rx @@
net/qrtr/qrtr.c:356:25: sparse: expected restricted __le32 [usertype] confirm_rx
net/qrtr/qrtr.c:356:25: sparse: got int
net/qrtr/qrtr.c:604:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct qrtr_tx_flow *flow @@ got voistruct qrtr_tx_flow *flow @@
net/qrtr/qrtr.c:604:22: sparse: expected struct qrtr_tx_flow *flow
net/qrtr/qrtr.c:604:22: sparse: got void [noderef] <asn:4> *
>> net/qrtr/qrtr.c:1119:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int *__pu_addr @@ got int [noderef] <asnint *__pu_addr @@
>> net/qrtr/qrtr.c:1119:22: sparse: expected int *__pu_addr
>> net/qrtr/qrtr.c:1119:22: sparse: got int [noderef] <asn:1> *
>> net/qrtr/qrtr.c:1119:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got :1> *to @@
>> net/qrtr/qrtr.c:1119:22: sparse: expected void [noderef] <asn:1> *to
>> net/qrtr/qrtr.c:1119:22: sparse: got int *__pu_addr
net/qrtr/qrtr.c:1125:22: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int *__pu_addr @@ got int [noderef] <asnint *__pu_addr @@
net/qrtr/qrtr.c:1125:22: sparse: expected int *__pu_addr
net/qrtr/qrtr.c:1125:22: sparse: got int [noderef] <asn:1> *
net/qrtr/qrtr.c:1125:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got :1> *to @@
net/qrtr/qrtr.c:1125:22: sparse: expected void [noderef] <asn:1> *to
net/qrtr/qrtr.c:1125:22: sparse: got int *__pu_addr
vim +1119 net/qrtr/qrtr.c
bdabad3e363d825 Courtney Cavin 2016-05-06 1100
bdabad3e363d825 Courtney Cavin 2016-05-06 1101 static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
bdabad3e363d825 Courtney Cavin 2016-05-06 1102 {
bdabad3e363d825 Courtney Cavin 2016-05-06 1103 void __user *argp = (void __user *)arg;
bdabad3e363d825 Courtney Cavin 2016-05-06 1104 struct qrtr_sock *ipc = qrtr_sk(sock->sk);
bdabad3e363d825 Courtney Cavin 2016-05-06 1105 struct sock *sk = sock->sk;
bdabad3e363d825 Courtney Cavin 2016-05-06 1106 struct sockaddr_qrtr *sq;
bdabad3e363d825 Courtney Cavin 2016-05-06 1107 struct sk_buff *skb;
bdabad3e363d825 Courtney Cavin 2016-05-06 1108 struct ifreq ifr;
bdabad3e363d825 Courtney Cavin 2016-05-06 1109 long len = 0;
bdabad3e363d825 Courtney Cavin 2016-05-06 1110 int rc = 0;
bdabad3e363d825 Courtney Cavin 2016-05-06 1111
bdabad3e363d825 Courtney Cavin 2016-05-06 1112 lock_sock(sk);
bdabad3e363d825 Courtney Cavin 2016-05-06 1113
bdabad3e363d825 Courtney Cavin 2016-05-06 1114 switch (cmd) {
bdabad3e363d825 Courtney Cavin 2016-05-06 1115 case TIOCOUTQ:
bdabad3e363d825 Courtney Cavin 2016-05-06 1116 len = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
bdabad3e363d825 Courtney Cavin 2016-05-06 1117 if (len < 0)
bdabad3e363d825 Courtney Cavin 2016-05-06 1118 len = 0;
bdabad3e363d825 Courtney Cavin 2016-05-06 @1119 rc = put_user(len, (int __user *)argp);
bdabad3e363d825 Courtney Cavin 2016-05-06 1120 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1121 case TIOCINQ:
bdabad3e363d825 Courtney Cavin 2016-05-06 1122 skb = skb_peek(&sk->sk_receive_queue);
bdabad3e363d825 Courtney Cavin 2016-05-06 1123 if (skb)
f507a9b6e63b9f4 Bjorn Andersson 2017-10-10 1124 len = skb->len;
bdabad3e363d825 Courtney Cavin 2016-05-06 1125 rc = put_user(len, (int __user *)argp);
bdabad3e363d825 Courtney Cavin 2016-05-06 1126 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1127 case SIOCGIFADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1128 if (copy_from_user(&ifr, argp, sizeof(ifr))) {
bdabad3e363d825 Courtney Cavin 2016-05-06 1129 rc = -EFAULT;
bdabad3e363d825 Courtney Cavin 2016-05-06 1130 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1131 }
bdabad3e363d825 Courtney Cavin 2016-05-06 1132
bdabad3e363d825 Courtney Cavin 2016-05-06 1133 sq = (struct sockaddr_qrtr *)&ifr.ifr_addr;
bdabad3e363d825 Courtney Cavin 2016-05-06 1134 *sq = ipc->us;
bdabad3e363d825 Courtney Cavin 2016-05-06 1135 if (copy_to_user(argp, &ifr, sizeof(ifr))) {
bdabad3e363d825 Courtney Cavin 2016-05-06 1136 rc = -EFAULT;
bdabad3e363d825 Courtney Cavin 2016-05-06 1137 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1138 }
bdabad3e363d825 Courtney Cavin 2016-05-06 1139 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1140 case SIOCADDRT:
bdabad3e363d825 Courtney Cavin 2016-05-06 1141 case SIOCDELRT:
bdabad3e363d825 Courtney Cavin 2016-05-06 1142 case SIOCSIFADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1143 case SIOCGIFDSTADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1144 case SIOCSIFDSTADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1145 case SIOCGIFBRDADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1146 case SIOCSIFBRDADDR:
bdabad3e363d825 Courtney Cavin 2016-05-06 1147 case SIOCGIFNETMASK:
bdabad3e363d825 Courtney Cavin 2016-05-06 1148 case SIOCSIFNETMASK:
bdabad3e363d825 Courtney Cavin 2016-05-06 1149 rc = -EINVAL;
bdabad3e363d825 Courtney Cavin 2016-05-06 1150 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1151 default:
bdabad3e363d825 Courtney Cavin 2016-05-06 1152 rc = -ENOIOCTLCMD;
bdabad3e363d825 Courtney Cavin 2016-05-06 1153 break;
bdabad3e363d825 Courtney Cavin 2016-05-06 1154 }
bdabad3e363d825 Courtney Cavin 2016-05-06 1155
bdabad3e363d825 Courtney Cavin 2016-05-06 1156 release_sock(sk);
bdabad3e363d825 Courtney Cavin 2016-05-06 1157
bdabad3e363d825 Courtney Cavin 2016-05-06 1158 return rc;
bdabad3e363d825 Courtney Cavin 2016-05-06 1159 }
bdabad3e363d825 Courtney Cavin 2016-05-06 1160
:::::: The code at line 1119 was first introduced by commit
:::::: bdabad3e363d825ddf9679dd431cca0b2c30f881 net: Add Qualcomm IPC router
:::::: TO: Courtney Cavin <courtney.cavin(a)sonymobile.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [RFC, WIP, v5 10/10] media: vidtv: Add a MPEG Transport Stream Multiplexer
by kbuild test robot
Hi "Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on next-20200515]
[cannot apply to v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-W-S-Almeida/media-vidtv-i...
base: git://linuxtv.org/media_tree.git master
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from drivers/media/test-drivers/vidtv/vidtv_pes.c:18:
drivers/media/test-drivers/vidtv/vidtv_pes.c: In function 'vidtv_pes_write_pts_dts':
>> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative]
37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
>> drivers/media/test-drivers/vidtv/vidtv_pes.c:96:33: note: in expansion of macro 'GENMASK'
96 | pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30;
| ^~~~~~~
>> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative]
37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/media/test-drivers/vidtv/vidtv_pes.c:105:33: note: in expansion of macro 'GENMASK'
105 | pts_dts.dts1 = (args.dts & GENMASK(32, 30)) >> 30;
| ^~~~~~~
>> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative]
37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/media/test-drivers/vidtv/vidtv_pes.c:117:33: note: in expansion of macro 'GENMASK'
117 | pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30;
| ^~~~~~~
vim +37 include/linux/bits.h
295bcca84916cb Rikard Falkeborn 2020-04-06 34
295bcca84916cb Rikard Falkeborn 2020-04-06 35 #define __GENMASK(h, l) \
95b980d62d52c4 Masahiro Yamada 2019-07-16 36 (((~UL(0)) - (UL(1) << (l)) + 1) & \
95b980d62d52c4 Masahiro Yamada 2019-07-16 @37 (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
295bcca84916cb Rikard Falkeborn 2020-04-06 38 #define GENMASK(h, l) \
295bcca84916cb Rikard Falkeborn 2020-04-06 39 (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
8bd9cb51daac89 Will Deacon 2018-06-19 40
:::::: The code at line 37 was first introduced by commit
:::::: 95b980d62d52c4c1768ee719e8db3efe27ef52b2 linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
:::::: TO: Masahiro Yamada <yamada.masahiro(a)socionext.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [RFC, WIP, v5 04/10] media: vidtv: add a bridge driver
by kbuild test robot
Hi "Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on next-20200515]
[cannot apply to v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-W-S-Almeida/media-vidtv-i...
base: git://linuxtv.org/media_tree.git master
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/media/test-drivers/vidtv/vidtv_bridg.c:199:42: sparse: sparse: Using plain integer as NULL pointer
drivers/media/test-drivers/vidtv/vidtv_bridg.c:218:42: sparse: sparse: Using plain integer as NULL pointer
vim +199 drivers/media/test-drivers/vidtv/vidtv_bridg.c
196
197 static void vidtv_bridge_probe_demod(struct vidtv_dvb *dvb, u32 n)
198 {
> 199 struct vidtv_demod_config cfg = {0};
200 struct dvb_frontend *fe = NULL;
201
202 cfg.frontend = &fe;
203 cfg.drop_tslock_prob_on_low_snr = drop_tslock_prob_on_low_snr;
204 cfg.recover_tslock_prob_on_good_snr = recover_tslock_prob_on_good_snr;
205
206 dvb->i2c_client_demod[n] = dvb_module_probe("vidtv_demod",
207 NULL,
208 dvb->i2c_adapter,
209 DEMOD_DEFAULT_ADDR,
210 &cfg);
211
212 /* retrieve a pointer to struct dvb_frontend */
213 dvb->fe[n] = *cfg.frontend;
214 }
215
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH v10 2/3] mfd: add Gateworks System Controller core driver
by kbuild test robot
Hi Tim,
I love your patch! Yet something to improve:
[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on hwmon/hwmon-next linus/master v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Tim-Harvey/Add-support-for-the-G...
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 9d4cf5bd421fb6467ff5f00e26a37527246dd4d6)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/mfd/gateworks-gsc.c:270:14: error: use of undeclared identifier 'gsc_id_table'
.id_table = gsc_id_table,
^
1 error generated.
vim +/gsc_id_table +270 drivers/mfd/gateworks-gsc.c
264
265 static struct i2c_driver gsc_driver = {
266 .driver = {
267 .name = "gateworks-gsc",
268 .of_match_table = gsc_of_match,
269 },
> 270 .id_table = gsc_id_table,
271 .probe_new = gsc_probe,
272 .remove = gsc_remove,
273 };
274 module_i2c_driver(gsc_driver);
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[meghadey-crypto:gcm_vaes 3/3] arch/x86/crypto/aesni-intel_glue.c:813:32: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32 {aka unsigned int}'
by kbuild test robot
tree: https://github.com/meghadey/crypto gcm_vaes
head: 170448f9b4611af0d2d219a0888173f0ab9b290b
commit: 170448f9b4611af0d2d219a0888173f0ab9b290b [3/3] working
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 170448f9b4611af0d2d219a0888173f0ab9b290b
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
arch/x86/crypto/aesni-intel_glue.c: In function 'gcmaes_crypt_by_sg':
>> arch/x86/crypto/aesni-intel_glue.c:813:32: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'u32 {aka unsigned int}' [-Wformat=]
printk("Megha KeyLength %lx left %lxn", ctx->key_length, left);
~~^ ~~~~~~~~~~~~~~~
%x
vim +813 arch/x86/crypto/aesni-intel_glue.c
718
719 static int gcmaes_crypt_by_sg(bool enc, struct aead_request *req,
720 unsigned int assoclen, u8 *hash_subkey,
721 u8 *iv, void *aes_ctx)
722 {
723 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
724 unsigned long auth_tag_len = crypto_aead_authsize(tfm);
725 const struct aesni_gcm_tfm_s *gcm_tfm = aesni_gcm_tfm;
726 struct gcm_context_data data AESNI_ALIGN_ATTR;
727 struct scatter_walk dst_sg_walk = {};
728 unsigned long left = req->cryptlen;
729 unsigned long len, srclen, dstlen;
730 struct scatter_walk assoc_sg_walk;
731 struct scatter_walk src_sg_walk;
732 struct scatterlist src_start[2];
733 struct scatterlist dst_start[2];
734 struct scatterlist *src_sg;
735 struct scatterlist *dst_sg;
736 u8 *src, *dst, *assoc;
737 u8 *assocmem = NULL;
738 u8 authTag[16];
739 int i;
740 struct crypto_aes_ctx *ctx;
741
742 if (!enc)
743 left -= auth_tag_len;
744
745 if (left < AVX_GEN4_OPTSIZE && gcm_tfm == &aesni_gcm_tfm_avx_gen4)
746 gcm_tfm = &aesni_gcm_tfm_avx_gen2;
747 if (left < AVX_GEN2_OPTSIZE && gcm_tfm == &aesni_gcm_tfm_avx_gen2)
748 gcm_tfm = &aesni_gcm_tfm_sse;
749
750 /* Linearize assoc, if not already linear */
751 if (req->src->length >= assoclen && req->src->length &&
752 (!PageHighMem(sg_page(req->src)) ||
753 req->src->offset + req->src->length <= PAGE_SIZE)) {
754 scatterwalk_start(&assoc_sg_walk, req->src);
755 assoc = scatterwalk_map(&assoc_sg_walk);
756 } else {
757 /* assoc can be any length, so must be on heap */
758 assocmem = kmalloc(assoclen, GFP_ATOMIC);
759 if (unlikely(!assocmem))
760 return -ENOMEM;
761 assoc = assocmem;
762
763 scatterwalk_map_and_copy(assoc, req->src, 0, assoclen, 0);
764 }
765
766 if (left) {
767 src_sg = scatterwalk_ffwd(src_start, req->src, req->assoclen);
768 scatterwalk_start(&src_sg_walk, src_sg);
769 if (req->src != req->dst) {
770 dst_sg = scatterwalk_ffwd(dst_start, req->dst,
771 req->assoclen);
772 scatterwalk_start(&dst_sg_walk, dst_sg);
773 }
774 }
775
776 kernel_fpu_begin();
777 ctx = (struct crypto_aes_ctx*) aes_ctx;
778 memcpy(data.hash_keys , hash_subkey, 16*48);
779 gcm_tfm->init(aes_ctx, &data, iv,
780 hash_subkey, assoc, assoclen);
781 if (req->src != req->dst) {
782 while (left) {
783 src = scatterwalk_map(&src_sg_walk);
784 dst = scatterwalk_map(&dst_sg_walk);
785 srclen = scatterwalk_clamp(&src_sg_walk, left);
786 dstlen = scatterwalk_clamp(&dst_sg_walk, left);
787 len = min(srclen, dstlen);
788 if (len) {
789 if (enc) {
790 gcm_tfm->enc_update(aes_ctx, &data,
791 dst, src, len);
792 } else
793 gcm_tfm->dec_update(aes_ctx, &data,
794 dst, src, len);
795 }
796 left -= len;
797
798 scatterwalk_unmap(src);
799 scatterwalk_unmap(dst);
800 scatterwalk_advance(&src_sg_walk, len);
801 scatterwalk_advance(&dst_sg_walk, len);
802 scatterwalk_done(&src_sg_walk, 0, left);
803 scatterwalk_done(&dst_sg_walk, 1, left);
804 }
805 } else {
806 while (left) {
807 dst = src = scatterwalk_map(&src_sg_walk);
808 len = scatterwalk_clamp(&src_sg_walk, left);
809 if (len) {
810 if (enc) {
811 gcm_tfm->enc_update(aes_ctx, &data,
812 src, src, len);
> 813 printk("Megha KeyLength %lx left %lx\n", ctx->key_length, left);
814 printk("Megha cipher:\n");
815 for(i=0;i<8;i++)
816 printk("%lx ", *(unsigned long*)(src + (i*8)));
817 printk("\n");
818 } else {
819 gcm_tfm->dec_update(aes_ctx, &data,
820 src, src, len);
821 printk("Megha plaintext:\n");
822 for(i=0;i<8;i++)
823 printk("%lx ", *(unsigned long*)(src + (i*8)));
824 printk("\n");
825 }
826 }
827 left -= len;
828 scatterwalk_unmap(src);
829 scatterwalk_advance(&src_sg_walk, len);
830 scatterwalk_done(&src_sg_walk, 1, left);
831 }
832 }
833 gcm_tfm->finalize(aes_ctx, &data, authTag, auth_tag_len);
834 printk("Megha tag:\n");
835 for(i=0;i<2;i++)
836 printk("%lx ", *(unsigned long*)(authTag + (i*8)));
837 printk("\n");
838 kernel_fpu_end();
839
840 if (!assocmem)
841 scatterwalk_unmap(assoc);
842 else
843 kfree(assocmem);
844
845 if (!enc) {
846 u8 authTagMsg[16];
847
848 /* Copy out original authTag */
849 scatterwalk_map_and_copy(authTagMsg, req->src,
850 req->assoclen + req->cryptlen -
851 auth_tag_len,
852 auth_tag_len, 0);
853
854 /* Compare generated tag with passed in tag. */
855 return crypto_memneq(authTagMsg, authTag, auth_tag_len) ?
856 -EBADMSG : 0;
857 }
858
859 /* Copy in the authTag */
860 scatterwalk_map_and_copy(authTag, req->dst,
861 req->assoclen + req->cryptlen,
862 auth_tag_len, 1);
863
864 return 0;
865 }
866
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH v2 net-next 3/7] dpaa2-eth: Distribute ingress frames based on VLAN prio
by kbuild test robot
Hi Ioana,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on sparc-next/master linus/master v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ioana-Ciornei/dpaa2-eth-add-supp...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d00f26b623333f2419f4c3b95ff11c8b1bb96f56
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2728:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
>> drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2728:15: sparse: expected unsigned short [usertype]
>> drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2728:15: sparse: got restricted __be16 [usertype]
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2747:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got resunsigned short [usertype] @@
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2747:29: sparse: expected unsigned short [usertype]
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2747:29: sparse: got restricted __be16 [usertype]
vim +2728 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
2664
2665 /* Configure ingress classification based on VLAN PCP */
2666 static int set_vlan_qos(struct dpaa2_eth_priv *priv)
2667 {
2668 struct device *dev = priv->net_dev->dev.parent;
2669 struct dpkg_profile_cfg kg_cfg = {0};
2670 struct dpni_qos_tbl_cfg qos_cfg = {0};
2671 struct dpni_rule_cfg key_params;
2672 void *dma_mem, *key;
2673 u8 key_size = 2; /* VLAN TCI field */
2674 int i, pcp, err;
2675 u16 *mask;
2676
2677 /* VLAN-based classification only makes sense if we have multiple
2678 * traffic classes.
2679 * Also, we need to extract just the 3-bit PCP field from the VLAN
2680 * header and we can only do that by using a mask
2681 */
2682 if (dpaa2_eth_tc_count(priv) == 1 || !dpaa2_eth_fs_mask_enabled(priv)) {
2683 dev_dbg(dev, "VLAN-based QoS classification not supported\n");
2684 return -EOPNOTSUPP;
2685 }
2686
2687 dma_mem = kzalloc(DPAA2_CLASSIFIER_DMA_SIZE, GFP_KERNEL);
2688 if (!dma_mem)
2689 return -ENOMEM;
2690
2691 kg_cfg.num_extracts = 1;
2692 kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_HDR;
2693 kg_cfg.extracts[0].extract.from_hdr.prot = NET_PROT_VLAN;
2694 kg_cfg.extracts[0].extract.from_hdr.type = DPKG_FULL_FIELD;
2695 kg_cfg.extracts[0].extract.from_hdr.field = NH_FLD_VLAN_TCI;
2696
2697 err = dpni_prepare_key_cfg(&kg_cfg, dma_mem);
2698 if (err) {
2699 dev_err(dev, "dpni_prepare_key_cfg failed\n");
2700 goto out_free_tbl;
2701 }
2702
2703 /* set QoS table */
2704 qos_cfg.default_tc = 0;
2705 qos_cfg.discard_on_miss = 0;
2706 qos_cfg.key_cfg_iova = dma_map_single(dev, dma_mem,
2707 DPAA2_CLASSIFIER_DMA_SIZE,
2708 DMA_TO_DEVICE);
2709 if (dma_mapping_error(dev, qos_cfg.key_cfg_iova)) {
2710 dev_err(dev, "QoS table DMA mapping failed\n");
2711 err = -ENOMEM;
2712 goto out_free_tbl;
2713 }
2714
2715 err = dpni_set_qos_table(priv->mc_io, 0, priv->mc_token, &qos_cfg);
2716 if (err) {
2717 dev_err(dev, "dpni_set_qos_table failed\n");
2718 goto out_unmap_tbl;
2719 }
2720
2721 /* Add QoS table entries */
2722 key = kzalloc(key_size * 2, GFP_KERNEL);
2723 if (!key) {
2724 err = -ENOMEM;
2725 goto out_unmap_tbl;
2726 }
2727 mask = key + key_size;
> 2728 *mask = cpu_to_be16(VLAN_PRIO_MASK);
2729
2730 key_params.key_iova = dma_map_single(dev, key, key_size * 2,
2731 DMA_TO_DEVICE);
2732 if (dma_mapping_error(dev, key_params.key_iova)) {
2733 dev_err(dev, "Qos table entry DMA mapping failed\n");
2734 err = -ENOMEM;
2735 goto out_free_key;
2736 }
2737
2738 key_params.mask_iova = key_params.key_iova + key_size;
2739 key_params.key_size = key_size;
2740
2741 /* We add rules for PCP-based distribution starting with highest
2742 * priority (VLAN PCP = 7). If this DPNI doesn't have enough traffic
2743 * classes to accommodate all priority levels, the lowest ones end up
2744 * on TC 0 which was configured as default
2745 */
2746 for (i = dpaa2_eth_tc_count(priv) - 1, pcp = 7; i >= 0; i--, pcp--) {
2747 *(u16 *)key = cpu_to_be16(pcp << VLAN_PRIO_SHIFT);
2748 dma_sync_single_for_device(dev, key_params.key_iova,
2749 key_size * 2, DMA_TO_DEVICE);
2750
2751 err = dpni_add_qos_entry(priv->mc_io, 0, priv->mc_token,
2752 &key_params, i, i);
2753 if (err) {
2754 dev_err(dev, "dpni_add_qos_entry failed\n");
2755 dpni_clear_qos_table(priv->mc_io, 0, priv->mc_token);
2756 goto out_unmap_key;
2757 }
2758 }
2759
2760 priv->vlan_cls_enabled = true;
2761
2762 /* Table and key memory is not persistent, clean everything up after
2763 * configuration is finished
2764 */
2765 out_unmap_key:
2766 dma_unmap_single(dev, key_params.key_iova, key_size * 2, DMA_TO_DEVICE);
2767 out_free_key:
2768 kfree(key);
2769 out_unmap_tbl:
2770 dma_unmap_single(dev, qos_cfg.key_cfg_iova, DPAA2_CLASSIFIER_DMA_SIZE,
2771 DMA_TO_DEVICE);
2772 out_free_tbl:
2773 kfree(dma_mem);
2774
2775 return err;
2776 }
2777
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 812/9662] net/bluetooth/l2cap_sock.c:676:21: sparse: sparse: incorrect type in initializer (different address spaces)
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: bdecf38f228bcca73b31ada98b5b7ba1215eb9c9
commit: 3ee7b7cd83900bb711efadbf16fa096a615a1566 [812/9662] Bluetooth: Add BT_MODE socket option
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 3ee7b7cd83900bb711efadbf16fa096a615a1566
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
./arch/xtensa/include/generated/uapi/asm/unistd_32.h:393:41: sparse: sparse: no newline at end of file
net/bluetooth/l2cap_sock.c:428:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderefint const *__gu_addr @@
net/bluetooth/l2cap_sock.c:428:13: sparse: expected int const *__gu_addr
net/bluetooth/l2cap_sock.c:428:13: sparse: got int [noderef] <asn:1> *optlen
net/bluetooth/l2cap_sock.c:428:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got ] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:428:13: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:428:13: sparse: got int const *__gu_addr
net/bluetooth/l2cap_sock.c:503:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertunsigned int *__pu_addr @@
net/bluetooth/l2cap_sock.c:503:21: sparse: expected unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:503:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:503:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got ref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:503:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:503:21: sparse: got unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:553:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderefint const *__gu_addr @@
net/bluetooth/l2cap_sock.c:553:13: sparse: expected int const *__gu_addr
net/bluetooth/l2cap_sock.c:553:13: sparse: got int [noderef] <asn:1> *optlen
net/bluetooth/l2cap_sock.c:553:13: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got ] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:553:13: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:553:13: sparse: got int const *__gu_addr
net/bluetooth/l2cap_sock.c:589:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertunsigned int *__pu_addr @@
net/bluetooth/l2cap_sock.c:589:21: sparse: expected unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:589:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:589:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got ref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:589:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:589:21: sparse: got unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:596:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertunsigned int *__pu_addr @@
net/bluetooth/l2cap_sock.c:596:21: sparse: expected unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:596:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:596:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got ref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:596:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:596:21: sparse: got unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:618:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertunsigned int *__pu_addr @@
net/bluetooth/l2cap_sock.c:618:21: sparse: expected unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:618:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:618:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got ref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:618:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:618:21: sparse: got unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:633:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short *__pu_addr @@ got unsigned short [noderef] [useunsigned short *__pu_addr @@
net/bluetooth/l2cap_sock.c:633:21: sparse: expected unsigned short *__pu_addr
net/bluetooth/l2cap_sock.c:633:21: sparse: got unsigned short [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:633:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got deref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:633:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:633:21: sparse: got unsigned short *__pu_addr
net/bluetooth/l2cap_sock.c:643:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short *__pu_addr @@ got unsigned short [noderef] [useunsigned short *__pu_addr @@
net/bluetooth/l2cap_sock.c:643:21: sparse: expected unsigned short *__pu_addr
net/bluetooth/l2cap_sock.c:643:21: sparse: got unsigned short [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:643:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got deref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:643:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:643:21: sparse: got unsigned short *__pu_addr
net/bluetooth/l2cap_sock.c:655:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int *__pu_addr @@ got unsigned int [noderef] [usertunsigned int *__pu_addr @@
net/bluetooth/l2cap_sock.c:655:21: sparse: expected unsigned int *__pu_addr
net/bluetooth/l2cap_sock.c:655:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:655:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got ref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:655:21: sparse: expected void [noderef] <asn:1> *to
net/bluetooth/l2cap_sock.c:655:21: sparse: got unsigned int *__pu_addr
>> net/bluetooth/l2cap_sock.c:676:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char *__pu_addr @@ got unsigned char [noderef] [userunsigned char *__pu_addr @@
>> net/bluetooth/l2cap_sock.c:676:21: sparse: expected unsigned char *__pu_addr
net/bluetooth/l2cap_sock.c:676:21: sparse: got unsigned char [noderef] [usertype] <asn:1> *
>> net/bluetooth/l2cap_sock.c:676:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *to @@ got eref] <asn:1> *to @@
net/bluetooth/l2cap_sock.c:676:21: sparse: expected void [noderef] <asn:1> *to
>> net/bluetooth/l2cap_sock.c:676:21: sparse: got unsigned char *__pu_addr
net/bluetooth/l2cap_sock.c:785:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] unsigned int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:785:21: sparse: expected unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:785:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:785:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:785:21: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:785:21: sparse: got unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:942:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] unsigned int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:942:21: sparse: expected unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:942:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:942:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:942:21: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:942:21: sparse: got unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:957:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] unsigned int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:957:21: sparse: expected unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:957:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:957:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:957:21: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:957:21: sparse: got unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:1005:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] unsigned int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:1005:21: sparse: expected unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:1005:21: sparse: got unsigned int [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:1005:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:1005:21: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:1005:21: sparse: got unsigned int const *__gu_addr
net/bluetooth/l2cap_sock.c:1053:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const *__gu_addr @@ got unsigned short [noderefunsigned short const *__gu_addr @@
net/bluetooth/l2cap_sock.c:1053:21: sparse: expected unsigned short const *__gu_addr
net/bluetooth/l2cap_sock.c:1053:21: sparse: got unsigned short [noderef] [usertype] <asn:1> *
net/bluetooth/l2cap_sock.c:1053:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got st [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:1053:21: sparse: expected void const [noderef] <asn:1> *from
net/bluetooth/l2cap_sock.c:1053:21: sparse: got unsigned short const *__gu_addr
>> net/bluetooth/l2cap_sock.c:1084:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const *__gu_addr @@ got unsigned char [noderef]unsigned char const *__gu_addr @@
>> net/bluetooth/l2cap_sock.c:1084:21: sparse: expected unsigned char const *__gu_addr
net/bluetooth/l2cap_sock.c:1084:21: sparse: got unsigned char [noderef] [usertype] <asn:1> *
>> net/bluetooth/l2cap_sock.c:1084:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] <asn:1> *from @@ got t [noderef] <asn:1> *from @@
net/bluetooth/l2cap_sock.c:1084:21: sparse: expected void const [noderef] <asn:1> *from
>> net/bluetooth/l2cap_sock.c:1084:21: sparse: got unsigned char const *__gu_addr
vim +676 net/bluetooth/l2cap_sock.c
534
535 static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname,
536 char __user *optval, int __user *optlen)
537 {
538 struct sock *sk = sock->sk;
539 struct l2cap_chan *chan = l2cap_pi(sk)->chan;
540 struct bt_security sec;
541 struct bt_power pwr;
542 u32 phys;
543 int len, mode, err = 0;
544
545 BT_DBG("sk %p", sk);
546
547 if (level == SOL_L2CAP)
548 return l2cap_sock_getsockopt_old(sock, optname, optval, optlen);
549
550 if (level != SOL_BLUETOOTH)
551 return -ENOPROTOOPT;
552
553 if (get_user(len, optlen))
554 return -EFAULT;
555
556 lock_sock(sk);
557
558 switch (optname) {
559 case BT_SECURITY:
560 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED &&
561 chan->chan_type != L2CAP_CHAN_FIXED &&
562 chan->chan_type != L2CAP_CHAN_RAW) {
563 err = -EINVAL;
564 break;
565 }
566
567 memset(&sec, 0, sizeof(sec));
568 if (chan->conn) {
569 sec.level = chan->conn->hcon->sec_level;
570
571 if (sk->sk_state == BT_CONNECTED)
572 sec.key_size = chan->conn->hcon->enc_key_size;
573 } else {
574 sec.level = chan->sec_level;
575 }
576
577 len = min_t(unsigned int, len, sizeof(sec));
578 if (copy_to_user(optval, (char *) &sec, len))
579 err = -EFAULT;
580
581 break;
582
583 case BT_DEFER_SETUP:
584 if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
585 err = -EINVAL;
586 break;
587 }
588
589 if (put_user(test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags),
590 (u32 __user *) optval))
591 err = -EFAULT;
592
593 break;
594
595 case BT_FLUSHABLE:
596 if (put_user(test_bit(FLAG_FLUSHABLE, &chan->flags),
597 (u32 __user *) optval))
598 err = -EFAULT;
599
600 break;
601
602 case BT_POWER:
603 if (sk->sk_type != SOCK_SEQPACKET && sk->sk_type != SOCK_STREAM
604 && sk->sk_type != SOCK_RAW) {
605 err = -EINVAL;
606 break;
607 }
608
609 pwr.force_active = test_bit(FLAG_FORCE_ACTIVE, &chan->flags);
610
611 len = min_t(unsigned int, len, sizeof(pwr));
612 if (copy_to_user(optval, (char *) &pwr, len))
613 err = -EFAULT;
614
615 break;
616
617 case BT_CHANNEL_POLICY:
618 if (put_user(chan->chan_policy, (u32 __user *) optval))
619 err = -EFAULT;
620 break;
621
622 case BT_SNDMTU:
623 if (!bdaddr_type_is_le(chan->src_type)) {
624 err = -EINVAL;
625 break;
626 }
627
628 if (sk->sk_state != BT_CONNECTED) {
629 err = -ENOTCONN;
630 break;
631 }
632
633 if (put_user(chan->omtu, (u16 __user *) optval))
634 err = -EFAULT;
635 break;
636
637 case BT_RCVMTU:
638 if (!bdaddr_type_is_le(chan->src_type)) {
639 err = -EINVAL;
640 break;
641 }
642
643 if (put_user(chan->imtu, (u16 __user *) optval))
644 err = -EFAULT;
645 break;
646
647 case BT_PHY:
648 if (sk->sk_state != BT_CONNECTED) {
649 err = -ENOTCONN;
650 break;
651 }
652
653 phys = hci_conn_get_phy(chan->conn->hcon);
654
655 if (put_user(phys, (u32 __user *) optval))
656 err = -EFAULT;
657 break;
658
659 case BT_MODE:
660 if (!enable_ecred) {
661 err = -ENOPROTOOPT;
662 break;
663 }
664
665 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
666 err = -EINVAL;
667 break;
668 }
669
670 mode = l2cap_get_mode(chan);
671 if (mode < 0) {
672 err = mode;
673 break;
674 }
675
> 676 if (put_user(mode, (u8 __user *) optval))
677 err = -EFAULT;
678 break;
679
680 default:
681 err = -ENOPROTOOPT;
682 break;
683 }
684
685 release_sock(sk);
686 return err;
687 }
688
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[peterz-queue:x86/module 3/5] module.c:undefined reference to `split_lock_enabled'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/module
head: 487b4950b64b32b154ca2912640f1acd78bfafe0
commit: 4876245af0b44d8b6666d9cb9dbf2f0dd1e33c96 [3/5] x86,module: Detect VMX vs SLD conflicts
config: um-defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 4876245af0b44d8b6666d9cb9dbf2f0dd1e33c96
# save the attached .config to linux build tree
make ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
/usr/bin/ld: arch/x86/um/../kernel/module.o: in function `decode_module':
>> module.c:(.text+0x25): undefined reference to `split_lock_enabled'
>> /usr/bin/ld: module.c:(.text+0x37): undefined reference to `insn_init'
>> /usr/bin/ld: module.c:(.text+0x69): undefined reference to `insn_get_length'
>> /usr/bin/ld: module.c:(.text+0x14e): undefined reference to `insn_get_prefixes'
collect2: error: ld returned 1 exit status
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-sof-driver:pr/1501 8/17] include/sound/sof/rpmsg.h:15:10: fatal error: linux/virtio_rpmsg.h: No such file or directory
by kbuild test robot
tree: https://github.com/thesofproject/linux pr/1501
head: 01639e2c756fdbad1e1a923c82880e85dfc60f34
commit: fa5b33d81bbf40a056671b4e66bc28d3e5204ae1 [8/17] ASoC: SOF: [VIRTIO] add a vhost driver: sound part
config: arm64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: aarch64-linux-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
git checkout fa5b33d81bbf40a056671b4e66bc28d3e5204ae1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the linux-sof-driver/pr/1501 HEAD 01639e2c756fdbad1e1a923c82880e85dfc60f34 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from sound/soc/sof/ipc.c:17:
>> include/sound/sof/rpmsg.h:15:10: fatal error: linux/virtio_rpmsg.h: No such file or directory
15 | #include <linux/virtio_rpmsg.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
vim +15 include/sound/sof/rpmsg.h
e450abbce4f7cad Guennadi Liakhovetski 2019-11-25 13
fa5b33d81bbf40a Guennadi Liakhovetski 2020-01-31 14 #include <linux/list.h>
e450abbce4f7cad Guennadi Liakhovetski 2019-11-25 @15 #include <linux/virtio_rpmsg.h>
e450abbce4f7cad Guennadi Liakhovetski 2019-11-25 16
:::::: The code at line 15 was first introduced by commit
:::::: e450abbce4f7cad3056332faab2280dbd1942b5e ASoC: SOF: [VIRTIO] add an RPMsg VirtIO DSP driver
:::::: TO: Guennadi Liakhovetski <guennadi.liakhovetski(a)linux.intel.com>
:::::: CC: Guennadi Liakhovetski <guennadi.liakhovetski(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months