1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-25 17:53:34 -05:00
linux/drivers/scsi
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
..
aacraid SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
aic7xxx scsi: aic7xxx: fix order of arguments in function prototype 2017-04-19 22:17:23 -04:00
aic94xx scsi: sas: move scsi_remove_host call into sas_remove_host 2017-04-21 10:34:29 -04:00
arcmsr
arm
be2iscsi scsi: be2iscsi: switch to pci_alloc_irq_vectors 2017-03-30 11:37:16 -04:00
bfa scsi: bfa: use designated initializers 2017-04-21 10:11:34 -04:00
bnx2fc
bnx2i
csiostor scsi: csiostor: switch to pci_alloc_irq_vectors 2017-04-06 12:57:03 -04:00
cxgbi scsi: cxgb4i: update module description 2017-04-18 21:55:03 -04:00
cxlflash scsi: cxlflash: Introduce hardware queue steering 2017-04-13 22:55:42 -04:00
device_handler
dpt
esas2r SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
fcoe scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static 2017-04-25 13:00:59 -04:00
fnic
hisi_sas scsi: sas: move scsi_remove_host call into sas_remove_host 2017-04-21 10:34:29 -04:00
ibmvscsi scsi: ibmvfc: don't check for failure from mempool_alloc() 2017-04-18 21:50:29 -04:00
ibmvscsi_tgt
isci scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
libfc scsi: libfc: directly call ELS request handlers 2017-04-11 20:58:26 -04:00
libsas SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
lpfc SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
megaraid drivers/scsi/megaraid: remove expensive inline from megasas_return_cmd 2017-05-08 17:15:14 -07:00
mpt3sas scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
mvsas scsi: sas: move scsi_remove_host call into sas_remove_host 2017-04-21 10:34:29 -04:00
osd char/misc patches for 4.12-rc1 2017-05-04 19:15:35 -07:00
pcmcia
pm8001 scsi: sas: move scsi_remove_host call into sas_remove_host 2017-04-21 10:34:29 -04:00
qedf SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
qedi SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
qla2xxx SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
qla4xxx scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template" 2017-04-26 18:34:34 -04:00
smartpqi
snic SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sym53c8xx_2
ufs SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
.gitignore
3w-9xxx.c
3w-9xxx.h
3w-sas.c
3w-sas.h
3w-xxxx.c
3w-xxxx.h
53c700.c
53c700.h
53c700.scr
53c700_d.h_shipped
a100u2w.c
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c
advansys.c scsi: advansys: fix uninitialized data access 2017-04-04 19:39:39 -04:00
aha152x.c Annotate hardware config module parameters in drivers/scsi/ 2017-04-20 12:02:32 +01:00
aha152x.h
aha1542.c Annotate hardware config module parameters in drivers/scsi/ 2017-04-20 12:02:32 +01:00
aha1542.h
aha1740.c
aha1740.h
am53c974.c
atari_scsi.c
atp870u.c
atp870u.h
BusLogic.c scsi: BusLogic: fix incorrect spelling of adatper_reset_req 2017-04-21 10:31:33 -04:00
BusLogic.h scsi: BusLogic: fix incorrect spelling of adatper_reset_req 2017-04-21 10:31:33 -04:00
bvme6000_scsi.c
ch.c
constants.c
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c
dpti.h
eata.c
eata_generic.h
eata_pio.c
eata_pio.h
esp_scsi.c
esp_scsi.h
fdomain.c
fdomain.h
FlashPoint.c
g_NCR5380.c Annotate hardware config module parameters in drivers/scsi/ 2017-04-20 12:02:32 +01:00
gdth.c Annotate hardware config module parameters in drivers/scsi/ 2017-04-20 12:02:32 +01:00
gdth.h
gdth_ioctl.h
gdth_proc.c
gdth_proc.h
gvp11.c
gvp11.h
hosts.c
hpsa.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
hpsa.h
hpsa_cmd.h
hptiop.c
hptiop.h
imm.c
imm.h
initio.c
initio.h
ipr.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
ipr.h
ips.c
ips.h
iscsi_boot_sysfs.c
iscsi_tcp.c treewide: convert PF_MEMALLOC manipulations to new helpers 2017-05-08 17:15:15 -07:00
iscsi_tcp.h
jazz_esp.c
Kconfig
lasi700.c
libiscsi.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
libiscsi_tcp.c
mac53c94.c
mac53c94.h
mac_esp.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
mac_scsi.c
Makefile scsi: Implement blk_mq_ops.show_rq() 2017-04-26 15:09:04 -06:00
megaraid.c
megaraid.h
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
mvumi.c scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case 2017-04-24 18:16:49 -04:00
mvumi.h
ncr53c8xx.c
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
NCR5380.h
NCR_D700.c
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
nsp32.c
nsp32.h
nsp32_debug.c
nsp32_io.h
osst.c scsi: introduce a result field in struct scsi_request 2017-04-20 12:16:10 -06:00
osst.h
osst_detect.h
osst_options.h
pmcraid.c scsi: pmcraid: use normal copy_from_user 2017-04-24 18:11:22 -04:00
pmcraid.h scsi: pmcraid: fix endianess sparse annotations 2017-04-24 18:11:22 -04:00
ppa.c
ppa.h
ps3rom.c
qla1280.c
qla1280.h
qlogicfas.c Annotate hardware config module parameters in drivers/scsi/ 2017-04-20 12:02:32 +01:00
qlogicfas408.c
qlogicfas408.h
qlogicpti.c
qlogicpti.h
raid_class.c
script_asm.pl
scsi.c
scsi.h
scsi_common.c
scsi_debug.c
scsi_debugfs.c scsi: Implement blk_mq_ops.show_rq() 2017-04-26 15:09:04 -06:00
scsi_debugfs.h scsi: Implement blk_mq_ops.show_rq() 2017-04-26 15:09:04 -06:00
scsi_devinfo.c
scsi_dh.c
scsi_error.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
scsi_ioctl.c
scsi_lib.c Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-05-06 11:25:08 -07:00
scsi_lib_dma.c
scsi_logging.c
scsi_logging.h
scsi_module.c
scsi_netlink.c netlink: extended ACK reporting 2017-04-13 13:58:20 -04:00
scsi_pm.c
scsi_priv.h SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c
scsi_sysctl.c
scsi_sysfs.c
scsi_trace.c
scsi_transport_api.h
scsi_transport_fc.c scsi: scsi_transport_fc: Add dummy initiator role to rport 2017-04-19 19:13:52 -04:00
scsi_transport_iscsi.c scsi: scsi_transport_iscsi: Use flush_work in iscsi_remove_session 2017-03-27 22:03:33 -04:00
scsi_transport_sas.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
scsi_transport_spi.c
scsi_transport_srp.c
scsi_typedefs.h
scsicam.c
sd.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sd.h SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sd_dif.c
sd_zbc.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sense_codes.h
ses.c scsi: ses: don't get power status of SES device slot on probe 2017-04-06 12:48:05 -04:00
sg.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sgiwd93.c
sim710.c
sni_53c710.c
sr.c scsi: sr: Sanity check returned mode data 2017-04-07 17:07:14 -04:00
sr.h
sr_ioctl.c
sr_vendor.c
st.c scsi: introduce a result field in struct scsi_request 2017-04-20 12:16:10 -06:00
st.h
st_options.h
stex.c scsi: stex: make S6flag static 2017-04-26 18:32:29 -04:00
storvsc_drv.c SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sun3_scsi.c
sun3_scsi_vme.c
sun3x_esp.c
sun_esp.c
sym53c416.c
sym53c416.h
virtio_scsi.c virtio: fixes, cleanups, performance 2017-05-10 11:33:08 -07:00
vmw_pvscsi.c
vmw_pvscsi.h
wd33c93.c
wd33c93.h
wd719x.c
wd719x.h
xen-scsifront.c xen/scsifront: use offset_in_page() macro 2017-05-02 11:14:53 +02:00
zalon.c
zorro7xx.c