All of lore.kernel.org
 help / color / mirror / Atom feed
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-23 20:29 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-23 20:29 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-25 15:00 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-25 15:00 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-25 13:49 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-25 13:49 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-25  1:41 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-25  1:41 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-24 14:12 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-24 14:12 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-24  3:19 kernel test robot
  2020-12-24  7:35 ` Lee Jones
  0 siblings, 1 reply; 13+ messages in thread
From: kernel test robot @ 2020-12-24  3:19 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-23 23:25 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-23 23:25 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-23 22:14 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2020-12-23 22:14 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: parisc-randconfig-s032-20201221 (attached as .config)
compiler: hppa-linux-gcc (GCC) 5.5.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-184-g1b896707-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *dest @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *dest
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   In file included from arch/parisc/include/asm/bug.h:92:0,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/parisc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:18,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from net/rxrpc/ar-key.c:15:
   include/linux/cpumask.h: In function 'cpumask_check':
   include/linux/cpumask.h:116:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     WARN_ON_ONCE(cpu >= nr_cpumask_bits);
                      ^
   include/asm-generic/bug.h:112:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   23-                           ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   arch/parisc/include/asm/uaccess.h: In function 'copy_from_user':
   arch/parisc/include/asm/uaccess.h:251:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n))
                                                                  ^
   include/linux/compiler.h:175:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   In file included from arch/parisc/include/asm/tlbflush.h:7:0,
                    from arch/parisc/include/asm/cacheflush.h:6,
                    from arch/parisc/include/asm/dma-mapping.h:5,
                    from include/linux/dma-mapping.h:82,
                    from include/linux/skbuff.h:32,
                    from net/rxrpc/ar-key.c:17:
   include/linux/sched.h: At top level:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);
                 ^
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from net/rxrpc/ar-key.c:15:
   include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
   include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^
   In file included from include/net/sock.h:51:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   In file included from include/net/sock.h:63:0,
                    from net/rxrpc/ar-key.c:22:
   include/linux/filter.h: In function 'bpf_needs_clear_a':
   include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
                   ^
   In file included from include/net/rtnetlink.h:5:0,
                    from include/net/neighbour.h:29,
                    from include/net/dst.h:17,
                    from include/net/sock.h:68,
                    from net/rxrpc/ar-key.c:22:
   include/net/netlink.h: In function 'nlmsg_ok':
   include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      nlh->nlmsg_len <= remaining);
                     ^
   include/net/netlink.h: In function 'nlmsg_parse':
   include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   include/net/netlink.h: In function 'nlmsg_validate':
   include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
                        ^
   In file included from include/net/neighbour.h:29:0,

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 19151 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-12-03  2:18 kernel test robot
  2020-12-03  7:35 ` Lee Jones
  0 siblings, 1 reply; 13+ messages in thread
From: kernel test robot @ 2020-12-03  2:18 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-queue
head:   0a7aab07b4f62b5083f2589e71ff60029240254e
commit: b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c [74/586] rxrpc: Fix rxkad token xdr encoding
config: sh-randconfig-s031-20201202 (attached as .config)
compiler: sh4-linux-gcc (GCC) 5.5.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-179-ga00755aa-dirty
        git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
        git fetch --no-tags lee-linaro google/android-3.18-queue
        git checkout b0b3266cbcbe8f9b81cb9b5b1e6cf656e774fc5c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh 

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


"sparse warnings: (new ones prefixed by >>)"
>> net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *__to @@     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr @@
   net/rxrpc/ar-key.c:1188:25: sparse:     expected void *__to
   net/rxrpc/ar-key.c:1188:25: sparse:     got restricted __be32 [noderef] [usertype] <asn:1> *[assigned] xdr
   net/rxrpc/ar-key.c:1188:25: sparse: sparse: cast removes address space '<asn:1>' of expression
   net/rxrpc/ar-key.c: note: in included file (through include/net/checksum.h, include/linux/skbuff.h):
   arch/sh/include/asm/uaccess.h:154:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void const [noderef] <asn:1> *from @@
   arch/sh/include/asm/uaccess.h:154:47: sparse:     expected void const *from
   arch/sh/include/asm/uaccess.h:154:47: sparse:     got void const [noderef] <asn:1> *from
   arch/sh/include/asm/uaccess.h:154:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const *from @@     got void const [noderef] <asn:1> *from @@
   arch/sh/include/asm/uaccess.h:154:47: sparse:     expected void const *from
   arch/sh/include/asm/uaccess.h:154:47: sparse:     got void const [noderef] <asn:1> *from
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   arch/sh/include/asm/uaccess.h:169:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got void [noderef] <asn:1> *to @@
   arch/sh/include/asm/uaccess.h:169:36: sparse:     expected void *to
   arch/sh/include/asm/uaccess.h:169:36: sparse:     got void [noderef] <asn:1> *to
   cc1: warning: arch/sh/include/cpu-sh2a: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/cpu-sh2: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/cpu-common: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/mach-common: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/cpu-sh2a: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/cpu-sh2: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/cpu-common: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/mach-common: No such file or directory [-Wmissing-include-dirs]
   In file included from net/rxrpc/ar-key.c:17:0:
   include/linux/skbuff.h: In function 'skb_can_coalesce':
   include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             off == frag->page_offset + skb_frag_size(frag);

vim +1188 net/rxrpc/ar-key.c

  1129	
  1130		if (!buffer || buflen < size)
  1131			return size;
  1132	
  1133		xdr = (__be32 __user *) buffer;
  1134		zero = 0;
  1135	#define ENCODE(x)				\
  1136		do {					\
  1137			__be32 y = htonl(x);		\
  1138			if (put_user(y, xdr++) < 0)	\
  1139				goto fault;		\
  1140		} while(0)
  1141	#define ENCODE_DATA(l, s)						\
  1142		do {								\
  1143			u32 _l = (l);						\
  1144			ENCODE(l);						\
  1145			if (copy_to_user(xdr, (s), _l) != 0)			\
  1146				goto fault;					\
  1147			if (_l & 3 &&						\
  1148			    copy_to_user((u8 __user *)xdr + _l, &zero, 4 - (_l & 3)) != 0) \
  1149				goto fault;					\
  1150			xdr += (_l + 3) >> 2;					\
  1151		} while(0)
  1152	#define ENCODE_BYTES(l, s)						\
  1153		do {								\
  1154			u32 _l = (l);						\
  1155			memcpy(xdr, (s), _l);					\
  1156			if (_l & 3)						\
  1157				memcpy((u8 *)xdr + _l, &zero, 4 - (_l & 3));	\
  1158			xdr += (_l + 3) >> 2;					\
  1159		} while(0)
  1160	#define ENCODE64(x)					\
  1161		do {						\
  1162			__be64 y = cpu_to_be64(x);		\
  1163			if (copy_to_user(xdr, &y, 8) != 0)	\
  1164				goto fault;			\
  1165			xdr += 8 >> 2;				\
  1166		} while(0)
  1167	#define ENCODE_STR(s)				\
  1168		do {					\
  1169			const char *_s = (s);		\
  1170			ENCODE_DATA(strlen(_s), _s);	\
  1171		} while(0)
  1172	
  1173		ENCODE(0);					/* flags */
  1174		ENCODE_DATA(cnlen, key->description + 4);	/* cellname */
  1175		ENCODE(ntoks);
  1176	
  1177		tok = 0;
  1178		for (token = key->payload.data; token; token = token->next) {
  1179			toksize = toksizes[tok++];
  1180			ENCODE(toksize);
  1181			oldxdr = xdr;
  1182			ENCODE(token->security_index);
  1183	
  1184			switch (token->security_index) {
  1185			case RXRPC_SECURITY_RXKAD:
  1186				ENCODE(token->kad->vice_id);
  1187				ENCODE(token->kad->kvno);
> 1188				ENCODE_BYTES(8, token->kad->session_key);
  1189				ENCODE(token->kad->start);
  1190				ENCODE(token->kad->expiry);
  1191				ENCODE(token->kad->primary_flag);
  1192				ENCODE_DATA(token->kad->ticket_len, token->kad->ticket);
  1193				break;
  1194	
  1195			case RXRPC_SECURITY_RXK5:
  1196				princ = &token->k5->client;
  1197				ENCODE(princ->n_name_parts);
  1198				for (loop = 0; loop < princ->n_name_parts; loop++)
  1199					ENCODE_STR(princ->name_parts[loop]);
  1200				ENCODE_STR(princ->realm);
  1201	
  1202				princ = &token->k5->server;
  1203				ENCODE(princ->n_name_parts);
  1204				for (loop = 0; loop < princ->n_name_parts; loop++)
  1205					ENCODE_STR(princ->name_parts[loop]);
  1206				ENCODE_STR(princ->realm);
  1207	
  1208				ENCODE(token->k5->session.tag);
  1209				ENCODE_DATA(token->k5->session.data_len,
  1210					    token->k5->session.data);
  1211	
  1212				ENCODE64(token->k5->authtime);
  1213				ENCODE64(token->k5->starttime);
  1214				ENCODE64(token->k5->endtime);
  1215				ENCODE64(token->k5->renew_till);
  1216				ENCODE(token->k5->is_skey);
  1217				ENCODE(token->k5->flags);
  1218	
  1219				ENCODE(token->k5->n_addresses);
  1220				for (loop = 0; loop < token->k5->n_addresses; loop++) {
  1221					ENCODE(token->k5->addresses[loop].tag);
  1222					ENCODE_DATA(token->k5->addresses[loop].data_len,
  1223						    token->k5->addresses[loop].data);
  1224				}
  1225	
  1226				ENCODE_DATA(token->k5->ticket_len, token->k5->ticket);
  1227				ENCODE_DATA(token->k5->ticket2_len, token->k5->ticket2);
  1228	
  1229				ENCODE(token->k5->n_authdata);
  1230				for (loop = 0; loop < token->k5->n_authdata; loop++) {
  1231					ENCODE(token->k5->authdata[loop].tag);
  1232					ENCODE_DATA(token->k5->authdata[loop].data_len,
  1233						    token->k5->authdata[loop].data);
  1234				}
  1235				break;
  1236	
  1237			default:
  1238				BUG();
  1239				break;
  1240			}
  1241	
  1242			ASSERTCMP((unsigned long)xdr - (unsigned long)oldxdr, ==,
  1243				  toksize);
  1244		}
  1245	

---
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: 17312 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-25 15:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 20:29 [lee-linaro:google/android-3.18-queue 74/586] net/rxrpc/ar-key.c:1188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-12-25 15:00 kernel test robot
2020-12-25 13:49 kernel test robot
2020-12-25  1:41 kernel test robot
2020-12-24 14:12 kernel test robot
2020-12-24  3:19 kernel test robot
2020-12-24  7:35 ` Lee Jones
2020-12-25 14:39   ` Philip Li
2020-12-23 23:25 kernel test robot
2020-12-23 22:14 kernel test robot
2020-12-03  2:18 kernel test robot
2020-12-03  7:35 ` Lee Jones
2020-12-03  8:49   ` Chen, Rong A

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.