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-next>] [day] [month] [year] [list]
Message-ID: <201804272139.CYzGSbEr%fengguang.wu@intel.com>
Date:   Fri, 27 Apr 2018 21:43:59 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mario Limonciello <mario.limonciello@...l.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        "Darren Hart (VMware)" <dvhart@...radead.org>
Subject: drivers/platform/x86/dell-smbios-wmi.c:66: undefined reference to
 `wmidev_evaluate_method'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0644f186fc9d77bb5bd198369e59fb28927a3692
commit: 25d47027e1003546bfd8964b4423cb39bc2d53e9 platform/x86: dell-smbios: Link all dell-smbios-* modules together
date:   7 weeks ago
config: x86_64-randconfig-b0-04271930 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 25d47027e1003546bfd8964b4423cb39bc2d53e9
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/platform/x86/dell-smbios-wmi.o: In function `run_smbios_call':
>> drivers/platform/x86/dell-smbios-wmi.c:66: undefined reference to `wmidev_evaluate_method'
   drivers/platform/x86/dell-smbios-wmi.o: In function `dell_smbios_wmi_probe':
>> drivers/platform/x86/dell-smbios-wmi.c:157: undefined reference to `dell_wmi_get_descriptor_valid'
>> drivers/platform/x86/dell-smbios-wmi.c:167: undefined reference to `dell_wmi_get_size'
>> drivers/platform/x86/dell-smbios-wmi.c:171: undefined reference to `dell_wmi_get_hotfix'
>> drivers/platform/x86/dell-smbios-wmi.c:182: undefined reference to `set_required_buffer_size'
   drivers/platform/x86/dell-smbios-wmi.o: In function `init_dell_smbios_wmi':
>> drivers/platform/x86/dell-smbios-wmi.c:271: undefined reference to `__wmi_driver_register'
   drivers/platform/x86/dell-smbios-wmi.o: In function `exit_dell_smbios_wmi':
>> drivers/platform/x86/dell-smbios-wmi.c:276: undefined reference to `wmi_driver_unregister'

vim +66 drivers/platform/x86/dell-smbios-wmi.c

1a258e67 Mario Limonciello 2017-11-01   48  
1a258e67 Mario Limonciello 2017-11-01   49  static int run_smbios_call(struct wmi_device *wdev)
1a258e67 Mario Limonciello 2017-11-01   50  {
1a258e67 Mario Limonciello 2017-11-01   51  	struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
1a258e67 Mario Limonciello 2017-11-01   52  	struct wmi_smbios_priv *priv;
1a258e67 Mario Limonciello 2017-11-01   53  	struct acpi_buffer input;
1a258e67 Mario Limonciello 2017-11-01   54  	union acpi_object *obj;
1a258e67 Mario Limonciello 2017-11-01   55  	acpi_status status;
1a258e67 Mario Limonciello 2017-11-01   56  
1a258e67 Mario Limonciello 2017-11-01   57  	priv = dev_get_drvdata(&wdev->dev);
1a258e67 Mario Limonciello 2017-11-01   58  	input.length = priv->req_buf_size - sizeof(u64);
1a258e67 Mario Limonciello 2017-11-01   59  	input.pointer = &priv->buf->std;
1a258e67 Mario Limonciello 2017-11-01   60  
1a258e67 Mario Limonciello 2017-11-01   61  	dev_dbg(&wdev->dev, "evaluating: %u/%u [%x,%x,%x,%x]\n",
1a258e67 Mario Limonciello 2017-11-01   62  		priv->buf->std.cmd_class, priv->buf->std.cmd_select,
1a258e67 Mario Limonciello 2017-11-01   63  		priv->buf->std.input[0], priv->buf->std.input[1],
1a258e67 Mario Limonciello 2017-11-01   64  		priv->buf->std.input[2], priv->buf->std.input[3]);
1a258e67 Mario Limonciello 2017-11-01   65  
1a258e67 Mario Limonciello 2017-11-01  @66  	status = wmidev_evaluate_method(wdev, 0, 1, &input, &output);
1a258e67 Mario Limonciello 2017-11-01   67  	if (ACPI_FAILURE(status))
1a258e67 Mario Limonciello 2017-11-01   68  		return -EIO;
1a258e67 Mario Limonciello 2017-11-01   69  	obj = (union acpi_object *)output.pointer;
1a258e67 Mario Limonciello 2017-11-01   70  	if (obj->type != ACPI_TYPE_BUFFER) {
1a258e67 Mario Limonciello 2017-11-01   71  		dev_dbg(&wdev->dev, "received type: %d\n", obj->type);
1a258e67 Mario Limonciello 2017-11-01   72  		if (obj->type == ACPI_TYPE_INTEGER)
1a258e67 Mario Limonciello 2017-11-01   73  			dev_dbg(&wdev->dev, "SMBIOS call failed: %llu\n",
1a258e67 Mario Limonciello 2017-11-01   74  				obj->integer.value);
1a258e67 Mario Limonciello 2017-11-01   75  		return -EIO;
1a258e67 Mario Limonciello 2017-11-01   76  	}
1a258e67 Mario Limonciello 2017-11-01   77  	memcpy(&priv->buf->std, obj->buffer.pointer, obj->buffer.length);
1a258e67 Mario Limonciello 2017-11-01   78  	dev_dbg(&wdev->dev, "result: [%08x,%08x,%08x,%08x]\n",
1a258e67 Mario Limonciello 2017-11-01   79  		priv->buf->std.output[0], priv->buf->std.output[1],
1a258e67 Mario Limonciello 2017-11-01   80  		priv->buf->std.output[2], priv->buf->std.output[3]);
1a258e67 Mario Limonciello 2017-11-01   81  
1a258e67 Mario Limonciello 2017-11-01   82  	return 0;
1a258e67 Mario Limonciello 2017-11-01   83  }
1a258e67 Mario Limonciello 2017-11-01   84  
1a258e67 Mario Limonciello 2017-11-01   85  int dell_smbios_wmi_call(struct calling_interface_buffer *buffer)
1a258e67 Mario Limonciello 2017-11-01   86  {
1a258e67 Mario Limonciello 2017-11-01   87  	struct wmi_smbios_priv *priv;
1a258e67 Mario Limonciello 2017-11-01   88  	size_t difference;
1a258e67 Mario Limonciello 2017-11-01   89  	size_t size;
1a258e67 Mario Limonciello 2017-11-01   90  	int ret;
1a258e67 Mario Limonciello 2017-11-01   91  
1a258e67 Mario Limonciello 2017-11-01   92  	mutex_lock(&call_mutex);
1a258e67 Mario Limonciello 2017-11-01   93  	priv = get_first_smbios_priv();
307ab2a9 Mario Limonciello 2017-11-05   94  	if (!priv) {
307ab2a9 Mario Limonciello 2017-11-05   95  		ret = -ENODEV;
307ab2a9 Mario Limonciello 2017-11-05   96  		goto out_wmi_call;
307ab2a9 Mario Limonciello 2017-11-05   97  	}
1a258e67 Mario Limonciello 2017-11-01   98  
1a258e67 Mario Limonciello 2017-11-01   99  	size = sizeof(struct calling_interface_buffer);
1a258e67 Mario Limonciello 2017-11-01  100  	difference = priv->req_buf_size - sizeof(u64) - size;
1a258e67 Mario Limonciello 2017-11-01  101  
1a258e67 Mario Limonciello 2017-11-01  102  	memset(&priv->buf->ext, 0, difference);
1a258e67 Mario Limonciello 2017-11-01  103  	memcpy(&priv->buf->std, buffer, size);
1a258e67 Mario Limonciello 2017-11-01  104  	ret = run_smbios_call(priv->wdev);
1a258e67 Mario Limonciello 2017-11-01  105  	memcpy(buffer, &priv->buf->std, size);
307ab2a9 Mario Limonciello 2017-11-05  106  out_wmi_call:
1a258e67 Mario Limonciello 2017-11-01  107  	mutex_unlock(&call_mutex);
1a258e67 Mario Limonciello 2017-11-01  108  
1a258e67 Mario Limonciello 2017-11-01  109  	return ret;
1a258e67 Mario Limonciello 2017-11-01  110  }
1a258e67 Mario Limonciello 2017-11-01  111  
f2645fa3 Mario Limonciello 2017-11-01  112  static long dell_smbios_wmi_filter(struct wmi_device *wdev, unsigned int cmd,
f2645fa3 Mario Limonciello 2017-11-01  113  				   struct wmi_ioctl_buffer *arg)
f2645fa3 Mario Limonciello 2017-11-01  114  {
f2645fa3 Mario Limonciello 2017-11-01  115  	struct wmi_smbios_priv *priv;
f2645fa3 Mario Limonciello 2017-11-01  116  	int ret = 0;
f2645fa3 Mario Limonciello 2017-11-01  117  
f2645fa3 Mario Limonciello 2017-11-01  118  	switch (cmd) {
f2645fa3 Mario Limonciello 2017-11-01  119  	case DELL_WMI_SMBIOS_CMD:
f2645fa3 Mario Limonciello 2017-11-01  120  		mutex_lock(&call_mutex);
f2645fa3 Mario Limonciello 2017-11-01  121  		priv = dev_get_drvdata(&wdev->dev);
f2645fa3 Mario Limonciello 2017-11-01  122  		if (!priv) {
f2645fa3 Mario Limonciello 2017-11-01  123  			ret = -ENODEV;
f2645fa3 Mario Limonciello 2017-11-01  124  			goto fail_smbios_cmd;
f2645fa3 Mario Limonciello 2017-11-01  125  		}
f2645fa3 Mario Limonciello 2017-11-01  126  		memcpy(priv->buf, arg, priv->req_buf_size);
f2645fa3 Mario Limonciello 2017-11-01  127  		if (dell_smbios_call_filter(&wdev->dev, &priv->buf->std)) {
f2645fa3 Mario Limonciello 2017-11-01  128  			dev_err(&wdev->dev, "Invalid call %d/%d:%8x\n",
f2645fa3 Mario Limonciello 2017-11-01  129  				priv->buf->std.cmd_class,
f2645fa3 Mario Limonciello 2017-11-01  130  				priv->buf->std.cmd_select,
f2645fa3 Mario Limonciello 2017-11-01  131  				priv->buf->std.input[0]);
f2645fa3 Mario Limonciello 2017-11-01  132  			ret = -EFAULT;
f2645fa3 Mario Limonciello 2017-11-01  133  			goto fail_smbios_cmd;
f2645fa3 Mario Limonciello 2017-11-01  134  		}
f2645fa3 Mario Limonciello 2017-11-01  135  		ret = run_smbios_call(priv->wdev);
f2645fa3 Mario Limonciello 2017-11-01  136  		if (ret)
f2645fa3 Mario Limonciello 2017-11-01  137  			goto fail_smbios_cmd;
f2645fa3 Mario Limonciello 2017-11-01  138  		memcpy(arg, priv->buf, priv->req_buf_size);
f2645fa3 Mario Limonciello 2017-11-01  139  fail_smbios_cmd:
f2645fa3 Mario Limonciello 2017-11-01  140  		mutex_unlock(&call_mutex);
f2645fa3 Mario Limonciello 2017-11-01  141  		break;
f2645fa3 Mario Limonciello 2017-11-01  142  	default:
f2645fa3 Mario Limonciello 2017-11-01  143  		ret = -ENOIOCTLCMD;
f2645fa3 Mario Limonciello 2017-11-01  144  	}
f2645fa3 Mario Limonciello 2017-11-01  145  	return ret;
f2645fa3 Mario Limonciello 2017-11-01  146  }
f2645fa3 Mario Limonciello 2017-11-01  147  
1a258e67 Mario Limonciello 2017-11-01  148  static int dell_smbios_wmi_probe(struct wmi_device *wdev)
1a258e67 Mario Limonciello 2017-11-01  149  {
4255c30f Mario Limonciello 2017-11-16  150  	struct wmi_driver *wdriver =
4255c30f Mario Limonciello 2017-11-16  151  		container_of(wdev->dev.driver, struct wmi_driver, driver);
1a258e67 Mario Limonciello 2017-11-01  152  	struct wmi_smbios_priv *priv;
4255c30f Mario Limonciello 2017-11-16  153  	u32 hotfix;
1a258e67 Mario Limonciello 2017-11-01  154  	int count;
1a258e67 Mario Limonciello 2017-11-01  155  	int ret;
1a258e67 Mario Limonciello 2017-11-01  156  
868b8d33 Mario Limonciello 2017-11-09 @157  	ret = dell_wmi_get_descriptor_valid();
868b8d33 Mario Limonciello 2017-11-09  158  	if (ret)
868b8d33 Mario Limonciello 2017-11-09  159  		return ret;
1a258e67 Mario Limonciello 2017-11-01  160  
1a258e67 Mario Limonciello 2017-11-01  161  	priv = devm_kzalloc(&wdev->dev, sizeof(struct wmi_smbios_priv),
1a258e67 Mario Limonciello 2017-11-01  162  			    GFP_KERNEL);
1a258e67 Mario Limonciello 2017-11-01  163  	if (!priv)
1a258e67 Mario Limonciello 2017-11-01  164  		return -ENOMEM;
1a258e67 Mario Limonciello 2017-11-01  165  
1a258e67 Mario Limonciello 2017-11-01  166  	/* WMI buffer size will be either 4k or 32k depending on machine */
1a258e67 Mario Limonciello 2017-11-01 @167  	if (!dell_wmi_get_size(&priv->req_buf_size))
1a258e67 Mario Limonciello 2017-11-01  168  		return -EPROBE_DEFER;
1a258e67 Mario Limonciello 2017-11-01  169  
4255c30f Mario Limonciello 2017-11-16  170  	/* some SMBIOS calls fail unless BIOS contains hotfix */
4255c30f Mario Limonciello 2017-11-16 @171  	if (!dell_wmi_get_hotfix(&hotfix))
4255c30f Mario Limonciello 2017-11-16  172  		return -EPROBE_DEFER;
4255c30f Mario Limonciello 2017-11-16  173  	if (!hotfix) {
4255c30f Mario Limonciello 2017-11-16  174  		dev_warn(&wdev->dev,
4255c30f Mario Limonciello 2017-11-16  175  			"WMI SMBIOS userspace interface not supported(%u), try upgrading to a newer BIOS\n",
4255c30f Mario Limonciello 2017-11-16  176  			hotfix);
4255c30f Mario Limonciello 2017-11-16  177  		wdriver->filter_callback = NULL;
4255c30f Mario Limonciello 2017-11-16  178  	}
4255c30f Mario Limonciello 2017-11-16  179  
f2645fa3 Mario Limonciello 2017-11-01  180  	/* add in the length object we will use internally with ioctl */
f2645fa3 Mario Limonciello 2017-11-01  181  	priv->req_buf_size += sizeof(u64);
f2645fa3 Mario Limonciello 2017-11-01 @182  	ret = set_required_buffer_size(wdev, priv->req_buf_size);
f2645fa3 Mario Limonciello 2017-11-01  183  	if (ret)
f2645fa3 Mario Limonciello 2017-11-01  184  		return ret;
f2645fa3 Mario Limonciello 2017-11-01  185  
1a258e67 Mario Limonciello 2017-11-01  186  	count = get_order(priv->req_buf_size);
1a258e67 Mario Limonciello 2017-11-01  187  	priv->buf = (void *)__get_free_pages(GFP_KERNEL, count);
1a258e67 Mario Limonciello 2017-11-01  188  	if (!priv->buf)
1a258e67 Mario Limonciello 2017-11-01  189  		return -ENOMEM;
1a258e67 Mario Limonciello 2017-11-01  190  
1a258e67 Mario Limonciello 2017-11-01  191  	/* ID is used by dell-smbios to set priority of drivers */
1a258e67 Mario Limonciello 2017-11-01  192  	wdev->dev.id = 1;
1a258e67 Mario Limonciello 2017-11-01  193  	ret = dell_smbios_register_device(&wdev->dev, &dell_smbios_wmi_call);
1a258e67 Mario Limonciello 2017-11-01  194  	if (ret)
1a258e67 Mario Limonciello 2017-11-01  195  		goto fail_register;
1a258e67 Mario Limonciello 2017-11-01  196  
1a258e67 Mario Limonciello 2017-11-01  197  	priv->wdev = wdev;
1a258e67 Mario Limonciello 2017-11-01  198  	dev_set_drvdata(&wdev->dev, priv);
1a258e67 Mario Limonciello 2017-11-01  199  	mutex_lock(&list_mutex);
1a258e67 Mario Limonciello 2017-11-01  200  	list_add_tail(&priv->list, &wmi_list);
1a258e67 Mario Limonciello 2017-11-01  201  	mutex_unlock(&list_mutex);
1a258e67 Mario Limonciello 2017-11-01  202  
1a258e67 Mario Limonciello 2017-11-01  203  	return 0;
1a258e67 Mario Limonciello 2017-11-01  204  
1a258e67 Mario Limonciello 2017-11-01  205  fail_register:
1a258e67 Mario Limonciello 2017-11-01  206  	free_pages((unsigned long)priv->buf, count);
1a258e67 Mario Limonciello 2017-11-01  207  	return ret;
1a258e67 Mario Limonciello 2017-11-01  208  }
1a258e67 Mario Limonciello 2017-11-01  209  

:::::: The code at line 66 was first introduced by commit
:::::: 1a258e670434f404a4500b65ba1afea2c2b29bba platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver

:::::: TO: Mario Limonciello <mario.limonciello@...l.com>
:::::: CC: Darren Hart (VMware) <dvhart@...radead.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ