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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 Sep 2017 22:59:52 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mario Limonciello <mario.limonciello@...l.com>
Cc:     kbuild-all@...org, dvhart@...radead.org,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        platform-driver-x86@...r.kernel.org, quasisec@...gle.com,
        pali.rohar@...il.com,
        Mario Limonciello <mario.limonciello@...l.com>
Subject: Re: [PATCH v2 02/14] platform/x86: dell-smbios: drop needless
 includes

Hi Mario,

[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.14-rc2 next-20170928]
[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/Mario-Limonciello/Introduce-support-for-Dell-SMBIOS-over-WMI/20170929-221513
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: i386-randconfig-x013-201739 (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=i386 

Note: the linux-review/Mario-Limonciello/Introduce-support-for-Dell-SMBIOS-over-WMI/20170929-221513 HEAD 95464efdaabbd0db3ed21656ce0f227cfe01ef0c builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/platform/x86/dell-smbios.c: In function 'parse_da_table':
>> drivers/platform/x86/dell-smbios.c:142:18: error: implicit declaration of function 'krealloc' [-Werror=implicit-function-declaration]
     new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
                     ^~~~~~~~
>> drivers/platform/x86/dell-smbios.c:142:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
                   ^
   drivers/platform/x86/dell-smbios.c: In function 'dell_smbios_init':
>> drivers/platform/x86/dell-smbios.c:193:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
     kfree(da_tokens);
     ^~~~~
   cc1: some warnings being treated as errors

vim +/krealloc +142 drivers/platform/x86/dell-smbios.c

504b0259 Hans de Goede 2017-03-16  124  
2f9f26bd Michał Kępień 2016-01-22  125  static void __init parse_da_table(const struct dmi_header *dm)
2f9f26bd Michał Kępień 2016-01-22  126  {
2f9f26bd Michał Kępień 2016-01-22  127  	/* Final token is a terminator, so we don't want to copy it */
2f9f26bd Michał Kępień 2016-01-22  128  	int tokens = (dm->length-11)/sizeof(struct calling_interface_token)-1;
2f9f26bd Michał Kępień 2016-01-22  129  	struct calling_interface_token *new_da_tokens;
2f9f26bd Michał Kępień 2016-01-22  130  	struct calling_interface_structure *table =
2f9f26bd Michał Kępień 2016-01-22  131  		container_of(dm, struct calling_interface_structure, header);
2f9f26bd Michał Kępień 2016-01-22  132  
2f9f26bd Michał Kępień 2016-01-22  133  	/* 4 bytes of table header, plus 7 bytes of Dell header, plus at least
2f9f26bd Michał Kępień 2016-01-22  134  	   6 bytes of entry */
2f9f26bd Michał Kępień 2016-01-22  135  
2f9f26bd Michał Kępień 2016-01-22  136  	if (dm->length < 17)
2f9f26bd Michał Kępień 2016-01-22  137  		return;
2f9f26bd Michał Kępień 2016-01-22  138  
2f9f26bd Michał Kępień 2016-01-22  139  	da_command_address = table->cmdIOAddress;
2f9f26bd Michał Kępień 2016-01-22  140  	da_command_code = table->cmdIOCode;
2f9f26bd Michał Kępień 2016-01-22  141  
2f9f26bd Michał Kępień 2016-01-22 @142  	new_da_tokens = krealloc(da_tokens, (da_num_tokens + tokens) *
2f9f26bd Michał Kępień 2016-01-22  143  				 sizeof(struct calling_interface_token),
2f9f26bd Michał Kępień 2016-01-22  144  				 GFP_KERNEL);
2f9f26bd Michał Kępień 2016-01-22  145  
2f9f26bd Michał Kępień 2016-01-22  146  	if (!new_da_tokens)
2f9f26bd Michał Kępień 2016-01-22  147  		return;
2f9f26bd Michał Kępień 2016-01-22  148  	da_tokens = new_da_tokens;
2f9f26bd Michał Kępień 2016-01-22  149  
2f9f26bd Michał Kępień 2016-01-22  150  	memcpy(da_tokens+da_num_tokens, table->tokens,
2f9f26bd Michał Kępień 2016-01-22  151  	       sizeof(struct calling_interface_token) * tokens);
2f9f26bd Michał Kępień 2016-01-22  152  
2f9f26bd Michał Kępień 2016-01-22  153  	da_num_tokens += tokens;
2f9f26bd Michał Kępień 2016-01-22  154  }
2f9f26bd Michał Kępień 2016-01-22  155  
2f9f26bd Michał Kępień 2016-01-22  156  static void __init find_tokens(const struct dmi_header *dm, void *dummy)
2f9f26bd Michał Kępień 2016-01-22  157  {
2f9f26bd Michał Kępień 2016-01-22  158  	switch (dm->type) {
2f9f26bd Michał Kępień 2016-01-22  159  	case 0xd4: /* Indexed IO */
2f9f26bd Michał Kępień 2016-01-22  160  	case 0xd5: /* Protected Area Type 1 */
2f9f26bd Michał Kępień 2016-01-22  161  	case 0xd6: /* Protected Area Type 2 */
2f9f26bd Michał Kępień 2016-01-22  162  		break;
2f9f26bd Michał Kępień 2016-01-22  163  	case 0xda: /* Calling interface */
2f9f26bd Michał Kępień 2016-01-22  164  		parse_da_table(dm);
2f9f26bd Michał Kępień 2016-01-22  165  		break;
2f9f26bd Michał Kępień 2016-01-22  166  	}
2f9f26bd Michał Kępień 2016-01-22  167  }
2f9f26bd Michał Kępień 2016-01-22  168  
2f9f26bd Michał Kępień 2016-01-22  169  static int __init dell_smbios_init(void)
2f9f26bd Michał Kępień 2016-01-22  170  {
2f9f26bd Michał Kępień 2016-01-22  171  	int ret;
2f9f26bd Michał Kępień 2016-01-22  172  
2f9f26bd Michał Kępień 2016-01-22  173  	dmi_walk(find_tokens, NULL);
2f9f26bd Michał Kępień 2016-01-22  174  
2f9f26bd Michał Kępień 2016-01-22  175  	if (!da_tokens)  {
2f9f26bd Michał Kępień 2016-01-22  176  		pr_info("Unable to find dmi tokens\n");
2f9f26bd Michał Kępień 2016-01-22  177  		return -ENODEV;
2f9f26bd Michał Kępień 2016-01-22  178  	}
2f9f26bd Michał Kępień 2016-01-22  179  
2f9f26bd Michał Kępień 2016-01-22  180  	/*
2f9f26bd Michał Kępień 2016-01-22  181  	 * Allocate buffer below 4GB for SMI data--only 32-bit physical addr
2f9f26bd Michał Kępień 2016-01-22  182  	 * is passed to SMI handler.
2f9f26bd Michał Kępień 2016-01-22  183  	 */
2f9f26bd Michał Kępień 2016-01-22  184  	buffer = (void *)__get_free_page(GFP_KERNEL | GFP_DMA32);
2f9f26bd Michał Kępień 2016-01-22  185  	if (!buffer) {
2f9f26bd Michał Kępień 2016-01-22  186  		ret = -ENOMEM;
2f9f26bd Michał Kępień 2016-01-22  187  		goto fail_buffer;
2f9f26bd Michał Kępień 2016-01-22  188  	}
2f9f26bd Michał Kępień 2016-01-22  189  
2f9f26bd Michał Kępień 2016-01-22  190  	return 0;
2f9f26bd Michał Kępień 2016-01-22  191  
2f9f26bd Michał Kępień 2016-01-22  192  fail_buffer:
2f9f26bd Michał Kępień 2016-01-22 @193  	kfree(da_tokens);
2f9f26bd Michał Kępień 2016-01-22  194  	return ret;
2f9f26bd Michał Kępień 2016-01-22  195  }
2f9f26bd Michał Kępień 2016-01-22  196  

:::::: The code at line 142 was first introduced by commit
:::::: 2f9f26bd8614740b3c3b950394d945a99492a28e dell-laptop: extract SMBIOS-related code to a separate module

:::::: TO: Michał Kępień <kernel@...pniu.pl>
:::::: CC: Darren Hart <dvhart@...ux.intel.com>

---
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" (30408 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ