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
..
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
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 mmc: host: drop owner assignment from platform_drivers 2014-10-20 16:20:56 +02:00
bcm2835.c mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_request 2017-04-24 21:41:53 +02:00
bfin_sdh.c mmc: bfin_sdh: remove the MMC_DATA_STREAM flag 2016-02-29 11:02:59 +01:00
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 mmc: cb710: Move away from using deprecated APIs 2013-10-30 20:26:37 -04:00
cb710-mmc.h mmc: cb710: use to_platform_device() 2016-01-05 18:04:57 +01:00
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 mmc: dw_mmc: exynos: Support eMMC's HS400 mode 2015-03-23 14:13:28 +01:00
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
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.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
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 mmc: mmci: Add qcom dml support to the driver. 2014-09-09 13:58:46 +02: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 mmc: host: use the defined function to check whether card is removable 2016-07-25 10:34:21 +02:00
mxs-mmc.c mmc: mxs-mmc: Implement CMD23 support 2017-02-13 13:20:27 +01:00
of_mmc_spi.c mmc: of_mmc_spi: fix unused warning 2016-03-17 14:54:40 +01:00
omap.c mmc: omap: Don't use mmc_card_present() when validating for inserted card 2017-02-13 13:20:23 +01:00
omap_hsmmc.c mmc: host: omap_hsmmc: checking for NULL instead of IS_ERR() 2017-04-24 21:42:18 +02:00
pxamci.c mmc: pxamci: fix potential oops 2016-07-18 11:50:40 +02:00
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 mmc: s3cmci: Register cpufreq notifier only on S3C24xx 2016-07-25 10:34:46 +02:00
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 mmc: sdhci-bcm-kona: fix error return code in sdhci_bcm_kona_probe() 2016-09-26 21:31:08 +02:00
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 mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdhci-dove.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
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 mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
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 mmc: sdhci-pci: Make sdhci_pci_o2_fujin2_pci_init() static 2015-10-26 16:00:05 +01:00
sdhci-pci.h mmc: sdhci-pci: Add runtime suspend/resume callbacks 2017-04-24 21:41:39 +02:00
sdhci-pic32.c mmc: sdhci-pic32: remove owner assignment 2016-05-02 10:33:25 +02:00
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 mmc: sdhci: remove unneeded (void *) casts in sdhci_(pltfm_)priv() 2016-11-29 09:01:00 +01:00
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
sdhci_f_sdh30.c mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPS 2016-07-29 11:29:04 +02:00
sdricoh_cs.c mmc: sdricoh_cs: Less checks in sdricoh_init_mmc() after, error detection 2016-02-29 11:02:45 +01:00
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 mmc: Convert pr_warning to pr_warn 2014-09-24 10:13:09 +02:00
tmio_mmc.c mmc: TMIO: Use devm_request_irq() 2015-06-01 09:06:48 +02:00
tmio_mmc.h mmc: host: tmio: fix minor typos in comments 2017-04-24 21:41:15 +02:00
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
toshsd.c PM / Runtime: Move ignore_children flag under CONFIG_PM 2016-04-22 01:32:37 +02:00
toshsd.h mmc: add Toshiba PCI SD controller driver 2014-11-26 14:30:58 +01:00
usdhi6rol0.c mmc: usdhi6rol0: add pinctrl to set pin drive strength 2016-05-02 10:36:06 +02:00
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