linux/drivers/mmc/host
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-goldfish.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
atmel-mci.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
au1xmmc.c
bcm2835.c mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_request 2017-04-24 21:41:53 +02:00
bfin_sdh.c
cavium-octeon.c mmc: cavium: Add MMC support for Octeon SOCs. 2017-04-24 21:51:20 +02:00
cavium-thunderx.c mmc: cavium: Use module_pci_driver to simplify the code 2017-04-25 08:12:05 +02:00
cavium.c mmc: cavium: Fix detection of block or byte addressing. 2017-04-24 21:49:48 +02:00
cavium.h mmc: cavium: Add scatter-gather DMA support 2017-04-24 21:42:10 +02:00
cb710-mmc.c
cb710-mmc.h
davinci_mmc.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
dw_mmc-exynos.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-exynos.h
dw_mmc-k3.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-pci.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-pltfm.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-pltfm.h
dw_mmc-rockchip.c mmc: dw_mmc: Remove the public dw_mmc header file 2017-02-13 13:19:59 +01:00
dw_mmc-zx.c mmc: dw_mmc: zx: Initial support for ZX mmc controller 2017-02-13 13:20:03 +01:00
dw_mmc-zx.h mmc: dw_mmc: zx: Initial support for ZX mmc controller 2017-02-13 13:20:03 +01:00
dw_mmc.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
dw_mmc.h mmc: dw_mmc: Add fifo watermark alignment property 2017-02-13 13:20:02 +01:00
jz4740_mmc.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
Kconfig mmc: cavium: Add MMC support for Octeon SOCs. 2017-04-24 21:51:20 +02:00
Makefile mmc: cavium: Add MMC support for Octeon SOCs. 2017-04-24 21:51:20 +02:00
meson-gx-mmc.c mmc: meson-gx: add support for descriptor chain mode 2017-04-24 21:42:21 +02:00
mmc_spi.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mmci_qcom_dml.c scripts/spelling.txt: add "intialization" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
mmci_qcom_dml.h
mmci.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mmci.h mmc: core/mmci: restore pre/post_req behaviour 2017-02-13 13:20:52 +01:00
moxart-mmc.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mtk-sd.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mvsdio.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
mvsdio.h
mxcmmc.c
mxs-mmc.c mmc: mxs-mmc: Implement CMD23 support 2017-02-13 13:20:27 +01:00
of_mmc_spi.c
omap_hsmmc.c mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() 2017-04-24 21:42:18 +02:00
omap.c mmc: omap: Don't use mmc_card_present() when validating for inserted card 2017-02-13 13:20:23 +01:00
pxamci.c
pxamci.h
rtsx_pci_sdmmc.c mmc: use empty initializer list to zero-clear structures 2017-02-13 13:19:54 +01:00
rtsx_usb_sdmmc.c mmc: use empty initializer list to zero-clear structures 2017-02-13 13:19:54 +01:00
s3cmci.c mmc: host: s3cmci: allow probing from device tree 2017-04-24 21:41:59 +02:00
s3cmci.h
sdhci_f_sdh30.c
sdhci-acpi.c mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers 2017-04-24 21:41:57 +02:00
sdhci-bcm-kona.c
sdhci-brcmstb.c mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 2017-04-24 21:41:26 +02:00
sdhci-cadence.c mmc: sdhci-cadence: add parsing sdhci properties 2017-04-24 21:42:19 +02:00
sdhci-cns3xxx.c
sdhci-dove.c
sdhci-esdhc-imx.c mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card 2017-04-24 21:42:28 +02:00
sdhci-esdhc.h mmc: sdhci-of-esdhc: add tuning support 2017-04-24 21:42:26 +02:00
sdhci-iproc.c mmc: sdhci-iproc: Increase max_blk_size for bcm2835 2017-02-13 13:19:55 +01:00
sdhci-msm.c mmc: sdhci: Do not use spin lock in set_ios paths 2017-04-24 21:41:29 +02:00
sdhci-of-arasan.c mmc: sdhci: clarify the get_timeout_clock callback 2017-04-24 21:41:48 +02:00
sdhci-of-at91.c mmc: sdhci: Do not use spin lock in set_ios paths 2017-04-24 21:41:29 +02:00
sdhci-of-esdhc.c mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a 2017-04-28 14:53:13 +02:00
sdhci-of-hlwd.c
sdhci-pci-core.c mmc: sdhci-pci: Allow for 3 bytes from Intel DSM 2017-04-24 21:42:24 +02:00
sdhci-pci-data.c mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices 2017-04-24 21:41:28 +02:00
sdhci-pci-o2micro.c mmc: sdhci-pci: Let suspend/resume callbacks replace default callbacks 2017-04-24 21:41:38 +02:00
sdhci-pci-o2micro.h
sdhci-pci.h mmc: sdhci-pci: Add runtime suspend/resume callbacks 2017-04-24 21:41:39 +02:00
sdhci-pic32.c
sdhci-pltfm.c mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 2017-04-24 21:41:26 +02:00
sdhci-pltfm.h
sdhci-pxav2.c mmc: sdhci-pxav2: remove unnecessary platform_set_drvdata() call 2017-04-24 21:41:20 +02:00
sdhci-pxav3.c mmc: sdhci: Do not use spin lock in set_ios paths 2017-04-24 21:41:29 +02:00
sdhci-s3c.c mmc: sdhci: Do not use spin lock in set_ios paths 2017-04-24 21:41:29 +02:00
sdhci-sirf.c mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 2017-04-24 21:41:26 +02:00
sdhci-spear.c mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 2017-04-24 21:41:26 +02:00
sdhci-st.c mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 2017-04-24 21:41:26 +02:00
sdhci-tegra.c mmc: tegra: Add Tegra186 support 2017-04-24 21:41:18 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY 2017-04-28 12:33:14 +02:00
sdhci-xenon.c mmc: sdhci-xenon: Fix the work flow in xenon_remove(). 2017-04-28 12:33:05 +02:00
sdhci-xenon.h mmc: sdhci-xenon: Add SoC PHY PAD voltage control 2017-04-24 21:42:17 +02:00
sdhci.c mmc: sdhci: Control the delay between tuning commands 2017-04-24 21:42:27 +02:00
sdhci.h mmc: sdhci: Control the delay between tuning commands 2017-04-24 21:42:27 +02:00
sdricoh_cs.c
sh_mmcif.c mmc: sh_mmcif: Remove unused clk_ctrl2_present from the platform data 2017-02-13 13:19:58 +01:00
sh_mobile_sdhi.c mmc: sh_mobile_sdhi: add support for 2 clocks 2017-02-13 13:20:41 +01:00
sunxi-mmc.c mmc: use new core function mmc_get_dma_dir 2017-04-24 21:41:52 +02:00
tifm_sd.c
tmio_mmc_dma.c mmc: tmio: always unmap DMA before waiting for interrupt 2017-04-24 21:41:40 +02:00
tmio_mmc_pio.c mmc: tmio: always get number of taps 2017-04-24 21:41:41 +02:00
tmio_mmc.c
tmio_mmc.h mmc: host: tmio: fix minor typos in comments 2017-04-24 21:41:15 +02:00
toshsd.c
toshsd.h
usdhi6rol0.c
ushc.c mmc: ushc: fix NULL-deref at probe 2017-03-16 15:31:27 +01:00
via-sdmmc.c mmc: host: Include interrupt.h in mmc host drivers that depends on it 2017-02-13 13:20:01 +01:00
vub300.c mmc: vub300: Don't use mmc_card_present() when validating for inserted card 2017-02-13 13:20:23 +01:00
wbsd.c Annotate hardware config module parameters in drivers/mmc/host/ 2017-04-20 12:02:32 +01:00
wbsd.h
wmt-sdmmc.c mmc: host: Include interrupt.h in mmc host drivers that depends on it 2017-02-13 13:20:01 +01:00