lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201701131735.YZjI6jyI%fengguang.wu@intel.com>
Date:   Fri, 13 Jan 2017 17:22:55 +0800
From:   kbuild test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     kbuild-all@...org, arnd@...db.de, dhowells@...hat.com,
        linux-kernel@...r.kernel.org, ruchandani.tina@...il.com,
        linux-afs@...ts.infradead.org
Subject: Re: [PATCH 1/2] afs: Move UUID struct to linux/uuid.h

Hi David,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc3 next-20170113]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/David-Howells/afs-Move-UUID-struct-to-linux-uuid-h/20170113-134212
config: x86_64-randconfig-s4-01131622 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   fs/afs/cmservice.c: In function 'afs_deliver_cb_init_call_back_state3':
>> fs/afs/cmservice.c:365:34: error: invalid application of 'sizeof' to incomplete type 'struct uuid_v1'
      call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL);
                                     ^~~~~~
>> fs/afs/cmservice.c:371:4: error: dereferencing pointer to incomplete type 'struct uuid_v1'
      r->time_low   = b[0];
       ^~
   fs/afs/cmservice.c: In function 'SRXAFSCB_ProbeUuid':
   fs/afs/cmservice.c:449:33: error: invalid application of 'sizeof' to incomplete type 'struct uuid_v1'
     if (memcmp(r, &afs_uuid, sizeof(afs_uuid)) == 0)
                                    ^
   fs/afs/cmservice.c: In function 'afs_deliver_cb_probe_uuid':
   fs/afs/cmservice.c:489:34: error: invalid application of 'sizeof' to incomplete type 'struct uuid_v1'
      call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL);
                                     ^~~~~~
   fs/afs/cmservice.c: In function 'SRXAFSCB_TellMeAboutYourself':
>> fs/afs/cmservice.c:557:2: error: invalid use of undefined type 'struct uuid_v1'
     reply.ia.uuid[0] = afs_uuid.time_low;
     ^~~~~
   fs/afs/cmservice.c:558:2: error: invalid use of undefined type 'struct uuid_v1'
     reply.ia.uuid[1] = htonl(ntohl(afs_uuid.time_mid));
     ^~~~~
   fs/afs/cmservice.c:559:2: error: invalid use of undefined type 'struct uuid_v1'
     reply.ia.uuid[2] = htonl(ntohl(afs_uuid.time_hi_and_version));
     ^~~~~
   fs/afs/cmservice.c:560:2: error: invalid use of undefined type 'struct uuid_v1'
     reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved);
     ^~~~~
   fs/afs/cmservice.c:561:2: error: invalid use of undefined type 'struct uuid_v1'
     reply.ia.uuid[4] = htonl((s8) afs_uuid.clock_seq_low);
     ^~~~~
   fs/afs/cmservice.c:563:3: error: invalid use of undefined type 'struct uuid_v1'
      reply.ia.uuid[loop + 5] = htonl((s8) afs_uuid.node[loop]);
      ^~~~~
--
   fs/afs/main.c: In function 'afs_get_client_UUID':
>> fs/afs/main.c:48:2: error: invalid use of undefined type 'struct uuid_v1'
     ret = afs_get_MAC_address(afs_uuid.node, sizeof(afs_uuid.node));
     ^~~
>> fs/afs/main.c:48:2: error: invalid use of undefined type 'struct uuid_v1'
>> fs/afs/main.c:55:14: error: 'UUID_TO_UNIX_TIME' undeclared (first use in this function)
     uuidtime += UUID_TO_UNIX_TIME;
                 ^~~~~~~~~~~~~~~~~
   fs/afs/main.c:55:14: note: each undeclared identifier is reported only once for each function it appears in
   fs/afs/main.c:56:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.time_low = htonl(uuidtime);
     ^~~~~~~~
   fs/afs/main.c:57:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.time_mid = htons(uuidtime >> 32);
     ^~~~~~~~
>> fs/afs/main.c:58:28: error: 'UUID_TIMEHI_MASK' undeclared (first use in this function)
     hi_v = (uuidtime >> 48) & UUID_TIMEHI_MASK;
                               ^~~~~~~~~~~~~~~~
>> fs/afs/main.c:59:10: error: 'UUID_VERSION_TIME' undeclared (first use in this function)
     hi_v |= UUID_VERSION_TIME;
             ^~~~~~~~~~~~~~~~~
   fs/afs/main.c:60:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.time_hi_and_version = htons(hi_v);
     ^~~~~~~~
   fs/afs/main.c:63:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.clock_seq_low = clockseq;
     ^~~~~~~~
   fs/afs/main.c:64:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.clock_seq_hi_and_reserved =
     ^~~~~~~~
>> fs/afs/main.c:65:21: error: 'UUID_CLOCKHI_MASK' undeclared (first use in this function)
      (clockseq >> 8) & UUID_CLOCKHI_MASK;
                        ^~~~~~~~~~~~~~~~~
   fs/afs/main.c:66:2: error: invalid use of undefined type 'struct uuid_v1'
     afs_uuid.clock_seq_hi_and_reserved |= UUID_VARIANT_STD;
     ^~~~~~~~
>> fs/afs/main.c:66:40: error: 'UUID_VARIANT_STD' undeclared (first use in this function)
     afs_uuid.clock_seq_hi_and_reserved |= UUID_VARIANT_STD;
                                           ^~~~~~~~~~~~~~~~
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
     _debug("AFS UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
     ^~~~~~
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c:68:2: error: invalid use of undefined type 'struct uuid_v1'
   fs/afs/main.c: At top level:
>> fs/afs/main.c:33:16: error: storage size of 'afs_uuid' isn't known
    struct uuid_v1 afs_uuid;
                   ^~~~~~~~

vim +365 fs/afs/cmservice.c

   359			case 0:		break;
   360			case -EAGAIN:	return 0;
   361			default:	return ret;
   362			}
   363	
   364			_debug("unmarshall UUID");
 > 365			call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL);
   366			if (!call->request)
   367				return -ENOMEM;
   368	
   369			b = call->buffer;
   370			r = call->request;
 > 371			r->time_low			= b[0];
   372			r->time_mid			= htons(ntohl(b[1]));
   373			r->time_hi_and_version		= htons(ntohl(b[2]));
   374			r->clock_seq_hi_and_reserved 	= ntohl(b[3]);
   375			r->clock_seq_low		= ntohl(b[4]);
   376	
   377			for (loop = 0; loop < 6; loop++)
   378				r->node[loop] = ntohl(b[loop + 5]);
   379	
   380			call->offset = 0;
   381			call->unmarshall++;
   382	
   383		case 2:
   384			break;
   385		}
   386	
   387		/* no unmarshalling required */
   388		call->state = AFS_CALL_REPLYING;
   389	
   390		/* we'll need the file server record as that tells us which set of
   391		 * vnodes to operate upon */
   392		server = afs_find_server(&srx);
   393		if (!server)
   394			return -ENOTCONN;
   395		call->server = server;
   396	
   397		INIT_WORK(&call->work, SRXAFSCB_InitCallBackState);
   398		queue_work(afs_wq, &call->work);
   399		return 0;
   400	}
   401	
   402	/*
   403	 * allow the fileserver to see if the cache manager is still alive
   404	 */
   405	static void SRXAFSCB_Probe(struct work_struct *work)
   406	{
   407		struct afs_call *call = container_of(work, struct afs_call, work);
   408	
   409		_enter("");
   410		afs_send_empty_reply(call);
   411		_leave("");
   412	}
   413	
   414	/*
   415	 * deliver request data to a CB.Probe call
   416	 */
   417	static int afs_deliver_cb_probe(struct afs_call *call)
   418	{
   419		int ret;
   420	
   421		_enter("");
   422	
   423		ret = afs_extract_data(call, NULL, 0, false);
   424		if (ret < 0)
   425			return ret;
   426	
   427		/* no unmarshalling required */
   428		call->state = AFS_CALL_REPLYING;
   429	
   430		INIT_WORK(&call->work, SRXAFSCB_Probe);
   431		queue_work(afs_wq, &call->work);
   432		return 0;
   433	}
   434	
   435	/*
   436	 * allow the fileserver to quickly find out if the fileserver has been rebooted
   437	 */
   438	static void SRXAFSCB_ProbeUuid(struct work_struct *work)
   439	{
   440		struct afs_call *call = container_of(work, struct afs_call, work);
   441		struct uuid_v1 *r = call->request;
   442	
   443		struct {
   444			__be32	match;
   445		} reply;
   446	
   447		_enter("");
   448	
 > 449		if (memcmp(r, &afs_uuid, sizeof(afs_uuid)) == 0)
   450			reply.match = htonl(0);
   451		else
   452			reply.match = htonl(1);
   453	
   454		afs_send_simple_reply(call, &reply, sizeof(reply));
   455		_leave("");
   456	}
   457	
   458	/*
   459	 * deliver request data to a CB.ProbeUuid call
   460	 */
   461	static int afs_deliver_cb_probe_uuid(struct afs_call *call)
   462	{
   463		struct uuid_v1 *r;
   464		unsigned loop;
   465		__be32 *b;
   466		int ret;
   467	
   468		_enter("{%u}", call->unmarshall);
   469	
   470		switch (call->unmarshall) {
   471		case 0:
   472			call->offset = 0;
   473			call->buffer = kmalloc(11 * sizeof(__be32), GFP_KERNEL);
   474			if (!call->buffer)
   475				return -ENOMEM;
   476			call->unmarshall++;
   477	
   478		case 1:
   479			_debug("extract UUID");
   480			ret = afs_extract_data(call, call->buffer,
   481					       11 * sizeof(__be32), false);
   482			switch (ret) {
   483			case 0:		break;
   484			case -EAGAIN:	return 0;
   485			default:	return ret;
   486			}
   487	
   488			_debug("unmarshall UUID");
   489			call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL);
   490			if (!call->request)
   491				return -ENOMEM;
   492	
   493			b = call->buffer;
   494			r = call->request;
   495			r->time_low			= ntohl(b[0]);
   496			r->time_mid			= ntohl(b[1]);
   497			r->time_hi_and_version		= ntohl(b[2]);
   498			r->clock_seq_hi_and_reserved 	= ntohl(b[3]);
   499			r->clock_seq_low		= ntohl(b[4]);
   500	
   501			for (loop = 0; loop < 6; loop++)
   502				r->node[loop] = ntohl(b[loop + 5]);
   503	
   504			call->offset = 0;
   505			call->unmarshall++;
   506	
   507		case 2:
   508			break;
   509		}
   510	
   511		call->state = AFS_CALL_REPLYING;
   512	
   513		INIT_WORK(&call->work, SRXAFSCB_ProbeUuid);
   514		queue_work(afs_wq, &call->work);
   515		return 0;
   516	}
   517	
   518	/*
   519	 * allow the fileserver to ask about the cache manager's capabilities
   520	 */
   521	static void SRXAFSCB_TellMeAboutYourself(struct work_struct *work)
   522	{
   523		struct afs_interface *ifs;
   524		struct afs_call *call = container_of(work, struct afs_call, work);
   525		int loop, nifs;
   526	
   527		struct {
   528			struct /* InterfaceAddr */ {
   529				__be32 nifs;
   530				__be32 uuid[11];
   531				__be32 ifaddr[32];
   532				__be32 netmask[32];
   533				__be32 mtu[32];
   534			} ia;
   535			struct /* Capabilities */ {
   536				__be32 capcount;
   537				__be32 caps[1];
   538			} cap;
   539		} reply;
   540	
   541		_enter("");
   542	
   543		nifs = 0;
   544		ifs = kcalloc(32, sizeof(*ifs), GFP_KERNEL);
   545		if (ifs) {
   546			nifs = afs_get_ipv4_interfaces(ifs, 32, false);
   547			if (nifs < 0) {
   548				kfree(ifs);
   549				ifs = NULL;
   550				nifs = 0;
   551			}
   552		}
   553	
   554		memset(&reply, 0, sizeof(reply));
   555		reply.ia.nifs = htonl(nifs);
   556	
 > 557		reply.ia.uuid[0] = afs_uuid.time_low;
   558		reply.ia.uuid[1] = htonl(ntohl(afs_uuid.time_mid));
   559		reply.ia.uuid[2] = htonl(ntohl(afs_uuid.time_hi_and_version));
   560		reply.ia.uuid[3] = htonl((s8) afs_uuid.clock_seq_hi_and_reserved);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (25064 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ