linux-stable/drivers/counter
William Breathitt Gray af383bb146 counter: 104-quad-8: Annotate hardware config module parameter
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 the 104-QUAD-8 driver.

Acked-by: Syed Nayyar Waris <syednwaris@gmail.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/97ce79878a26809f0b15b2eac9a86ca39e0ecd74.1623201081.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-06-09 16:16:19 +01:00
..
104-quad-8.c counter: 104-quad-8: Annotate hardware config module parameter 2021-06-09 16:16:19 +01:00
counter.c counter: Simplify the count_read and count_write callbacks 2019-10-18 19:47:27 +01:00
ftm-quaddec.c counter: Simplify the count_read and count_write callbacks 2019-10-18 19:47:27 +01:00
intel-qep.c counter: Add support for Intel Quadrature Encoder Peripheral 2021-06-03 18:24:14 +01:00
interrupt-cnt.c counter: add IRQ or GPIO based counter 2021-03-25 19:13:51 +00:00
Kconfig counter: Add support for Intel Quadrature Encoder Peripheral 2021-06-03 18:24:14 +01:00
Makefile counter: Add support for Intel Quadrature Encoder Peripheral 2021-06-03 18:24:14 +01:00
microchip-tcb-capture.c counter: microchip-tcb-capture: Fix CMR value check 2020-12-03 19:40:31 +00:00
stm32-lptimer-cnt.c counter: stm32-lptimer-cnt: remove iio counter abi 2021-03-11 20:46:56 +00:00
stm32-timer-cnt.c counter: stm32-timer-cnt: fix ceiling miss-alignment with reload register 2021-03-06 16:48:09 +00:00
ti-eqep.c counter:ti-eqep: remove floor 2021-01-14 20:56:56 +00:00