WSL2-Linux-Kernel/drivers/gpio
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
..
Kconfig This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
Makefile gpio: Add ROHM BD9571MWV-M PMIC GPIO driver 2017-04-28 09:47:46 +02:00
devres.c gpiolib: Fix spelling of 'successful' 2017-03-14 10:51:28 +01:00
gpio-74x164.c gpio: 74x164: Use spi_write() helper instead of open coding 2016-06-23 11:07:12 +02:00
gpio-74xx-mmio.c
gpio-104-dio-48e.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
gpio-104-idi-48.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
gpio-104-idio-16.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
gpio-adnp.c gpio: set explicit nesting on drivers 2016-11-25 15:12:27 +01:00
gpio-adp5520.c
gpio-adp5588.c
gpio-altera-a10sr.c gpio: altera-a10sr: Set gpio_chip parent property 2017-03-06 14:35:21 +01:00
gpio-altera.c This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
gpio-amd8111.c
gpio-amdpt.c gpio: amdpt: Add a new ACPI HID 2016-03-30 10:38:51 +02:00
gpio-arizona.c gpio: arizona: Correct check whether the pin is an input 2017-04-24 16:22:14 +02:00
gpio-aspeed.c gpio: aspeed: Add open-source and open-drain support 2017-04-24 14:51:57 +02:00
gpio-ath79.c gpio: ath79: make use of raw_spinlock variants 2017-03-16 21:52:08 +01:00
gpio-axp209.c gpio: axp209: use correct register for GPIO input status 2016-11-24 16:19:02 +01:00
gpio-bcm-kona.c gpio: bcm-kona: make use of raw_spinlock variants 2017-03-16 21:52:07 +01:00
gpio-bd9571mwv.c gpio: Add ROHM BD9571MWV-M PMIC GPIO driver 2017-04-28 09:47:46 +02:00
gpio-brcmstb.c gpio: brcmstb: Return proper error if bank width is invalid 2016-04-15 10:09:48 +02:00
gpio-bt8xx.c
gpio-clps711x.c gpio: clps711x: Remove board support 2016-06-08 10:49:58 +02:00
gpio-crystalcove.c gpio: set explicit nesting on drivers 2016-11-25 15:12:27 +01:00
gpio-cs5535.c
gpio-da9052.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-da9055.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-davinci.c gpio: davinci: use devm_irq_alloc_descs() 2017-03-15 11:16:36 +01:00
gpio-dln2.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-dwapb.c gpio: dwapb: use dwapb_read instead of readl_relaxed 2017-04-24 15:08:53 +02:00
gpio-em.c
gpio-ep93xx.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-etraxfs.c gpio: etraxfs: make use of raw_spinlock variants 2017-03-16 21:52:08 +01:00
gpio-exar.c gpio: exar: Set proper output level in exar_direction_output 2017-03-15 11:16:31 +01:00
gpio-f7188x.c gpio: f7188x: Add a missing break 2017-04-28 10:09:16 +02:00
gpio-ftgpio010.c gpio: gemini: rename to match Faraday IP 2017-03-22 09:40:55 +01:00
gpio-ge.c
gpio-gpio-mm.c Annotate hardware config module parameters in drivers/gpio/ 2017-04-20 12:02:32 +01:00
gpio-grgpio.c
gpio-htc-egpio.c gpio: htc-egpio: read output value from cache 2016-11-13 11:50:22 +01:00
gpio-ich.c
gpio-intel-mid.c gpio: intel-mid: Fix build warning when !CONFIG_PM 2017-01-26 10:00:20 +01:00
gpio-iop.c gpio: iop: Use generic GPIO MMIO functions for driver 2016-09-12 15:28:18 +02:00
gpio-it87.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-janz-ttl.c
gpio-kempld.c
gpio-ks8695.c
gpio-loongson.c
gpio-loongson1.c gpio: loongson1: remove redundant return value check 2016-09-23 15:10:00 +02:00
gpio-lp873x.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-lp3943.c Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free" 2016-03-09 22:00:27 +07:00
gpio-lpc18xx.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-lpc32xx.c gpio: lpc32xx: remove unused platform data file 2016-09-12 14:23:37 +02:00
gpio-lynxpoint.c gpio: lynxpoint: avoid potential warning on error path 2016-06-23 11:07:14 +02:00
gpio-max730x.c gpio: max730x: set gpiochip data pointer before using it 2016-08-10 15:40:44 +02:00
gpio-max732x.c gpio: simplify adding threaded interrupts 2016-11-25 15:12:27 +01:00
gpio-max7300.c
gpio-max7301.c
gpio-max77620.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-mb86s7x.c gpio: mb86s7x: use builtin_platform_driver 2016-11-22 10:16:17 +01:00
gpio-mc9s08dz60.c gpio: mc9s08dz60: make explicitly non-modular 2016-03-31 15:02:09 +02:00
gpio-mc33880.c
gpio-mcp23s08.c gpio:mcp23s08 Fixed missing interrupts 2017-03-17 09:20:28 +01:00
gpio-menz127.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-merrifield.c gpio: merrifield: Don't use GPIOF_DIR_IN / GPIOF_DIR_OUT 2017-03-23 14:06:46 +01:00
gpio-ml-ioh.c gpio: ml-ioh: use resource management for irqs 2017-03-15 11:16:34 +01:00
gpio-mm-lantiq.c gpio: update my email address 2016-12-30 09:18:10 +01:00
gpio-mmio.c gpio: mmio: add support for NI 169445 NAND GPIO 2017-03-23 09:49:06 +01:00
gpio-mockup.c This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
gpio-mpc8xxx.c gpio: mpc8xxx: Correct irq handler function 2016-10-24 02:20:40 +02:00
gpio-mpc5200.c
gpio-msic.c gpio: msic: drop unused MODULE_ tags from non-modular code 2016-08-23 11:22:09 +02:00
gpio-mvebu.c gpio: mvebu: Add limited PWM support 2017-04-24 11:16:25 +02:00
gpio-mxc.c gpio: mxc: use devm_irq_alloc_descs() 2017-03-15 11:16:37 +01:00
gpio-mxs.c gpio: mxs: use devm_irq_alloc_descs() 2017-03-15 11:16:37 +01:00
gpio-octeon.c gpio: octeon: Constify octeon_gpio_match table 2016-03-30 10:38:51 +02:00
gpio-omap.c gpio: omap: return error if requested debounce time is not possible 2017-04-28 09:50:22 +02:00
gpio-palmas.c gpio: palmas: fix implicit assumption module.h is present 2016-09-15 13:57:43 +02:00
gpio-pca953x.c gpio: move tca9554 from pcf857x to pca953x 2017-04-24 18:27:55 +02:00
gpio-pcf857x.c gpio: move tca9554 from pcf857x to pca953x 2017-04-24 18:27:55 +02:00
gpio-pch.c gpio: pch: use resource management for irqs 2017-03-15 11:16:33 +01:00
gpio-pci-idio-16.c gpio: pci-idio-16: make use of raw_spinlock variants 2017-03-28 11:13:59 +02:00
gpio-pisosr.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-pl061.c gpio: pl061: make use of raw_spinlock variants 2017-03-16 21:52:09 +01:00
gpio-pxa.c gpio: pxa: use devm_irq_alloc_descs() 2017-03-15 11:16:35 +01:00
gpio-rc5t583.c gpio: rc5t583: make explicitly non-modular 2016-04-05 17:02:35 +02:00
gpio-rcar.c gpio: rcar: Fine-grained Runtime PM support 2016-12-28 01:33:02 +01:00
gpio-rdc321x.c gpio: remove redundant owner assignments of drivers 2016-06-07 09:35:16 +02:00
gpio-reg.c gpio: gpio-reg: add irq mapping for gpio-reg users 2017-03-24 14:05:00 +01:00
gpio-sa1100.c gpio: sa1100: implement get_direction method 2017-03-24 14:04:37 +01:00
gpio-sch.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-sch311x.c gpio: remove redundant owner assignments of drivers 2016-06-07 09:35:16 +02:00
gpio-sodaville.c gpio: sodaville: use resource management for irqs 2017-03-15 11:16:36 +01:00
gpio-spear-spics.c gpio: spear-spics: drop unused MODULE_ tags from non-modular code 2016-08-23 11:23:41 +02:00
gpio-sta2x11.c gpio: sta2x11: use resource management for irqs 2017-03-15 11:16:38 +01:00
gpio-stmpe.c Bulk GPIO changes for the v4.10 kernel cycle: 2016-12-13 07:54:57 -08:00
gpio-stp-xway.c gpio: update my email address 2016-12-30 09:18:10 +01:00
gpio-syscon.c gpio: syscon: Change the compatibility string 2016-06-08 10:48:17 +02:00
gpio-tb10x.c
gpio-tc3589x.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-tegra.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-timberdale.c gpio: timberdale: make it explicitly non-modular 2016-05-11 13:49:11 +02:00
gpio-tpic2810.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-tps6586x.c gpio: remove redundant owner assignments of drivers 2016-06-07 09:35:16 +02:00
gpio-tps65086.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-tps65218.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-tps65910.c gpio: remove redundant owner assignments of drivers 2016-06-07 09:35:16 +02:00
gpio-tps65912.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-ts4800.c gpio: ts4800: Fix module autoload 2016-10-21 14:55:07 +02:00
gpio-ts4900.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-ts5500.c
gpio-twl4030.c gpio: twl4030: use devm_irq_alloc_descs() 2017-03-15 11:16:32 +01:00
gpio-twl6040.c
gpio-tz1090-pdc.c
gpio-tz1090.c
gpio-ucb1400.c
gpio-vf610.c gpio: vf610: use builtin_platform_driver 2016-11-24 16:19:02 +01:00
gpio-viperboard.c gpio: remove redundant owner assignments of drivers 2016-06-07 09:35:16 +02:00
gpio-vr41xx.c
gpio-vx855.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-wcove.c gpio: gpio-wcove: fix GPIO IRQ status mask 2017-04-28 09:33:04 +02:00
gpio-wm831x.c gpio: wm831x: Add basic device tree support 2017-03-23 11:45:55 +00:00
gpio-wm8350.c gpio: constify gpio_chip structures 2016-09-13 10:35:56 +02:00
gpio-wm8994.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpio-ws16c48.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
gpio-xgene-sb.c gpio: xgene-sb: Use irq_domain_free_irqs_common() 2016-03-31 10:22:53 +02:00
gpio-xgene.c gpio: xgene: mark PM functions as __maybe_unused 2017-03-06 14:35:22 +01:00
gpio-xilinx.c gpio: xilinx: Add support to set multiple GPIO at once 2016-06-08 10:33:45 +02:00
gpio-xlp.c gpio: xlp: Update for ARCH_THUNDER2 2017-03-16 21:52:10 +01:00
gpio-xtensa.c
gpio-zevio.c gpio: zevio: make it explicitly non-modular 2016-05-11 13:50:01 +02:00
gpio-zx.c gpio: zx: make use of raw_spinlock variants 2017-03-16 21:52:10 +01:00
gpio-zynq.c gpio: Added zynq specific check for special pins on bank zero 2016-09-23 15:26:20 +02:00
gpiolib-acpi.c This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
gpiolib-devprop.c gpio: gpiolib-devprop: Check chip->parent pointer before dereferencing 2016-10-25 20:23:19 +02:00
gpiolib-legacy.c Revert "gpiolib: Split GPIO flags parsing and GPIO configuration" 2016-07-04 16:51:29 +02:00
gpiolib-of.c gpio: core: Decouple open drain/source flag with active low/high 2017-04-07 12:23:29 +02:00
gpiolib-sysfs.c gpio: fix documentation for gpiod_unexport 2016-09-12 14:53:33 +02:00
gpiolib.c char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
gpiolib.h gpiolib: Update documentation of struct acpi_gpio_info 2017-01-11 12:09:36 +01:00