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>] [day] [month] [year] [list]
Date:	Fri, 18 Dec 2015 13:11:24 -0800
From:	Darren Hart <dvhart@...radead.org>
To:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: arch/x86: sfi: intel_scu_devices_create() section mismatch warnings

I noticed the following in my build logs:

WARNING: vmlinux.o(.text+0xa90d8): Section mismatch in reference from the
function intel_scu_devices_create() to the function
.init.text:i2c_register_board_info()
The function intel_scu_devices_create() references
the function __init i2c_register_board_info().
This is often because intel_scu_devices_create lacks a __init 
annotation or the annotation of i2c_register_board_info is wrong.

The relevant code in arch/x86/platform/intel-mid/sfi.c:

> /* Called by IPC driver */
> void intel_scu_devices_create(void)
> {
> 	int i;
> 
> 	for (i = 0; i < ipc_next_dev; i++)
> 		platform_device_add(ipc_devs[i]);
> 
> 	for (i = 0; i < spi_next_dev; i++)
> 		spi_register_board_info(spi_devs[i], 1);
> 
> 	for (i = 0; i < i2c_next_dev; i++) {
> 		struct i2c_adapter *adapter;
> 		struct i2c_client *client;
> 
> 		adapter = i2c_get_adapter(i2c_bus[i]);
> 		if (adapter) {
> 			client = i2c_new_device(adapter, i2c_devs[i]);
> 			if (!client)
> 				pr_err("can't create i2c device %s\n",
> 					i2c_devs[i]->type);
> 		} else
> 			i2c_register_board_info(i2c_bus[i], i2c_devs[i], 1);

i2c_register_board_info is annotated as __init and is intended for static
machine board-files.

The correct usage afaict is i2c_new_device() as used above. I presume what we're
doing here is falling back to the static style configuration if this driver
probes before the i2c adapters do?

What I wasn't able to determine quickly is if this is a safe thing to do and the
section mismatch can be ignored or not.


> 	}
> 	intel_scu_notifier_post(SCU_AVAILABLE, NULL);
> }

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ