WSL2-Linux-Kernel/drivers/staging
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
..
android Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
board
ccree drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4 2017-05-08 17:15:16 -07:00
clocking-wizard
comedi staging: comedi: addi_apci_3xxx: check return value 2017-04-25 20:43:42 +02:00
dgnc staging: dgnc: remove error message task 2017-03-29 09:37:10 +02:00
emxx_udc staging: emxx_udc: Add comment for spinlock_t definition. 2017-03-09 14:13:51 +01:00
fbtft staging: fbtft: fix open parentheses alignment 2017-04-28 12:07:25 +02:00
fsl-dpaa2 staging: fsl-dpaa2/eth: Add TODO file 2017-04-28 14:25:17 +02:00
fsl-mc staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd 2017-04-28 17:51:54 +02:00
fwserial
gdm724x staging: gdm724x: gdm_mux: fix use-after-free on module unload 2017-04-28 12:32:49 +02:00
goldfish Staging: goldfish: use __func__ instead of embedded function names 2017-03-17 15:19:09 +09:00
greybus staging: greybus: uart.c: Remove include linux/serial.h 2017-04-18 13:27:16 +02:00
gs_fpgaboot scripts/spelling.txt: add "followings" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
iio Staging: iio: accel: adis16203: fixed a brace coding style issue 2017-04-14 16:13:34 +01:00
ks7010 staging: ks7010: remove line continuations in quoted strings 2017-04-28 17:51:39 +02:00
lustre Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-10 10:30:46 -07:00
media drivers/staging/media/atomisp/pci/atomisp2: use set_memory.h 2017-05-08 17:15:14 -07:00
most format-security: move static strings to const 2017-05-08 17:15:14 -07:00
mt29f_spinand
netlogic
nvec Staging: nvec: Remove FSF's mailing address 2017-04-08 12:55:25 +02:00
octeon staging: octeon: remove unused variable 2017-03-08 09:45:07 +01:00
octeon-usb
olpc_dcon staging: olpc_dcon: style fixes 2017-04-28 12:07:24 +02:00
rtl8188eu staging: rtl8188eu: embedded function name style fixes 2017-04-28 12:30:21 +02:00
rtl8192e staging: rtl8192e: Fix embedded function names with __func__ 2017-03-29 09:39:08 +02:00
rtl8192u staging: rtl8192u: fix spelling mistake in variable name *attentuation 2017-04-28 12:27:50 +02:00
rtl8712 staging: rtl8712: fixed multiple line derefence issue 2017-04-08 17:05:59 +02:00
rtl8723bs Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
rts5208 staging: rts5208: ms.c fixed checkpatch warning - using __func__ instead of hardcoded name 2017-04-08 17:05:59 +02:00
skein
sm750fb staging: sm750fb: removed line continuations in quoted strings 2017-04-08 17:00:52 +02:00
speakup Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
typec staging: typec: Fairchild FUSB302 Type-c chip driver 2017-04-28 11:29:00 +02:00
unisys staging: unisys: visorhba: fix s-Par to boot with option CONFIG_VMAP_STACK set to y 2017-04-28 11:55:53 +02:00
vc04_services staging: media/platform/bcm2835: remove gstreamer workaround 2017-04-18 13:54:24 +02:00
vme Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
vt6655 Staging: vt6655 - block comments style fix 2017-03-29 09:39:08 +02:00
vt6656 staging: vt6656: use tabs instead of spaces 2017-04-28 14:30:43 +02:00
wilc1000 Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
wlan-ng Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
xgifb staging: xgifb: added blankline after decl. 2017-04-08 17:05:59 +02:00
Kconfig Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
Makefile Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00