linux/drivers/media/rc
Linus Torvalds 291b38a756 Annotation of module parameters that specify device settings
-----BEGIN PGP SIGNATURE-----
 
 iQIVAwUAWPiW6vSw1s6N8H32AQLOrw/+NTqGf7bjq+64YKS6NfR0XDgE+wNJltGO
 ck7zJW3NHIg76RNu8s0I9xg5aVmwizz3Z5DGROZquaolnezux4tQihZ3AFyxIzLc
 +Y3WHYagcML7yFfjl/WznCLRD5EW3yPln4lCvQO0nW/xICRYeRI057JaIbi2Dtek
 BhcXt3c4AjXDLdYJkgtHV3p2R2mt8hcdFdWqqx6s7JaIThZNRGNzxAgtbcB9k5IW
 HVG9ZEIL73VBYWHrYivzjHYF5rBnNCPt87eOwDQeTOSkhv8te+u9k+bH8vxZw1T0
 XUtDrLBndKiuVo2GUfLkkF8LItx3Q9eLCJYy0joaIliyPqTEsPx9KjQ+Af0cxS9s
 ZPCZ5SYf96stKmDeL5xaMfrAmeyVHJ4lc4JTOqdzbIT8blsOSfYO/03p0ALShSDv
 /RQLaKGlf8Bjoy8PwKFcXb4sIDufcd/U1Av/EMFXxOfgN/u2JUkGKq6EaIM5B68L
 fHPje+aR9VNELPmPjwNOWtmN4I79EH3EItQf7zv0KG+UeKhcHLx/EAcSJ3ZRKEkH
 Lathg7pPOEJGArPiVO79TZzBG01ADn1aiwv65XObMzNZ+54xI/mN/Y1DNF/kL5jU
 XzvNzEjFt8mwMIZGVNdAt4+pDyMfIZGZSyUkSRKFnaQZMIvQrfQIU9RLBYLX5eOx
 +/p0VkIwDpg=
 =lbS7
 -----END PGP SIGNATURE-----

Merge tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

Pull hw lockdown support from David Howells:
 "Annotation of module parameters that configure hardware resources
  including ioports, iomem addresses, irq lines and dma channels.

  This allows a future patch to prohibit the use of such module
  parameters to prevent that hardware from being abused to gain access
  to the running kernel image as part of locking the kernel down under
  UEFI secure boot conditions.

  Annotations are made by changing:

        module_param(n, t, p)
        module_param_named(n, v, t, p)
        module_param_array(n, t, m, p)

  to:

        module_param_hw(n, t, hwtype, p)
        module_param_hw_named(n, v, t, hwtype, p)
        module_param_hw_array(n, t, hwtype, m, p)

  where the module parameter refers to a hardware setting

  hwtype specifies the type of the resource being configured. This can
  be one of:

        ioport          Module parameter configures an I/O port
        iomem           Module parameter configures an I/O mem address
        ioport_or_iomem Module parameter could be either (runtime set)
        irq             Module parameter configures an I/O port
        dma             Module parameter configures a DMA channel
        dma_addr        Module parameter configures a DMA buffer address
        other           Module parameter configures some other value

  Note that the hwtype is compile checked, but not currently stored (the
  lockdown code probably won't require it). It is, however, there for
  future use.

  A bonus is that the hwtype can also be used for grepping.

  The intention is for the kernel to ignore or reject attempts to set
  annotated module parameters if lockdown is enabled. This applies to
  options passed on the boot command line, passed to insmod/modprobe or
  direct twiddling in /sys/module/ parameter files.

  The module initialisation then needs to handle the parameter not being
  set, by (1) giving an error, (2) probing for a value or (3) using a
  reasonable default.

  What I can't do is just reject a module out of hand because it may
  take a hardware setting in the module parameters. Some important
  modules, some ipmi stuff for instance, both probe for hardware and
  allow hardware to be manually specified; if the driver is aborts with
  any error, you don't get any ipmi hardware.

  Further, trying to do this entirely in the module initialisation code
  doesn't protect against sysfs twiddling.

  [!] Note that in and of itself, this series of patches should have no
      effect on the the size of the kernel or code execution - that is
      left to a patch in the next series to effect. It does mark
      annotated kernel parameters with a KERNEL_PARAM_FL_HWPARAM flag in
      an already existing field"

* tag 'hwparam-20170420' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (38 commits)
  Annotate hardware config module parameters in sound/pci/
  Annotate hardware config module parameters in sound/oss/
  Annotate hardware config module parameters in sound/isa/
  Annotate hardware config module parameters in sound/drivers/
  Annotate hardware config module parameters in fs/pstore/
  Annotate hardware config module parameters in drivers/watchdog/
  Annotate hardware config module parameters in drivers/video/
  Annotate hardware config module parameters in drivers/tty/
  Annotate hardware config module parameters in drivers/staging/vme/
  Annotate hardware config module parameters in drivers/staging/speakup/
  Annotate hardware config module parameters in drivers/staging/media/
  Annotate hardware config module parameters in drivers/scsi/
  Annotate hardware config module parameters in drivers/pcmcia/
  Annotate hardware config module parameters in drivers/pci/hotplug/
  Annotate hardware config module parameters in drivers/parport/
  Annotate hardware config module parameters in drivers/net/wireless/
  Annotate hardware config module parameters in drivers/net/wan/
  Annotate hardware config module parameters in drivers/net/irda/
  Annotate hardware config module parameters in drivers/net/hamradio/
  Annotate hardware config module parameters in drivers/net/ethernet/
  ...
2017-05-10 19:13:03 -07:00
..
img-ir [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
keymaps [media] rc: lirc keymap no longer makes any sense 2017-03-24 08:22:36 -03:00
ati_remote.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ene_ir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ene_ir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
fintek-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
fintek-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
gpio-ir-recv.c [media] gpio-ir: do not allow a timeout of 0 2017-03-24 08:21:48 -03:00
igorplugusb.c [media] mce_kbd: add encoder 2017-03-24 08:24:41 -03:00
iguanair.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
imon.c [media] imon: use setup_timer 2017-04-10 14:56:57 -03:00
ir-hix5hd2.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ir-jvc-decoder.c [media] rc: ir-jvc-decoder: Add encode capability 2017-01-30 13:52:57 -02:00
ir-lirc-codec.c [media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve 2017-03-24 08:23:18 -03:00
ir-mce_kbd-decoder.c [media] mce_kbd: add encoder 2017-03-24 08:24:41 -03:00
ir-nec-decoder.c [media] rc: ir-nec-decoder: Add encode capability 2017-01-30 13:52:28 -02:00
ir-rc5-decoder.c [media] rc: ir-rc5-decoder: Add encode capability 2017-01-30 13:50:52 -02:00
ir-rc6-decoder.c [media] rc: ir-rc6-decoder: Add encode capability 2017-01-30 13:51:34 -02:00
ir-rx51.c [media] ir-rx51: port to rc-core 2017-01-30 14:25:04 -02:00
ir-sanyo-decoder.c [media] rc: ir-sanyo-decoder: Add encode capability 2017-01-30 13:53:28 -02:00
ir-sharp-decoder.c [media] rc: ir-sharp-decoder: Add encode capability 2017-01-30 13:53:57 -02:00
ir-sony-decoder.c [media] rc: ir-sony-decoder: Add encode capability 2017-01-30 13:54:54 -02:00
ir-spi.c [media] rc: add support for IR LEDs driven through SPI 2017-01-30 14:21:20 -02:00
ir-xmp-decoder.c [media] media: rc: move check whether a protocol is enabled to the core 2015-11-19 11:39:17 -02:00
ite-cir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
ite-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
Kconfig [media] rc: promote lirc_sir out of staging 2017-04-05 14:50:57 -03:00
lirc_dev.c Linux 4.11-rc5 2017-04-04 11:11:43 -03:00
Makefile [media] rc: promote lirc_sir out of staging 2017-04-05 14:50:57 -03:00
mceusb.c [media] mceusb: fix NULL-deref at probe 2017-03-24 08:28:25 -03:00
meson-ir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
mtk-cir.c [media] rc: add driver for IR remote receiver on MT7623 SoC 2017-01-31 07:25:30 -02:00
nuvoton-cir.c [media] rc: nuvoton: fix deadlock in nvt_write_wakeup_codes 2017-03-03 07:06:57 -03:00
nuvoton-cir.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc-core-priv.h [media] mce_kbd: add encoder 2017-03-24 08:24:41 -03:00
rc-ir-raw.c [media] mce_kbd: add encoder 2017-03-24 08:24:41 -03:00
rc-loopback.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
rc-main.c Linux 4.11-rc5 2017-04-04 11:11:43 -03:00
redrat3.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
serial_ir.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
sir_ir.c [media] rc: promote lirc_sir out of staging 2017-04-05 14:50:57 -03:00
st_rc.c [media] st_rc: simplify optional reset handling 2017-03-24 08:29:27 -03:00
streamzap.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
sunxi-cir.c [media] rc: sunxi-cir: simplify optional reset handling 2017-03-24 08:30:03 -03:00
ttusbir.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
winbond-cir.c [media] winbond: allow timeout to be set 2017-03-24 08:21:17 -03:00