diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-21 17:45:38 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-21 17:45:38 +0100 |
commit | ea3e160ff061f5b69962585744cac9df6557ce51 (patch) | |
tree | ccdf32bff5dddfc031c6cadfe836239b94f5b1c2 | |
parent | a47b7cd1ae58ea0b41b69de496d6940a43b870df (diff) | |
download | patches-ea3e160ff061f5b69962585744cac9df6557ce51.tar.gz |
more patches
-rw-r--r-- | 0003-IN_BADCLASS-fix-macro-to-actually-work.patch | 32 | ||||
-rw-r--r-- | 0003-USB-serial-keyspan_usa-add-proper-SPDX-lines-for-.h-.patch | 54 | ||||
-rw-r--r-- | 0004-USB-host-whci-rename-Kbuild-file.patch | 50 | ||||
-rw-r--r-- | 0005-USB-usbip-delete-README-file.patch | 26 | ||||
-rw-r--r-- | 0006-USB-remove-README-file.patch | 71 | ||||
-rw-r--r-- | 0007-USB-add-missing-SPDX-lines-to-Kconfig-and-Makefiles.patch | 281 | ||||
-rw-r--r-- | 0008-tty-Handle-problem-if-line-discipline-does-not-have-.patch | 29 | ||||
-rw-r--r-- | 0009-tty-ldisc-add-sysctl-to-prevent-autoloading-of-ldisc.patch | 137 | ||||
-rw-r--r-- | series | 8 |
9 files changed, 655 insertions, 33 deletions
diff --git a/0003-IN_BADCLASS-fix-macro-to-actually-work.patch b/0003-IN_BADCLASS-fix-macro-to-actually-work.patch deleted file mode 100644 index 38161debd14d78..00000000000000 --- a/0003-IN_BADCLASS-fix-macro-to-actually-work.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 96df48c8dd927cb3628d0364a5371ca7f5812c02 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Date: Thu, 10 Jan 2019 21:19:44 +0100 -Subject: [PATCH 3/3] IN_BADCLASS: fix macro to actually work - -Commit 65cab850f0ee ("net: Allow class-e address assignment via ifconfig -ioctl") modified the IN_BADCLASS macro a bit, but unfortunatly one too -many '(' characters were added to the line, making any code that used -it, not build properly. - -Also, the macro now compares an unsigned with a signed value, which -isn't ok, so fix that up by making both types match properly. - -Reported-by: Christopher Ferris <cferris@google.com> -Fixes: 65cab850f0ee ("net: Allow class-e address assignment via ifconfig ioctl") -Cc: Dave Taht <dave.taht@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---- - include/uapi/linux/in.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/include/uapi/linux/in.h -+++ b/include/uapi/linux/in.h -@@ -268,7 +268,7 @@ struct sockaddr_in { - #define IN_MULTICAST(a) IN_CLASSD(a) - #define IN_MULTICAST_NET 0xe0000000 - --#define IN_BADCLASS(a) ((((long int) (a) ) == 0xffffffff) -+#define IN_BADCLASS(a) (((long int) (a) ) == (long int)0xffffffff) - #define IN_EXPERIMENTAL(a) IN_BADCLASS((a)) - - #define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) diff --git a/0003-USB-serial-keyspan_usa-add-proper-SPDX-lines-for-.h-.patch b/0003-USB-serial-keyspan_usa-add-proper-SPDX-lines-for-.h-.patch new file mode 100644 index 00000000000000..3220abd303af53 --- /dev/null +++ b/0003-USB-serial-keyspan_usa-add-proper-SPDX-lines-for-.h-.patch @@ -0,0 +1,54 @@ +From f5fa2daf1af6367da7784f7219bb2927f6a11f26 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Thu, 17 Jan 2019 09:14:27 +0100 +Subject: [PATCH 03/11] USB: serial: keyspan_usa: add proper SPDX lines for .h + files + +The keyspan_usa??msg.h files are under a BSD-3 style license, so +properly label them as such with a SPDX line at the top of the file. + +Cc: Johan Hovold <johan@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/serial/keyspan_usa26msg.h | 1 + + drivers/usb/serial/keyspan_usa28msg.h | 1 + + drivers/usb/serial/keyspan_usa49msg.h | 1 + + drivers/usb/serial/keyspan_usa67msg.h | 1 + + drivers/usb/serial/keyspan_usa90msg.h | 1 + + 5 files changed, 5 insertions(+) + +--- a/drivers/usb/serial/keyspan_usa26msg.h ++++ b/drivers/usb/serial/keyspan_usa26msg.h +@@ -1,3 +1,4 @@ ++/* SPDX-License-Identifier: BSD-3-Clause */ + /* + usa26msg.h + +--- a/drivers/usb/serial/keyspan_usa28msg.h ++++ b/drivers/usb/serial/keyspan_usa28msg.h +@@ -1,3 +1,4 @@ ++/* SPDX-License-Identifier: BSD-3-Clause */ + /* + usa28msg.h + +--- a/drivers/usb/serial/keyspan_usa49msg.h ++++ b/drivers/usb/serial/keyspan_usa49msg.h +@@ -1,3 +1,4 @@ ++/* SPDX-License-Identifier: BSD-3-Clause */ + /* + usa49msg.h + +--- a/drivers/usb/serial/keyspan_usa67msg.h ++++ b/drivers/usb/serial/keyspan_usa67msg.h +@@ -1,3 +1,4 @@ ++/* SPDX-License-Identifier: BSD-3-Clause */ + /* + usa67msg.h + +--- a/drivers/usb/serial/keyspan_usa90msg.h ++++ b/drivers/usb/serial/keyspan_usa90msg.h +@@ -1,3 +1,4 @@ ++/* SPDX-License-Identifier: BSD-3-Clause */ + /* + usa90msg.h + diff --git a/0004-USB-host-whci-rename-Kbuild-file.patch b/0004-USB-host-whci-rename-Kbuild-file.patch new file mode 100644 index 00000000000000..bf0024bb05e5a0 --- /dev/null +++ b/0004-USB-host-whci-rename-Kbuild-file.patch @@ -0,0 +1,50 @@ +From 23443c60aeff81e10c788ab8e07bbe83189a2a33 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Thu, 17 Jan 2019 09:16:00 +0100 +Subject: [PATCH 04/11] USB: host: whci: rename Kbuild file + +We have been using Makefile for well over a decade now, use that name +instead of Kbuild. + +Also, while moving the file, add the proper SPDX identifier at the top +of it. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/host/whci/Kbuild | 12 ------------ + drivers/usb/host/whci/Makefile | 14 ++++++++++++++ + 2 files changed, 14 insertions(+), 12 deletions(-) + rename drivers/usb/host/whci/{Kbuild => Makefile} (79%) + +--- a/drivers/usb/host/whci/Kbuild ++++ /dev/null +@@ -1,12 +0,0 @@ +-obj-$(CONFIG_USB_WHCI_HCD) += whci-hcd.o +- +-whci-hcd-y := \ +- asl.o \ +- debug.o \ +- hcd.o \ +- hw.o \ +- init.o \ +- int.o \ +- pzl.o \ +- qset.o \ +- wusb.o +--- /dev/null ++++ b/drivers/usb/host/whci/Makefile +@@ -0,0 +1,14 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ ++obj-$(CONFIG_USB_WHCI_HCD) += whci-hcd.o ++ ++whci-hcd-y := \ ++ asl.o \ ++ debug.o \ ++ hcd.o \ ++ hw.o \ ++ init.o \ ++ int.o \ ++ pzl.o \ ++ qset.o \ ++ wusb.o diff --git a/0005-USB-usbip-delete-README-file.patch b/0005-USB-usbip-delete-README-file.patch new file mode 100644 index 00000000000000..143653d1f4b552 --- /dev/null +++ b/0005-USB-usbip-delete-README-file.patch @@ -0,0 +1,26 @@ +From fb31307b19e41465cd404336b03f75d1ce3b8a79 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Thu, 17 Jan 2019 09:17:03 +0100 +Subject: [PATCH 05/11] USB: usbip: delete README file + +The README file ni the drivers/usb/usbip/ directory is not needed +anymore, so just delete it. + +Cc: Valentina Manea <valentina.manea.m@gmail.com> +Cc: Shuah Khan <shuah@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/usbip/README | 7 ------- + 1 file changed, 7 deletions(-) + delete mode 100644 drivers/usb/usbip/README + +--- a/drivers/usb/usbip/README ++++ /dev/null +@@ -1,7 +0,0 @@ +-TODO: +- - more discussion about the protocol +- - testing +- - review of the userspace interface +- - document the protocol +- +-Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com> diff --git a/0006-USB-remove-README-file.patch b/0006-USB-remove-README-file.patch new file mode 100644 index 00000000000000..a5586784302a7c --- /dev/null +++ b/0006-USB-remove-README-file.patch @@ -0,0 +1,71 @@ +From 02f6a3c9cceaa28eb4c05bcc3c40d1653de1a93c Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Thu, 17 Jan 2019 09:17:39 +0100 +Subject: [PATCH 06/11] USB: remove README file + +This file is really really old, and doesn't make any sense to keep +around anymore, so just drop it. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/README | 54 ----------------------------------------------------- + 1 file changed, 54 deletions(-) + delete mode 100644 drivers/usb/README + +--- a/drivers/usb/README ++++ /dev/null +@@ -1,54 +0,0 @@ +-To understand all the Linux-USB framework, you'll use these resources: +- +- * This source code. This is necessarily an evolving work, and +- includes kerneldoc that should help you get a current overview. +- ("make pdfdocs", and then look at "usb.pdf" for host side and +- "gadget.pdf" for peripheral side.) Also, Documentation/usb has +- more information. +- +- * The USB 2.0 specification (from www.usb.org), with supplements +- such as those for USB OTG and the various device classes. +- The USB specification has a good overview chapter, and USB +- peripherals conform to the widely known "Chapter 9". +- +- * Chip specifications for USB controllers. Examples include +- host controllers (on PCs, servers, and more); peripheral +- controllers (in devices with Linux firmware, like printers or +- cell phones); and hard-wired peripherals like Ethernet adapters. +- +- * Specifications for other protocols implemented by USB peripheral +- functions. Some are vendor-specific; others are vendor-neutral +- but just standardized outside of the www.usb.org team. +- +-Here is a list of what each subdirectory here is, and what is contained in +-them. +- +-core/ - This is for the core USB host code, including the +- usbfs files and the hub class driver ("hub_wq"). +- +-host/ - This is for USB host controller drivers. This +- includes UHCI, OHCI, EHCI, and others that might +- be used with more specialized "embedded" systems. +- +-gadget/ - This is for USB peripheral controller drivers and +- the various gadget drivers which talk to them. +- +- +-Individual USB driver directories. A new driver should be added to the +-first subdirectory in the list below that it fits into. +- +-image/ - This is for still image drivers, like scanners or +- digital cameras. +-../input/ - This is for any driver that uses the input subsystem, +- like keyboard, mice, touchscreens, tablets, etc. +-../media/ - This is for multimedia drivers, like video cameras, +- radios, and any other drivers that talk to the v4l +- subsystem. +-../net/ - This is for network drivers. +-serial/ - This is for USB to serial drivers. +-storage/ - This is for USB mass-storage drivers. +-class/ - This is for all USB device drivers that do not fit +- into any of the above categories, and work for a range +- of USB Class specified devices. +-misc/ - This is for all USB device drivers that do not fit +- into any of the above categories. diff --git a/0007-USB-add-missing-SPDX-lines-to-Kconfig-and-Makefiles.patch b/0007-USB-add-missing-SPDX-lines-to-Kconfig-and-Makefiles.patch new file mode 100644 index 00000000000000..d403f0b57d45f3 --- /dev/null +++ b/0007-USB-add-missing-SPDX-lines-to-Kconfig-and-Makefiles.patch @@ -0,0 +1,281 @@ +From 51da7f15581cc270c2dba8c9d668c084b21f57bc Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Thu, 17 Jan 2019 09:18:29 +0100 +Subject: [PATCH 07/11] USB: add missing SPDX lines to Kconfig and Makefiles + +There are a few remaining drivers/usb/ files that do not have SPDX +identifiers in them, all of these are either Kconfig or Makefiles. Add +the correct GPL-2.0 identifier to them to make scanning tools happy. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/usb/Kconfig | 1 + + drivers/usb/atm/Kconfig | 1 + + drivers/usb/chipidea/Kconfig | 2 ++ + drivers/usb/class/Kconfig | 1 + + drivers/usb/core/Kconfig | 1 + + drivers/usb/dwc2/Kconfig | 2 ++ + drivers/usb/dwc3/Kconfig | 2 ++ + drivers/usb/gadget/Kconfig | 1 + + drivers/usb/gadget/legacy/Kconfig | 1 + + drivers/usb/gadget/udc/Kconfig | 1 + + drivers/usb/gadget/udc/bdc/Kconfig | 2 ++ + drivers/usb/host/Kconfig | 1 + + drivers/usb/image/Kconfig | 1 + + drivers/usb/isp1760/Kconfig | 2 ++ + drivers/usb/misc/Kconfig | 1 + + drivers/usb/misc/sisusbvga/Kconfig | 1 + + drivers/usb/mon/Kconfig | 1 + + drivers/usb/mtu3/Kconfig | 2 ++ + drivers/usb/musb/Kconfig | 1 + + drivers/usb/phy/Kconfig | 1 + + drivers/usb/roles/Kconfig | 2 ++ + drivers/usb/roles/Makefile | 2 ++ + drivers/usb/serial/Kconfig | 1 + + drivers/usb/storage/Kconfig | 1 + + drivers/usb/typec/Kconfig | 1 + + drivers/usb/typec/altmodes/Kconfig | 1 + + drivers/usb/typec/altmodes/Makefile | 2 ++ + drivers/usb/typec/mux/Kconfig | 2 ++ + drivers/usb/typec/tcpm/Kconfig | 2 ++ + drivers/usb/typec/ucsi/Kconfig | 2 ++ + drivers/usb/usbip/Kconfig | 2 ++ + drivers/usb/wusbcore/Kconfig | 1 + + 32 files changed, 45 insertions(+) + +--- a/drivers/usb/Kconfig ++++ b/drivers/usb/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB device configuration + # +--- a/drivers/usb/atm/Kconfig ++++ b/drivers/usb/atm/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB/ATM DSL configuration + # +--- a/drivers/usb/chipidea/Kconfig ++++ b/drivers/usb/chipidea/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_CHIPIDEA + tristate "ChipIdea Highspeed Dual Role Controller" + depends on ((USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && !USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)) && HAS_DMA +--- a/drivers/usb/class/Kconfig ++++ b/drivers/usb/class/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Class driver configuration + # +--- a/drivers/usb/core/Kconfig ++++ b/drivers/usb/core/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Core configuration + # +--- a/drivers/usb/dwc2/Kconfig ++++ b/drivers/usb/dwc2/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_DWC2 + tristate "DesignWare USB2 DRD Core Support" + depends on HAS_DMA +--- a/drivers/usb/dwc3/Kconfig ++++ b/drivers/usb/dwc3/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_DWC3 + tristate "DesignWare USB3 DRD Core Support" + depends on (USB || USB_GADGET) && HAS_DMA +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Gadget support on a system involves + # (a) a peripheral controller, and +--- a/drivers/usb/gadget/legacy/Kconfig ++++ b/drivers/usb/gadget/legacy/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Gadget support on a system involves + # (a) a peripheral controller, and +--- a/drivers/usb/gadget/udc/Kconfig ++++ b/drivers/usb/gadget/udc/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Gadget support on a system involves + # (a) a peripheral controller, and +--- a/drivers/usb/gadget/udc/bdc/Kconfig ++++ b/drivers/usb/gadget/udc/bdc/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_BDC_UDC + tristate "Broadcom USB3.0 device controller IP driver(BDC)" + depends on USB_GADGET && HAS_DMA +--- a/drivers/usb/host/Kconfig ++++ b/drivers/usb/host/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Host Controller Drivers + # +--- a/drivers/usb/image/Kconfig ++++ b/drivers/usb/image/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Imaging devices configuration + # +--- a/drivers/usb/isp1760/Kconfig ++++ b/drivers/usb/isp1760/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_ISP1760 + tristate "NXP ISP 1760/1761 support" + depends on USB || USB_GADGET +--- a/drivers/usb/misc/Kconfig ++++ b/drivers/usb/misc/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Miscellaneous driver configuration + # +--- a/drivers/usb/misc/sisusbvga/Kconfig ++++ b/drivers/usb/misc/sisusbvga/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + + config USB_SISUSBVGA + tristate "USB 2.0 SVGA dongle support (Net2280/SiS315)" +--- a/drivers/usb/mon/Kconfig ++++ b/drivers/usb/mon/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Monitor configuration + # +--- a/drivers/usb/mtu3/Kconfig ++++ b/drivers/usb/mtu3/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++# + # For MTK USB3.0 IP + + config USB_MTU3 +--- a/drivers/usb/musb/Kconfig ++++ b/drivers/usb/musb/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Dual Role (OTG-ready) Controller Drivers + # for silicon based on Mentor Graphics INVENTRA designs +--- a/drivers/usb/phy/Kconfig ++++ b/drivers/usb/phy/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # Physical Layer USB driver configuration + # +--- a/drivers/usb/roles/Kconfig ++++ b/drivers/usb/roles/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USB_ROLE_SWITCH + tristate "USB Role Switch Support" + help +--- a/drivers/usb/roles/Makefile ++++ b/drivers/usb/roles/Makefile +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o + roles-y := class.o + obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o +--- a/drivers/usb/serial/Kconfig ++++ b/drivers/usb/serial/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Serial device configuration + # +--- a/drivers/usb/storage/Kconfig ++++ b/drivers/usb/storage/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # USB Storage driver configuration + # +--- a/drivers/usb/typec/Kconfig ++++ b/drivers/usb/typec/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + + menuconfig TYPEC + tristate "USB Type-C Support" +--- a/drivers/usb/typec/altmodes/Kconfig ++++ b/drivers/usb/typec/altmodes/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + + menu "USB Type-C Alternate Mode drivers" + +--- a/drivers/usb/typec/altmodes/Makefile ++++ b/drivers/usb/typec/altmodes/Makefile +@@ -1,2 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + obj-$(CONFIG_TYPEC_DP_ALTMODE) += typec_displayport.o + typec_displayport-y := displayport.o +--- a/drivers/usb/typec/mux/Kconfig ++++ b/drivers/usb/typec/mux/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + menu "USB Type-C Multiplexer/DeMultiplexer Switch support" + + config TYPEC_MUX_PI3USB30532 +--- a/drivers/usb/typec/tcpm/Kconfig ++++ b/drivers/usb/typec/tcpm/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config TYPEC_TCPM + tristate "USB Type-C Port Controller Manager" + depends on USB +--- a/drivers/usb/typec/ucsi/Kconfig ++++ b/drivers/usb/typec/ucsi/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config TYPEC_UCSI + tristate "USB Type-C Connector System Software Interface driver" + depends on !CPU_BIG_ENDIAN +--- a/drivers/usb/usbip/Kconfig ++++ b/drivers/usb/usbip/Kconfig +@@ -1,3 +1,5 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ + config USBIP_CORE + tristate "USB/IP support" + depends on NET +--- a/drivers/usb/wusbcore/Kconfig ++++ b/drivers/usb/wusbcore/Kconfig +@@ -1,3 +1,4 @@ ++# SPDX-License-Identifier: GPL-2.0 + # + # Wireless USB Core configuration + # diff --git a/0008-tty-Handle-problem-if-line-discipline-does-not-have-.patch b/0008-tty-Handle-problem-if-line-discipline-does-not-have-.patch new file mode 100644 index 00000000000000..acd33e2ef78951 --- /dev/null +++ b/0008-tty-Handle-problem-if-line-discipline-does-not-have-.patch @@ -0,0 +1,29 @@ +From 19e08b371b6795e009f09cdcf30f76ad0f1db037 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Sun, 20 Jan 2019 10:46:58 +0100 +Subject: [PATCH 08/11] tty: Handle problem if line discipline does not have + receive_buf + +Some tty line disciplines do not have a receive buf callback, so +properly check for that before calling it. If they do not have this +callback, just eat the character quietly, as we can't fail this call. + +Reported-by: Jann Horn <jannh@google.com> +Cc: stable <stable@vger.kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/tty/tty_io.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -2189,7 +2189,8 @@ static int tiocsti(struct tty_struct *tt + ld = tty_ldisc_ref_wait(tty); + if (!ld) + return -EIO; +- ld->ops->receive_buf(tty, &ch, &mbz, 1); ++ if (ld->ops->receive_buf) ++ ld->ops->receive_buf(tty, &ch, &mbz, 1); + tty_ldisc_deref(ld); + return 0; + } diff --git a/0009-tty-ldisc-add-sysctl-to-prevent-autoloading-of-ldisc.patch b/0009-tty-ldisc-add-sysctl-to-prevent-autoloading-of-ldisc.patch new file mode 100644 index 00000000000000..e5039346d971e6 --- /dev/null +++ b/0009-tty-ldisc-add-sysctl-to-prevent-autoloading-of-ldisc.patch @@ -0,0 +1,137 @@ +From 813613139b98f5c811441d1292ffd1760b55defa Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Date: Mon, 21 Jan 2019 09:45:58 +0100 +Subject: [PATCH 09/11] tty: ldisc: add sysctl to prevent autoloading of ldiscs + +By default, the kernel will automatically load the module of any line +dicipline that is asked for. As this sometimes isn't the safest thing +to do, provide a sysctl to disable this feature. + +By default, we set this to 'y' as that is the historical way that Linux +has worked, and we do not want to break working systems. But in the +future, perhaps this can default to 'n' to prevent this functionality. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/tty/Kconfig | 24 ++++++++++++++++++++++++ + drivers/tty/tty_io.c | 3 +++ + drivers/tty/tty_ldisc.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 74 insertions(+) + +--- a/drivers/tty/Kconfig ++++ b/drivers/tty/Kconfig +@@ -441,4 +441,28 @@ config VCC + depends on SUN_LDOMS + help + Support for Sun logical domain consoles. ++ ++config LDISC_AUTOLOAD ++ bool "Automatically load TTY Line Disciplines" ++ default y ++ help ++ Historically the kernel has always automatically loaded any ++ line discipline that is in a kernel module when a user asks ++ for it to be loaded with the TIOCSETD ioctl, or through other ++ means. This is not always the best thing to do on systems ++ where you know you will not be using some of the more ++ "ancient" line disciplines, so prevent the kernel from doing ++ this unless the request is coming from a process with the ++ CAP_SYS_MODULE permissions. ++ ++ Say 'Y' here if you trust your userspace users to do the right ++ thing, or if you have only provided the line disciplines that ++ you know you will be using, or if you wish to continue to use ++ the traditional method of on-demand loading of these modules ++ by any user. ++ ++ This functionality can be changed at runtime with the ++ dev.tty.ldisc_autoload sysctl, this configuration option will ++ only set the default value of this functionality. ++ + endif # TTY +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -513,6 +513,8 @@ static const struct file_operations hung + static DEFINE_SPINLOCK(redirect_lock); + static struct file *redirect; + ++extern void tty_sysctl_init(void); ++ + /** + * tty_wakeup - request more data + * @tty: terminal +@@ -3483,6 +3485,7 @@ void console_sysfs_notify(void) + */ + int __init tty_init(void) + { ++ tty_sysctl_init(); + cdev_init(&tty_cdev, &tty_fops); + if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) +--- a/drivers/tty/tty_ldisc.c ++++ b/drivers/tty/tty_ldisc.c +@@ -156,6 +156,13 @@ static void put_ldops(struct tty_ldisc_o + * takes tty_ldiscs_lock to guard against ldisc races + */ + ++#if defined(CONFIG_LDISC_AUTOLOAD) ++ #define INITIAL_AUTOLOAD_STATE 1 ++#else ++ #define INITIAL_AUTOLOAD_STATE 0 ++#endif ++static int tty_ldisc_autoload = INITIAL_AUTOLOAD_STATE; ++ + static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) + { + struct tty_ldisc *ld; +@@ -170,6 +177,8 @@ static struct tty_ldisc *tty_ldisc_get(s + */ + ldops = get_ldops(disc); + if (IS_ERR(ldops)) { ++ if (!capable(CAP_SYS_MODULE) && !tty_ldisc_autoload) ++ return ERR_PTR(-EPERM); + request_module("tty-ldisc-%d", disc); + ldops = get_ldops(disc); + if (IS_ERR(ldops)) +@@ -845,3 +854,41 @@ void tty_ldisc_deinit(struct tty_struct + tty_ldisc_put(tty->ldisc); + tty->ldisc = NULL; + } ++ ++static int zero; ++static int one = 1; ++static struct ctl_table tty_table[] = { ++ { ++ .procname = "ldisc_autoload", ++ .data = &tty_ldisc_autoload, ++ .maxlen = sizeof(tty_ldisc_autoload), ++ .mode = 0644, ++ .proc_handler = proc_dointvec, ++ .extra1 = &zero, ++ .extra2 = &one, ++ }, ++ { } ++}; ++ ++static struct ctl_table tty_dir_table[] = { ++ { ++ .procname = "tty", ++ .mode = 0555, ++ .child = tty_table, ++ }, ++ { } ++}; ++ ++static struct ctl_table tty_root_table[] = { ++ { ++ .procname = "dev", ++ .mode = 0555, ++ .child = tty_dir_table, ++ }, ++ { } ++}; ++ ++void tty_sysctl_init(void) ++{ ++ register_sysctl_table(tty_root_table); ++} @@ -3,7 +3,13 @@ spdxcheck-print-out-files-without-any-spdx-lines.patch 0001-Bluetooth-check-message-types-in-l2cap_get_conf_opt.patch 0002-Bluetooth-check-the-buffer-size-for-some-messages-be.patch -0003-IN_BADCLASS-fix-macro-to-actually-work.patch +0003-USB-serial-keyspan_usa-add-proper-SPDX-lines-for-.h-.patch +0004-USB-host-whci-rename-Kbuild-file.patch +0005-USB-usbip-delete-README-file.patch +0006-USB-remove-README-file.patch +0007-USB-add-missing-SPDX-lines-to-Kconfig-and-Makefiles.patch +0008-tty-Handle-problem-if-line-discipline-does-not-have-.patch +0009-tty-ldisc-add-sysctl-to-prevent-autoloading-of-ldisc.patch p00 p01 p02 |