usb: gadget: Replace HTTP links with HTTPS ones
authorAlexander A. Klimov <grandmaster@al2klimov.de>
Fri, 10 Jul 2020 19:09:19 +0000 (21:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jul 2020 14:33:52 +0000 (16:33 +0200)
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200710190919.31464-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/amd5536udc.h
drivers/usb/gadget/udc/amd5536udc_pci.c
drivers/usb/gadget/udc/gr_udc.c
drivers/usb/gadget/udc/gr_udc.h
drivers/usb/gadget/udc/max3420_udc.c
drivers/usb/gadget/udc/snps_udc_core.c

index 0262383f8c79ce699a4f7d6131663ef7642a46e6..3296f3fcee486918c470064e7dc54ef3b670e06c 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * amd5536.h -- header for AMD 5536 UDC high/full speed USB device controller
  *
- * Copyright (C) 2007 AMD (http://www.amd.com)
+ * Copyright (C) 2007 AMD (https://www.amd.com)
  * Author: Thomas Dahlmann
  */
 
index 56258d076abc42550189a52480e27830863012a4..8d387e0e4d91fca0512ea98cfbd21d069e8dcec9 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * amd5536udc_pci.c -- AMD 5536 UDC high/full speed USB device controller
  *
- * Copyright (C) 2005-2007 AMD (http://www.amd.com)
+ * Copyright (C) 2005-2007 AMD (https://www.amd.com)
  * Author: Thomas Dahlmann
  */
 
index 345e28d767098cc0c6c476d0f1621f55ba31dc1f..8c84a559a868137e3a306e60d3c5f8295ba5608a 100644 (file)
@@ -8,7 +8,7 @@
  * GRLIB VHDL IP core library.
  *
  * Full documentation of the GRUSBDC core can be found here:
- * http://www.gaisler.com/products/grlib/grip.pdf
+ * https://www.gaisler.com/products/grlib/grip.pdf
  *
  * Contributors:
  * - Andreas Larsson <andreas@gaisler.com>
index 417ad2aa2cc738342fdf5e8058acaa79d4f7338d..ac5b3f65adb5845f77c30721fc48d7a81f4003f6 100644 (file)
@@ -8,7 +8,7 @@
  * GRLIB VHDL IP core library.
  *
  * Full documentation of the GRUSBDC core can be found here:
- * http://www.gaisler.com/products/grlib/grip.pdf
+ * https://www.gaisler.com/products/grlib/grip.pdf
  *
  * Contributors:
  * - Andreas Larsson <andreas@gaisler.com>
index 52884bae4af11d0e72fb887dfeba8be8c85086b0..35179543c32724b0c645526b854cc3c6a352ae6b 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Based on:
  *     o MAX3420E datasheet
- *             http://datasheets.maximintegrated.com/en/ds/MAX3420E.pdf
+ *             https://datasheets.maximintegrated.com/en/ds/MAX3420E.pdf
  *     o MAX342{0,1}E Programming Guides
  *             https://pdfserv.maximintegrated.com/en/an/AN3598.pdf
  *             https://pdfserv.maximintegrated.com/en/an/AN3785.pdf
index 3fcded31405a7652daacf452373d5360d6e3a229..1102077facdcc2a40ec5c921f7f838b35f86f98e 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * amd5536.c -- AMD 5536 UDC high/full speed USB device controller
  *
- * Copyright (C) 2005-2007 AMD (http://www.amd.com)
+ * Copyright (C) 2005-2007 AMD (https://www.amd.com)
  * Author: Thomas Dahlmann
  */