linux-stable/drivers/i2c
David Howells c78babcc7d Annotate hardware config module parameters in drivers/i2c/
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in drivers/i2c/.

Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Jean Delvare <jdelvare@suse.de>
cc: linux-i2c@vger.kernel.org
2017-04-20 12:02:32 +01:00
..
algos i2c: algo-bit: declare i2c_bit_quirk_no_clk_stretch as static 2016-05-11 17:16:30 +02:00
busses Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
muxes Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.11 2017-02-10 12:51:23 +01:00
i2c-boardinfo.c Revert "i2c: copy device properties when using i2c_register_board_info()" 2017-03-09 16:41:48 +01:00
i2c-core.c Merge branch 'i2c/for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-02-25 14:21:18 -08:00
i2c-core.h i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-dev.c i2c: fix kernel memory disclosure in dev interface 2017-01-12 20:06:10 +01:00
i2c-mux.c Revert "i2c: add missing of_node_put in i2c_mux_del_adapters" 2017-03-09 16:33:50 +01:00
i2c-slave-eeprom.c i2c: Drop owner assignment from i2c_driver 2015-08-10 08:37:35 +02:00
i2c-smbus.c i2c: use an IRQ to report Host Notify events, not alert 2016-11-24 16:22:06 +01:00
i2c-stub.c i2c: i2c-stub: sort includes 2016-02-20 23:33:39 +01:00
Kconfig Merge branch 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-12-15 12:56:35 -08:00
Makefile i2c: slave-eeprom: add eeprom simulator driver 2014-12-11 22:25:54 +01:00