linux-sg2042/drivers/pcmcia
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 pcmcia: at91_cf: Use syscon to configure the MC/smc 2015-05-20 16:37:38 +02:00
Makefile Revert "pcmcia: add a new resource manager for non ISA systems" 2015-03-11 14:21:23 +01:00
at91_cf.c pcmcia: at91_cf: Use syscon to configure the MC/smc 2015-05-20 16:37:38 +02:00
bcm63xx_pcmcia.c pcmcia: remove DEFINE_PCI_DEVICE_TABLE usage 2014-07-18 16:58:07 -07:00
bcm63xx_pcmcia.h
bfin_cf_pcmcia.c gpio: Include linux/gpio.h instead of asm/gpio.h 2016-02-16 00:20:03 +01:00
cardbus.c pcmcia: Use pci_is_bridge() to simplify code 2014-05-27 14:58:24 -06:00
cirrus.h
cistpl.c pcmcia: do not break rsrc_nonstatic when handling anonymous cards 2015-06-16 07:29:39 +02:00
cs.c Char/Misc driver patches for 4.2-rc1 2015-06-26 14:51:15 -07:00
cs_internal.h pcmcia: correct types 2015-01-12 05:04:12 -08:00
db1xxx_ss.c pcmcia: db1xxx_ss: fix last irq_to_gpio user 2016-03-29 22:48:53 +02:00
ds.c pcmcia: ds: fix suspend/resume 2016-09-12 10:57:00 +01:00
electra_cf.c drivers/pcmcia: NO_IRQ removal for electra_cf.c 2017-03-21 22:09:28 +11:00
i82092.c pcmcia: remove DEFINE_PCI_DEVICE_TABLE usage 2014-07-18 16:58:07 -07:00
i82092aa.h
i82365.c Annotate hardware config module parameters in drivers/pcmcia/ 2017-04-20 12:02:32 +01:00
i82365.h
m32r_cfc.c PCMCIA: Remove commented references to dead class_device_create_file() 2015-05-30 15:29:42 +02:00
m32r_cfc.h
m32r_pcc.c drivers/pcmcia/m32r_pcc.c: check return from add_pcc_socket 2016-12-12 18:55:06 -08:00
m32r_pcc.h
o2micro.h
omap_cf.c pcmcia: Use setup_timer 2015-03-16 21:31:43 +01:00
pcmcia_cis.c pcmcia: Convert dev_printk to dev_<level> 2015-05-30 16:09:04 +02:00
pcmcia_resource.c pcmcia: Convert dev_printk to dev_<level> 2015-05-30 16:09:04 +02:00
pd6729.c pcmcia: Use setup_timer and mod_timer 2015-03-16 21:31:43 +01:00
pd6729.h
pxa2xx_balloon3.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_base.c pcmcia: lubbock: fix sockets configuration 2016-09-12 10:57:01 +01:00
pxa2xx_base.h pcmcia: lubbock: fix sockets configuration 2016-09-12 10:57:01 +01:00
pxa2xx_cm_x2xx.c ARM: PXA: fix includes in pxa2xx_cm_x2xx PCMCIA driver 2011-11-05 22:26:46 +00:00
pxa2xx_cm_x255.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_cm_x270.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_colibri.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_e740.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_hx4700.c pcmcia: add driver for hx4700 2012-05-07 09:56:39 +08:00
pxa2xx_mainstone.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_palmld.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_palmtc.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_palmtx.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_sharpsl.c pcmcia: remove use of __devinit 2012-11-28 12:10:16 -08:00
pxa2xx_stargate2.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_trizeps4.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
pxa2xx_viper.c pcmcia: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pxa2xx_vpac270.c gpio: Include linux/gpio.h instead of asm/gpio.h 2016-02-16 00:20:03 +01:00
ricoh.h
rsrc_iodyn.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
rsrc_mgr.c pcmcia: correct types 2015-01-12 05:04:12 -08:00
rsrc_nonstatic.c pcmcia: Convert dev_printk to dev_<level> 2015-05-30 16:09:04 +02:00
sa11xx_base.c pcmcia: sa11xx_base: add units to the timing information 2016-09-12 10:57:01 +01:00
sa11xx_base.h
sa1100_assabet.c pcmcia: soc_common: add CF socket state helper 2016-09-22 09:39:01 +01:00
sa1100_cerf.c pcmcia: soc_common: add CF socket state helper 2016-09-22 09:39:01 +01:00
sa1100_generic.c pcmcia: sa11x0: convert memory allocation to devm_* API 2015-07-08 11:29:56 +01:00
sa1100_generic.h
sa1100_h3600.c pcmcia: remove use of __devinit 2012-11-28 12:10:16 -08:00
sa1100_nanoengine.c PCMCIA: soc_common: remove explicit wrprot initialization in socket drivers 2012-02-21 14:27:04 +00:00
sa1100_shannon.c pcmcia: remove use of __devinit 2012-11-28 12:10:16 -08:00
sa1100_simpad.c pcmcia: remove use of __devinit 2012-11-28 12:10:16 -08:00
sa1111_badge4.c pcmcia: sa1111: fix propagation of lowlevel board init return code 2016-09-12 10:57:01 +01:00
sa1111_generic.c pcmcia: sa1111: fix propagation of lowlevel board init return code 2016-09-12 10:57:01 +01:00
sa1111_generic.h pcmcia: sa1111: pass sa1111_dev to jornada720 code 2014-11-07 11:24:01 -08:00
sa1111_jornada720.c pcmcia: sa1111: fix propagation of lowlevel board init return code 2016-09-12 10:57:01 +01:00
sa1111_lubbock.c pcmcia: lubbock: fix sockets configuration 2016-09-12 10:57:01 +01:00
sa1111_neponset.c pcmcia: sa1111: fix propagation of lowlevel board init return code 2016-09-12 10:57:01 +01:00
soc_common.c pcmcia: fix return value of soc_pcmcia_regulator_set 2016-11-11 08:45:08 -08:00
soc_common.h pcmcia: soc_common: add driver-data pointer 2016-09-22 09:39:16 +01:00
socket_sysfs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tcic.c Annotate hardware config module parameters in drivers/pcmcia/ 2017-04-20 12:02:32 +01:00
tcic.h
ti113x.h pcmcia: Convert dev_printk to dev_<level> 2015-05-30 16:09:04 +02:00
topic.h Disable write buffering on Toshiba ToPIC95 2015-06-13 23:40:21 +02:00
vg468.h
vrc4171_card.c pcmcia/vrc4171: Remove typedefs for enums and struct 2015-05-30 15:55:36 +02:00
vrc4173_cardu.c pcmcia: remove DEFINE_PCI_DEVICE_TABLE usage 2014-07-18 16:58:07 -07:00
vrc4173_cardu.h
xxs1500_ss.c drivers/pcmcia: include <module.h> for modular xxs1500_ss code 2015-06-16 14:12:25 -04:00
yenta_socket.c pcmcia: Fix resource leaks in yenta_probe() and _close() 2015-06-14 21:35:45 +02:00
yenta_socket.h