linux/drivers/tty/serial
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
..
8250 Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
cpm_uart tty: serial: cpm_uart: make use of for_each_node_by_type() 2017-02-03 10:12:16 +01:00
jsm tty: serial: jsm_tty: constify uart_ops structures 2016-09-02 15:01:16 +02:00
21285.c
altera_jtaguart.c serial: altera_jtaguart: add earlycon support 2017-03-17 14:14:00 +09:00
altera_uart.c serial: altera_uart: add earlycon support 2017-03-31 16:56:10 +02:00
amba-pl010.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
amba-pl011.c tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44 2017-04-18 17:47:42 +02:00
amba-pl011.h
apbuart.c
apbuart.h
ar933x_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
arc_uart.c serial/arc: constify uart_ops structures 2016-09-01 21:05:41 +02:00
atmel_serial.c Merge 4.11-rc5 into tty-next 2017-04-03 14:18:16 +02:00
atmel_serial.h tty/serial: atmel: move atmel_serial header into driver directory 2017-03-14 10:59:04 +08:00
bcm63xx_uart.c serial/bcm63xx_uart: constify uart_ops structures 2016-09-02 15:01:16 +02:00
bfin_sport_uart.c tty: serial: constify dev_pm_ops structures 2017-01-19 14:20:23 +01:00
bfin_sport_uart.h
bfin_uart.c
clps711x.c serial: clps711x: Changing the compatibility string to match with the smallest supported chip 2016-07-06 17:38:16 +02:00
crisv10.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
crisv10.h
digicolor-usart.c tty/serial: digicolor: Fix bad usage of IS_ERR_VALUE 2016-02-14 17:39:36 -08:00
dz.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
dz.h
earlycon-arm-semihost.c tty/serial: mark __init early_smh_setup() static 2016-09-02 15:03:35 +02:00
earlycon.c ACPI: parse SPCR and enable matching console 2016-09-28 17:46:46 +02:00
efm32-uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
etraxfs-uart.c
fsl_lpuart.c tty: serial: fsl_lpuart: lock port on console write 2017-03-31 16:56:10 +02:00
icom.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
icom.h
ifx6x60.c serial: ifx6x60: Free memory when probe fails 2016-11-10 14:50:46 +01:00
ifx6x60.h
imx.c imx-serial: Reduce RX DMA startup latency when opening for reading 2017-04-11 21:36:43 +02:00
ioc3_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
ioc4_serial.c scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
ip22zilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
ip22zilog.h
Kconfig serial: altera_uart: add earlycon support 2017-03-31 16:56:10 +02:00
kgdb_nmi.c
kgdboc.c
lantiq.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
lpc32xx_hs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
m32r_sio_reg.h
m32r_sio.c serial: m32r_sio: make it explicitly non-modular 2016-06-25 14:00:06 -07:00
Makefile serial: small Makefile reordering 2017-04-18 18:01:52 +02:00
max310x.c serial: max310x: Add support for newer silicon revisions 2017-01-12 11:51:24 +01:00
max3100.c tty: serial: constify uart_ops structures 2016-09-02 15:01:16 +02:00
mcf.c
men_z135_uart.c tty: serial: constify uart_ops structures 2016-09-02 15:01:16 +02:00
meson_uart.c tty: serial: meson: allow baud-rates higher than 115200 2017-01-19 14:38:57 +01:00
mpc52xx_uart.c tty: serial: constify psc_ops structs 2016-02-06 22:31:47 -08:00
mps2-uart.c serial: mps2-uart: make driver explicitly non-modular 2016-06-25 14:01:57 -07:00
mpsc.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
msm_serial.c tty: serial: msm: Fix module autoload 2017-01-12 11:51:25 +01:00
mux.c
mvebu-uart.c serial: mvebu-uart: free the IRQ in ->shutdown() 2016-06-25 14:00:06 -07:00
mxs-auart.c serial: mxs-auart: Fix baudrate calculation 2017-03-31 17:26:19 +02:00
netx-serial.c
omap-serial.c tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init 2017-04-12 22:12:16 +02:00
pch_uart.c serial: pch_uart: add terminate entry for dmi_system_id tables 2016-10-27 16:01:31 +02:00
pic32_uart.c serial: pic32_uart: Fix 'request_irq' and 'free_irq' inconsistancy 2017-01-12 11:51:24 +01:00
pic32_uart.h serial: pic32_uart: Add PIC32 UART driver 2016-05-13 14:01:56 +02:00
pmac_zilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
pmac_zilog.h
pnx8xxx_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
pxa.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
rp2.c
sa1100.c
samsung.c serial: samsung: Remove useless spinlock 2017-04-08 18:58:52 +02:00
samsung.h serial: samsung: Simplify DMA engine initialization code 2017-01-12 11:51:24 +01:00
sb1250-duart.c drivers: convert sbd_duart.map_guard from atomic_t to refcount_t 2017-03-14 11:01:40 +08:00
sc16is7xx.c sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
sccnxp.c
serial_core.c serial: core: Re-use struct uart_port {name} field 2017-04-08 18:51:57 +02:00
serial_ks8695.c serial: Fix ASYNC_* => UPF_* flags misuse 2016-01-28 14:17:42 -08:00
serial_mctrl_gpio.c serial: mctrl_gpio: enable API usage only for initialized mctrl_gpios struct 2016-06-25 14:30:42 -07:00
serial_mctrl_gpio.h serial: mctrl_gpio: add modem control read routine 2016-06-25 14:30:42 -07:00
serial_txx9.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
serial-tegra.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sh-sci.c serial: sh-sci: Fix (AUTO)RTS in sci_init_pins() 2017-03-31 15:29:06 +02:00
sh-sci.h serial: sh-sci: consider DR (data ready) bit adequately 2017-02-03 10:14:10 +01:00
sirfsoc_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sirfsoc_uart.h serial: sirf: make fifo functions static 2016-06-25 14:01:57 -07:00
sn_console.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sprd_serial.c serial: sprd: adjust TIMEOUT to a big value 2017-04-08 18:42:47 +02:00
st-asc.c TTY/Serial patches for 4.12-rc1 2017-05-08 18:49:23 -07:00
stm32-usart.c serial: stm32: mark symbols static where possible 2016-09-27 12:55:27 +02:00
stm32-usart.h serial: stm32: Fix comparisons with undefined register 2016-10-27 16:00:31 +02:00
suncore.c
sunhv.c sparc64: Send break twice from console to return to boot prom 2017-02-23 08:27:24 -08:00
sunsab.c
sunsab.h
sunsu.c serial: sunsu: Free memory when probe fails 2016-11-16 10:57:26 +01:00
sunzilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sunzilog.h
tilegx.c
timbuart.c tty: serial: constify uart_ops structures 2016-09-02 15:01:16 +02:00
timbuart.h
uartlite.c uartlite: Adding a kernel parameter for the number of uartlites 2017-03-17 14:14:30 +09:00
ucc_uart.c QE-UART: add "fsl,t1040-ucc-uart" to of_device_id 2016-05-01 13:55:12 -07:00
vr41xx_siu.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
vt8500_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
xilinx_uartps.c serial: xuartps: Enable clocks in the pm disable case also 2017-04-08 18:54:07 +02:00
zs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
zs.h