linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
@ 2020-06-09 20:12 Alexander A. Klimov
  2020-06-10  8:57 ` Federico Vaga
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander A. Klimov @ 2020-06-09 20:12 UTC (permalink / raw)
  To: Federico Vaga, Jonathan Corbet, Alexander A. Klimov,
	Mauro Carvalho Chehab, David Sterba, Randy Dunlap,
	Theodore Ts'o, Darrick J. Wong, Pankaj Bharadiya, Kees Cook,
	Jacob Huisman, Jonathan Neuschäfer, Rob Herring, linux-doc,
	linux-kernel, clang-built-linux

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:
  For each line:
    If doesn't contain `\bxmlns\b`:
      For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
        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>
---
 .../translations/it_IT/admin-guide/README.rst      |  2 +-
 .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
 .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
 .../translations/it_IT/process/2.Process.rst       | 12 ++++++------
 .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
 .../translations/it_IT/process/4.Coding.rst        |  4 ++--
 .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
 .../translations/it_IT/process/8.Conclusion.rst    | 14 +++++++-------
 .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
 .../translations/it_IT/process/changes.rst         |  6 +++---
 .../translations/it_IT/process/clang-format.rst    |  2 +-
 .../translations/it_IT/process/coding-style.rst    |  2 +-
 Documentation/translations/it_IT/process/howto.rst |  2 +-
 .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
 .../it_IT/process/submitting-patches.rst           |  4 ++--
 .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
 16 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/Documentation/translations/it_IT/admin-guide/README.rst b/Documentation/translations/it_IT/admin-guide/README.rst
index b37166817842..fb0c0b0fde71 100644
--- a/Documentation/translations/it_IT/admin-guide/README.rst
+++ b/Documentation/translations/it_IT/admin-guide/README.rst
@@ -4,7 +4,7 @@
 
 .. _it_readme:
 
-Rilascio del kernel Linux  5.x <http://kernel.org/>
+Rilascio del kernel Linux  5.x <https://kernel.org/>
 ===================================================
 
 .. warning::
diff --git a/Documentation/translations/it_IT/doc-guide/parse-headers.rst b/Documentation/translations/it_IT/doc-guide/parse-headers.rst
index 993d549ee2b8..e210bbd84fb6 100644
--- a/Documentation/translations/it_IT/doc-guide/parse-headers.rst
+++ b/Documentation/translations/it_IT/doc-guide/parse-headers.rst
@@ -190,7 +190,7 @@ COPYRIGHT
 
 Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab@s-opensource.com>.
 
-Licenza GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
+Licenza GPLv2: GNU GPL version 2 <https://gnu.org/licenses/gpl.html>.
 
 Questo è software libero: siete liberi di cambiarlo e ridistribuirlo.
 Non c'è alcuna garanzia, nei limiti permessi dalla legge.
diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst b/Documentation/translations/it_IT/doc-guide/sphinx.rst
index f1ad4504b734..0aaeb0297661 100644
--- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
+++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
@@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate comandi ``make htmldocs`` o
 ``make pdfdocs``. La documentazione così generata sarà disponibile nella
 cartella ``Documentation/output``.
 
-.. _Sphinx: http://www.sphinx-doc.org/
+.. _Sphinx: https://www.sphinx-doc.org/
 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
 
 I file reStructuredText possono contenere delle direttive che permettono di
@@ -191,8 +191,8 @@ informazione circa le loro potenzialità. In particolare, il
 cui cominciare. Esistono, inoltre, anche alcuni
 `costruttori specifici per Sphinx`_.
 
-.. _`manuale introduttivo a reStructuredText`: http://www.sphinx-doc.org/en/stable/rest.html
-.. _`costruttori specifici per Sphinx`: http://www.sphinx-doc.org/en/stable/markup/index.html
+.. _`manuale introduttivo a reStructuredText`: https://www.sphinx-doc.org/en/stable/rest.html
+.. _`costruttori specifici per Sphinx`: https://www.sphinx-doc.org/en/stable/markup/index.html
 
 Guide linea per la documentazione del kernel
 --------------------------------------------
@@ -388,8 +388,8 @@ formato SVG::
 Le direttive del kernel per figure ed immagini supportano il formato **DOT**,
 per maggiori informazioni
 
-* DOT: http://graphviz.org/pdf/dotguide.pdf
-* Graphviz: http://www.graphviz.org/content/dot-language
+* DOT: https://graphviz.org/pdf/dotguide.pdf
+* Graphviz: https://www.graphviz.org/content/dot-language
 
 Un piccolo esempio (:ref:`it_hello_dot_file`)::
 
diff --git a/Documentation/translations/it_IT/process/2.Process.rst b/Documentation/translations/it_IT/process/2.Process.rst
index 30dc172f06b0..c2f3a0647d1b 100644
--- a/Documentation/translations/it_IT/process/2.Process.rst
+++ b/Documentation/translations/it_IT/process/2.Process.rst
@@ -315,7 +315,7 @@ patch andrà nel ramo principale attraverso -mm.
 La patch -mm correnti sono disponibili nella cartella "mmotm" (-mm of
 the moment) all'indirizzo:
 
-      http://www.ozlabs.org/~akpm/mmotm/
+      https://www.ozlabs.org/~akpm/mmotm/
 
 È molto probabile che l'uso dei sorgenti MMOTM diventi un'esperienza
 frustrante; ci sono buone probabilità che non compili nemmeno.
@@ -327,7 +327,7 @@ la prossima finestra di inclusione si chiuderà.  I linux-next sono annunciati
 sulla lista di discussione linux-kernel e linux-next nel momento in cui
 vengono assemblati; e possono essere scaricate da:
 
-	http://www.kernel.org/pub/linux/kernel/next/
+	https://www.kernel.org/pub/linux/kernel/next/
 
 Linux-next è divenuto parte integrante del processo di sviluppo del kernel;
 tutte le patch incorporate durante una finestra di integrazione dovrebbero
@@ -391,21 +391,21 @@ con il lavoro degli altri sviluppatori (e con il ramo principale).
 Git è ora compreso in quasi tutte le distribuzioni Linux. Esiste una sito che
 potete consultare:
 
-	http://git-scm.com/
+	https://git-scm.com/
 
 Qui troverete i riferimenti alla documentazione e alle guide passo-passo.
 
 Tra gli sviluppatori Kernel che non usano git, la scelta alternativa più
 popolare è quasi sicuramente Mercurial:
 
-	http://www.selenic.com/mercurial/
+	https://www.selenic.com/mercurial/
 
 Mercurial condivide diverse caratteristiche con git, ma fornisce
 un'interfaccia che potrebbe risultare più semplice da utilizzare.
 
 L'altro strumento che vale la pena conoscere è Quilt:
 
-	http://savannah.nongnu.org/projects/quilt/
+	https://savannah.nongnu.org/projects/quilt/
 
 
 Quilt è un sistema di gestione delle patch, piuttosto che un sistema
@@ -524,7 +524,7 @@ Andrew Morton da questo consiglio agli aspiranti sviluppatori kernel
      collaborare con gli altri nel sistemare le cose (questo richiede
      persistenza!) ma va bene - è parte dello sviluppo kernel.
 
-(http://lwn.net/Articles/283982/).
+(https://lwn.net/Articles/283982/).
 
 In assenza di problemi ovvi da risolvere, si consiglia agli sviluppatori
 di consultare, in generale, la lista di regressioni e di bachi aperti.
diff --git a/Documentation/translations/it_IT/process/3.Early-stage.rst b/Documentation/translations/it_IT/process/3.Early-stage.rst
index 443ac1e5558f..f8a2b4ca320f 100644
--- a/Documentation/translations/it_IT/process/3.Early-stage.rst
+++ b/Documentation/translations/it_IT/process/3.Early-stage.rst
@@ -55,7 +55,7 @@ scrisse questo messaggio:
 	una perdita di tempo. Loro sono troppo "intelligenti" per stare ad
 	ascoltare dei poveri mortali.
 
-	(http://lwn.net/Articles/131776/).
+	(https://lwn.net/Articles/131776/).
 
 La realtà delle cose fu differente; gli sviluppatori del kernel erano molto
 più preoccupati per la stabilità del sistema, per la manutenzione di lungo
diff --git a/Documentation/translations/it_IT/process/4.Coding.rst b/Documentation/translations/it_IT/process/4.Coding.rst
index a5e36aa60448..11dbff7f0f4c 100644
--- a/Documentation/translations/it_IT/process/4.Coding.rst
+++ b/Documentation/translations/it_IT/process/4.Coding.rst
@@ -222,7 +222,7 @@ domanda ci è stata fornita da Linus nel luglio 2007:
    dei progressi reali. Sono due passi avanti e uno indietro, oppure
    un passo avanti e due indietro?
 
-(http://lwn.net/Articles/243460/).
+(https://lwn.net/Articles/243460/).
 
 Una particolare tipologia di regressione mal vista consiste in una qualsiasi
 sorta di modifica all'ABI dello spazio utente.  Una volta che un'interfaccia
@@ -340,7 +340,7 @@ scheda di sviluppo Blackfin sotto mano, potete comunque continuare la fase
 di compilazione.  Un vasto numero di cross-compilatori per x86 possono
 essere trovati al sito:
 
-	http://www.kernel.org/pub/tools/crosstool/
+	https://www.kernel.org/pub/tools/crosstool/
 
 Il tempo impiegato nell'installare e usare questi compilatori sarà d'aiuto
 nell'evitare situazioni imbarazzanti nel futuro.
diff --git a/Documentation/translations/it_IT/process/7.AdvancedTopics.rst b/Documentation/translations/it_IT/process/7.AdvancedTopics.rst
index cc1cff5d23ae..dffd813a0910 100644
--- a/Documentation/translations/it_IT/process/7.AdvancedTopics.rst
+++ b/Documentation/translations/it_IT/process/7.AdvancedTopics.rst
@@ -35,9 +35,9 @@ git è parte del processo di sviluppo del kernel.  Gli sviluppatori che
 desiderassero diventare agili con git troveranno più informazioni ai
 seguenti indirizzi:
 
-	http://git-scm.com/
+	https://git-scm.com/
 
-	http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
+	https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
 
 e su varie guide che potrete trovare su internet.
 
@@ -63,7 +63,7 @@ eseguire git-daemon è relativamente semplice .  Altrimenti, iniziano a
 svilupparsi piattaforme che offrono spazi pubblici, e gratuiti (Github,
 per esempio).  Gli sviluppatori permanenti possono ottenere un account
 su kernel.org, ma non è proprio facile da ottenere; per maggiori informazioni
-consultate la pagina web http://kernel.org/faq/.
+consultate la pagina web https://kernel.org/faq/.
 
 In git è normale avere a che fare con tanti rami.  Ogni linea di sviluppo
 può essere separata in "rami per argomenti" e gestiti indipendentemente.
@@ -137,7 +137,7 @@ vostri rami.  Citando Linus
 	facendo, e ho bisogno di fidarmi *senza* dover passare tutte
 	le modifiche manualmente una per una.
 
-(http://lwn.net/Articles/224135/).
+(https://lwn.net/Articles/224135/).
 
 Per evitare queste situazioni, assicuratevi che tutte le patch in un ramo
 siano strettamente correlate al tema delle modifiche; un ramo "driver fixes"
diff --git a/Documentation/translations/it_IT/process/8.Conclusion.rst b/Documentation/translations/it_IT/process/8.Conclusion.rst
index 039bfc5a4108..b5520846fe51 100644
--- a/Documentation/translations/it_IT/process/8.Conclusion.rst
+++ b/Documentation/translations/it_IT/process/8.Conclusion.rst
@@ -24,23 +24,23 @@ appropriatamente i documenti).
 
 Diversi siti web approfondiscono lo sviluppo del kernel ad ogni livello
 di dettaglio.  Il vostro autore vorrebbe umilmente suggerirvi
-http://lwn.net/ come fonte; usando l'indice 'kernel' su LWN troverete
+https://lwn.net/ come fonte; usando l'indice 'kernel' su LWN troverete
 molti argomenti specifici sul kernel:
 
-	http://lwn.net/Kernel/Index/
+	https://lwn.net/Kernel/Index/
 
 Oltre a ciò, una risorsa valida per gli sviluppatori kernel è:
 
-	http://kernelnewbies.org/
+	https://kernelnewbies.org/
 
-E, ovviamente, una fonte da non dimenticare è http://kernel.org/, il luogo
+E, ovviamente, una fonte da non dimenticare è https://kernel.org/, il luogo
 definitivo per le informazioni sui rilasci del kernel.
 
 Ci sono numerosi libri sullo sviluppo del kernel:
 
 	Linux Device Drivers, 3rd Edition (Jonathan Corbet, Alessandro
 	Rubini, and Greg Kroah-Hartman).  In linea all'indirizzo
-	http://lwn.net/Kernel/LDD3/.
+	https://lwn.net/Kernel/LDD3/.
 
 	Linux Kernel Development (Robert Love).
 
@@ -52,9 +52,9 @@ tempo.  Comunque contengono informazioni abbastanza buone.
 
 La documentazione per git la troverete su:
 
-	http://www.kernel.org/pub/software/scm/git/docs/
+	https://www.kernel.org/pub/software/scm/git/docs/
 
-	http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
+	https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
 
 
 
diff --git a/Documentation/translations/it_IT/process/adding-syscalls.rst b/Documentation/translations/it_IT/process/adding-syscalls.rst
index bff0a82bf127..b3fb1434cc0c 100644
--- a/Documentation/translations/it_IT/process/adding-syscalls.rst
+++ b/Documentation/translations/it_IT/process/adding-syscalls.rst
@@ -604,9 +604,9 @@ Riferimenti e fonti
    :manpage:`syscall(2)` :
    http://man7.org/linux/man-pages/man2/syscall.2.html#NOTES
  - Collezione di email di Linux Torvalds sui problemi relativi a ``ioctl()``:
-   http://yarchive.net/comp/linux/ioctl.html
+   https://yarchive.net/comp/linux/ioctl.html
  - "Come non inventare interfacce del kernel", Arnd Bergmann,
-   http://www.ukuug.org/events/linux2007/2007/papers/Bergmann.pdf
+   https://www.ukuug.org/events/linux2007/2007/papers/Bergmann.pdf
  - Articolo di Michael Kerris su LWN sull'evitare nuovi usi di CAP_SYS_ADMIN:
    https://lwn.net/Articles/486306/
  - Raccomandazioni da Andrew Morton circa il fatto che tutte le informazioni
diff --git a/Documentation/translations/it_IT/process/changes.rst b/Documentation/translations/it_IT/process/changes.rst
index 37da4447a40d..b8af957c6e05 100644
--- a/Documentation/translations/it_IT/process/changes.rst
+++ b/Documentation/translations/it_IT/process/changes.rst
@@ -131,7 +131,7 @@ Modifiche architetturali
 ------------------------
 
 DevFS è stato reso obsoleto da udev
-(http://www.kernel.org/pub/linux/utils/kernel/hotplug/)
+(https://www.kernel.org/pub/linux/utils/kernel/hotplug/)
 
 Il supporto per UID a 32-bit è ora disponibile.  Divertitevi!
 
@@ -428,7 +428,7 @@ Microcodice Intel P6
 udev
 ----
 
-- <http://www.freedesktop.org/software/systemd/man/udev.html>
+- <https://www.freedesktop.org/software/systemd/man/udev.html>
 
 FUSE
 ----
@@ -482,4 +482,4 @@ Documentazione del kernel
 Sphinx
 ------
 
-- <http://www.sphinx-doc.org/>
+- <https://www.sphinx-doc.org/>
diff --git a/Documentation/translations/it_IT/process/clang-format.rst b/Documentation/translations/it_IT/process/clang-format.rst
index 77eac809a639..29f83c198025 100644
--- a/Documentation/translations/it_IT/process/clang-format.rst
+++ b/Documentation/translations/it_IT/process/clang-format.rst
@@ -40,7 +40,7 @@ Linux più popolari. Cercate ``clang-format`` nel vostro repositorio.
 Altrimenti, potete scaricare una versione pre-generata dei binari di LLVM/clang
 oppure generarlo dai codici sorgenti:
 
-    http://releases.llvm.org/download.html
+    https://releases.llvm.org/download.html
 
 Troverete più informazioni ai seguenti indirizzi:
 
diff --git a/Documentation/translations/it_IT/process/coding-style.rst b/Documentation/translations/it_IT/process/coding-style.rst
index 6f4f85832dee..aca3d6b32653 100644
--- a/Documentation/translations/it_IT/process/coding-style.rst
+++ b/Documentation/translations/it_IT/process/coding-style.rst
@@ -1144,7 +1144,7 @@ ISBN 0-201-61586-X.
 
 Manuali GNU - nei casi in cui sono compatibili con K&R e questo documento -
 per indent, cpp, gcc e i suoi dettagli interni, tutto disponibile qui
-http://www.gnu.org/manual/
+https://www.gnu.org/manual/
 
 WG14 è il gruppo internazionale di standardizzazione per il linguaggio C,
 URL: http://www.open-std.org/JTC1/SC22/WG14/
diff --git a/Documentation/translations/it_IT/process/howto.rst b/Documentation/translations/it_IT/process/howto.rst
index 1db5a1082389..b6e6ac239c25 100644
--- a/Documentation/translations/it_IT/process/howto.rst
+++ b/Documentation/translations/it_IT/process/howto.rst
@@ -618,7 +618,7 @@ Per maggiori dettagli su come tutto ciò dovrebbe apparire, riferitevi alla
 sezione ChangeLog del documento:
 
  "The Perfect Patch"
-      http://www.ozlabs.org/~akpm/stuff/tpp.txt
+      https://www.ozlabs.org/~akpm/stuff/tpp.txt
 
 A volte tutto questo è difficile da realizzare. Il perfezionamento di queste
 pratiche può richiedere anni (eventualmente). È un processo continuo di
diff --git a/Documentation/translations/it_IT/process/maintainer-pgp-guide.rst b/Documentation/translations/it_IT/process/maintainer-pgp-guide.rst
index f3c8e8d377ee..41043bccab20 100644
--- a/Documentation/translations/it_IT/process/maintainer-pgp-guide.rst
+++ b/Documentation/translations/it_IT/process/maintainer-pgp-guide.rst
@@ -473,7 +473,7 @@ Nitrokey Start.
 .. _`Nitrokey Start`: https://shop.nitrokey.com/shop/product/nitrokey-start-6
 .. _`Nitrokey Pro 2`: https://shop.nitrokey.com/shop/product/nitrokey-pro-2-3
 .. _`Yubikey 5`: https://www.yubico.com/product/yubikey-5-overview/
-.. _Gnuk: http://www.fsij.org/doc-gnuk/
+.. _Gnuk: https://www.fsij.org/doc-gnuk/
 .. _`Su LWN c'è una buona recensione`: https://lwn.net/Articles/736231/
 
 Configurare il vostro dispositivo smartcard
diff --git a/Documentation/translations/it_IT/process/submitting-patches.rst b/Documentation/translations/it_IT/process/submitting-patches.rst
index 7c23c08e4401..37196ca2c707 100644
--- a/Documentation/translations/it_IT/process/submitting-patches.rst
+++ b/Documentation/translations/it_IT/process/submitting-patches.rst
@@ -102,7 +102,7 @@ sviluppatori, il che è molto importante se volete che la patch venga accettata.
 
 Se state utilizzando ``git``, ``git rebase -i`` può aiutarvi nel procedimento.
 Se non usate ``git``, un'alternativa popolare è ``quilt``
-<http://savannah.nongnu.org/projects/quilt>.
+<https://savannah.nongnu.org/projects/quilt>.
 
 .. _it_describe_changes:
 
@@ -865,7 +865,7 @@ Riferimenti
 -----------
 
 Andrew Morton, "La patch perfetta" (tpp).
-  <http://www.ozlabs.org/~akpm/stuff/tpp.txt>
+  <https://www.ozlabs.org/~akpm/stuff/tpp.txt>
 
 Jeff Garzik, "Formato per la sottomissione di patch per il kernel Linux"
   <https://web.archive.org/web/20180829112450/http://linux.yyz.us/patch-format.html>
diff --git a/Documentation/translations/it_IT/process/volatile-considered-harmful.rst b/Documentation/translations/it_IT/process/volatile-considered-harmful.rst
index efc640cac596..4fff9a59b548 100644
--- a/Documentation/translations/it_IT/process/volatile-considered-harmful.rst
+++ b/Documentation/translations/it_IT/process/volatile-considered-harmful.rst
@@ -119,9 +119,9 @@ concorrenza siano stati opportunamente considerati.
 Riferimenti
 ===========
 
-[1] http://lwn.net/Articles/233481/
+[1] https://lwn.net/Articles/233481/
 
-[2] http://lwn.net/Articles/233482/
+[2] https://lwn.net/Articles/233482/
 
 Crediti
 =======
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-09 20:12 [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT Alexander A. Klimov
@ 2020-06-10  8:57 ` Federico Vaga
  2020-06-10 18:11   ` Alexander A. Klimov
  0 siblings, 1 reply; 11+ messages in thread
From: Federico Vaga @ 2020-06-10  8:57 UTC (permalink / raw)
  To: Jonathan Corbet, Alexander A. Klimov, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Kees Cook, Jacob Huisman,
	Jonathan Neuschäfer, Rob Herring, linux-doc, linux-kernel,
	clang-built-linux, Alexander A. Klimov

On Tuesday, June 9, 2020 10:12:41 PM CEST Alexander A. Klimov wrote:
> 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:
>   For each line:
>     If doesn't contain `\bxmlns\b`:
>       For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
>         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>
> ---
>  .../translations/it_IT/admin-guide/README.rst      |  2 +-
>  .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
>  .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
>  .../translations/it_IT/process/2.Process.rst       | 12 ++++++------
>  .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
>  .../translations/it_IT/process/4.Coding.rst        |  4 ++--
>  .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
>  .../translations/it_IT/process/8.Conclusion.rst    | 14 +++++++-------
>  .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
>  .../translations/it_IT/process/changes.rst         |  6 +++---
>  .../translations/it_IT/process/clang-format.rst    |  2 +-
>  .../translations/it_IT/process/coding-style.rst    |  2 +-
>  Documentation/translations/it_IT/process/howto.rst |  2 +-
>  .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
>  .../it_IT/process/submitting-patches.rst           |  4 ++--
>  .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
>  16 files changed, 40 insertions(+), 40 deletions(-)
> 


> diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst
> b/Documentation/translations/it_IT/doc-guide/sphinx.rst index
> f1ad4504b734..0aaeb0297661 100644
> --- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
> +++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
> @@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate
> comandi ``make htmldocs`` o ``make pdfdocs``. La documentazione così
> generata sarà disponibile nella cartella ``Documentation/output``.
> 
> -.. _Sphinx: http://www.sphinx-doc.org/
> +.. _Sphinx: https://www.sphinx-doc.org/
>  .. _reStructuredText: http://docutils.sourceforge.net/rst.html

It is not part of the deterministic algorithm but you may consider this as 
well

-.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _reStructuredText: https://docutils.sourceforge.io/rst.html





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-10  8:57 ` Federico Vaga
@ 2020-06-10 18:11   ` Alexander A. Klimov
  2020-06-11  3:12     ` Kees Cook
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander A. Klimov @ 2020-06-10 18:11 UTC (permalink / raw)
  To: Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Kees Cook, Jacob Huisman,
	Jonathan Neuschäfer, Rob Herring, linux-doc, linux-kernel,
	clang-built-linux



Am 10.06.20 um 10:57 schrieb Federico Vaga:
> On Tuesday, June 9, 2020 10:12:41 PM CEST Alexander A. Klimov wrote:
>> 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:
>>    For each line:
>>      If doesn't contain `\bxmlns\b`:
>>        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
>>          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>
>> ---
>>   .../translations/it_IT/admin-guide/README.rst      |  2 +-
>>   .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
>>   .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
>>   .../translations/it_IT/process/2.Process.rst       | 12 ++++++------
>>   .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
>>   .../translations/it_IT/process/4.Coding.rst        |  4 ++--
>>   .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
>>   .../translations/it_IT/process/8.Conclusion.rst    | 14 +++++++-------
>>   .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
>>   .../translations/it_IT/process/changes.rst         |  6 +++---
>>   .../translations/it_IT/process/clang-format.rst    |  2 +-
>>   .../translations/it_IT/process/coding-style.rst    |  2 +-
>>   Documentation/translations/it_IT/process/howto.rst |  2 +-
>>   .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
>>   .../it_IT/process/submitting-patches.rst           |  4 ++--
>>   .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
>>   16 files changed, 40 insertions(+), 40 deletions(-)
>>
> 
> 
>> diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>> b/Documentation/translations/it_IT/doc-guide/sphinx.rst index
>> f1ad4504b734..0aaeb0297661 100644
>> --- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>> +++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
>> @@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate
>> comandi ``make htmldocs`` o ``make pdfdocs``. La documentazione così
>> generata sarà disponibile nella cartella ``Documentation/output``.
>>
>> -.. _Sphinx: http://www.sphinx-doc.org/
>> +.. _Sphinx: https://www.sphinx-doc.org/
>>   .. _reStructuredText: http://docutils.sourceforge.net/rst.html
> 
> It is not part of the deterministic algorithm but you may consider this as
> well
> 
> -.. _reStructuredText: http://docutils.sourceforge.net/rst.html
> +.. _reStructuredText: https://docutils.sourceforge.io/rst.html
> 
> 
> 
> 
I'll think about analyzing such almost-matches, extending the algo and 
supplying a second round of patches once all [1] of this round arrive in 
torvalds/master.

[1]:

➜  linux git:(feature/https-links-3) ✗ git diff --shortstat
  1963 files changed, 2882 insertions(+), 2882 deletions(-)
➜  linux git:(feature/https-links-3) ✗

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-10 18:11   ` Alexander A. Klimov
@ 2020-06-11  3:12     ` Kees Cook
  2020-06-11  7:01       ` Alexander A. Klimov
  0 siblings, 1 reply; 11+ messages in thread
From: Kees Cook @ 2020-06-11  3:12 UTC (permalink / raw)
  To: Alexander A. Klimov
  Cc: Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, linux-doc, linux-kernel, clang-built-linux

On Wed, Jun 10, 2020 at 08:11:39PM +0200, Alexander A. Klimov wrote:
> Am 10.06.20 um 10:57 schrieb Federico Vaga:
> > On Tuesday, June 9, 2020 10:12:41 PM CEST Alexander A. Klimov wrote:
> > > 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:
> > >    For each line:
> > >      If doesn't contain `\bxmlns\b`:
> > >        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
> > >          If both the HTTP and HTTPS versions
> > >          return 200 OK and serve the same content:
> > >            Replace HTTP with HTTPS.

Is this script somewhere we can read it? (It's easier usually to review
the code for bulk changes than the bulk changes themselves.)

> > > 
> > > Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
> > > ---
> > >   .../translations/it_IT/admin-guide/README.rst      |  2 +-
> > >   .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
> > >   .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
> > >   .../translations/it_IT/process/2.Process.rst       | 12 ++++++------
> > >   .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
> > >   .../translations/it_IT/process/4.Coding.rst        |  4 ++--
> > >   .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
> > >   .../translations/it_IT/process/8.Conclusion.rst    | 14 +++++++-------
> > >   .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
> > >   .../translations/it_IT/process/changes.rst         |  6 +++---
> > >   .../translations/it_IT/process/clang-format.rst    |  2 +-
> > >   .../translations/it_IT/process/coding-style.rst    |  2 +-
> > >   Documentation/translations/it_IT/process/howto.rst |  2 +-
> > >   .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
> > >   .../it_IT/process/submitting-patches.rst           |  4 ++--
> > >   .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
> > >   16 files changed, 40 insertions(+), 40 deletions(-)
> > > 
> > 
> > 
> > > diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst
> > > b/Documentation/translations/it_IT/doc-guide/sphinx.rst index
> > > f1ad4504b734..0aaeb0297661 100644
> > > --- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
> > > +++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
> > > @@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate
> > > comandi ``make htmldocs`` o ``make pdfdocs``. La documentazione così
> > > generata sarà disponibile nella cartella ``Documentation/output``.
> > > 
> > > -.. _Sphinx: http://www.sphinx-doc.org/
> > > +.. _Sphinx: https://www.sphinx-doc.org/
> > >   .. _reStructuredText: http://docutils.sourceforge.net/rst.html
> > 
> > It is not part of the deterministic algorithm but you may consider this as
> > well

Why did it not match?

> > 
> > -.. _reStructuredText: http://docutils.sourceforge.net/rst.html
> > +.. _reStructuredText: https://docutils.sourceforge.io/rst.html
> > 
> I'll think about analyzing such almost-matches, extending the algo and
> supplying a second round of patches once all [1] of this round arrive in
> torvalds/master.
> 
> [1]:
> 
> ➜  linux git:(feature/https-links-3) ✗ git diff --shortstat
>  1963 files changed, 2882 insertions(+), 2882 deletions(-)
> ➜  linux git:(feature/https-links-3) ✗

Is there a reason to do this one language at a time instead of just
doing everything in one go?

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11  3:12     ` Kees Cook
@ 2020-06-11  7:01       ` Alexander A. Klimov
  2020-06-11 10:40         ` Miguel Ojeda
  2020-06-11 16:05         ` Alexander A. Klimov
  0 siblings, 2 replies; 11+ messages in thread
From: Alexander A. Klimov @ 2020-06-11  7:01 UTC (permalink / raw)
  To: Kees Cook
  Cc: Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, linux-doc, linux-kernel, clang-built-linux,
	Linus Torvalds



Am 11.06.20 um 05:12 schrieb Kees Cook:
> On Wed, Jun 10, 2020 at 08:11:39PM +0200, Alexander A. Klimov wrote:
>> Am 10.06.20 um 10:57 schrieb Federico Vaga:
>>> On Tuesday, June 9, 2020 10:12:41 PM CEST Alexander A. Klimov wrote:
>>>> 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:
>>>>     For each line:
>>>>       If doesn't contain `\bxmlns\b`:
>>>>         For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
>>>>           If both the HTTP and HTTPS versions
>>>>           return 200 OK and serve the same content:
>>>>             Replace HTTP with HTTPS.
> 
> Is this script somewhere we can read it? (It's easier usually to review
> the code for bulk changes than the bulk changes themselves.)
Is any of you familiar with Golang?

@Maintainers Would any of you actually review like this? If yes, is the 
pseudo-code not enough?

> 
>>>>
>>>> Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
>>>> ---
>>>>    .../translations/it_IT/admin-guide/README.rst      |  2 +-
>>>>    .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
>>>>    .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
>>>>    .../translations/it_IT/process/2.Process.rst       | 12 ++++++------
>>>>    .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
>>>>    .../translations/it_IT/process/4.Coding.rst        |  4 ++--
>>>>    .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
>>>>    .../translations/it_IT/process/8.Conclusion.rst    | 14 +++++++-------
>>>>    .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
>>>>    .../translations/it_IT/process/changes.rst         |  6 +++---
>>>>    .../translations/it_IT/process/clang-format.rst    |  2 +-
>>>>    .../translations/it_IT/process/coding-style.rst    |  2 +-
>>>>    Documentation/translations/it_IT/process/howto.rst |  2 +-
>>>>    .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
>>>>    .../it_IT/process/submitting-patches.rst           |  4 ++--
>>>>    .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
>>>>    16 files changed, 40 insertions(+), 40 deletions(-)
>>>>
>>>
>>>
>>>> diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>> b/Documentation/translations/it_IT/doc-guide/sphinx.rst index
>>>> f1ad4504b734..0aaeb0297661 100644
>>>> --- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>> +++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>> @@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate
>>>> comandi ``make htmldocs`` o ``make pdfdocs``. La documentazione così
>>>> generata sarà disponibile nella cartella ``Documentation/output``.
>>>>
>>>> -.. _Sphinx: http://www.sphinx-doc.org/
>>>> +.. _Sphinx: https://www.sphinx-doc.org/
>>>>    .. _reStructuredText: http://docutils.sourceforge.net/rst.html
>>>
>>> It is not part of the deterministic algorithm but you may consider this as
>>> well
> 
> Why did it not match?
I didn't log that link-by-link. Maybe because I also didn't follow plain 
HTTP redirects while opening HTTPS links. Maybe it even matched, but was 
added after I made the changes.

Anyway, I'll maybe cover it in round II.

> 
>>>
>>> -.. _reStructuredText: http://docutils.sourceforge.net/rst.html
>>> +.. _reStructuredText: https://docutils.sourceforge.io/rst.html
>>>
>> I'll think about analyzing such almost-matches, extending the algo and
>> supplying a second round of patches once all [1] of this round arrive in
>> torvalds/master.
>>
>> [1]:
>>
>> ➜  linux git:(feature/https-links-3) ✗ git diff --shortstat
>>   1963 files changed, 2882 insertions(+), 2882 deletions(-)
>> ➜  linux git:(feature/https-links-3) ✗
> 
> Is there a reason to do this one language at a time instead of just
> doing everything in one go?
There are two reasons:

* Jonathan said like theoretically you could give it all at once to 
Linus, but practically I'd not do that, please split by subsystem
* Linus *didn't even respond* (at least I didn't receive anything) to my 
catch-them-all patch at all, not even like please not as .gz attachment 
or please split by subsystem

> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11  7:01       ` Alexander A. Klimov
@ 2020-06-11 10:40         ` Miguel Ojeda
  2020-06-11 11:02           ` Alexander A. Klimov
  2020-06-11 16:05         ` Alexander A. Klimov
  1 sibling, 1 reply; 11+ messages in thread
From: Miguel Ojeda @ 2020-06-11 10:40 UTC (permalink / raw)
  To: Alexander A. Klimov
  Cc: Kees Cook, Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, Linux Doc Mailing List, linux-kernel,
	clang-built-linux, Linus Torvalds

On Thu, Jun 11, 2020 at 9:02 AM Alexander A. Klimov
<grandmaster@al2klimov.de> wrote:
>
> Is any of you familiar with Golang?

Don't worry about that! I'd expect seasoned C programmers to be able
to read Go (or near languages) -- at least to have a general idea of
what an algorithm does.

It is not APL, after all :-)

>
> @Maintainers Would any of you actually review like this? If yes, is the
> pseudo-code not enough?

Well, Kees already mentioned he would like to see it :-) As he said,
it is usually the way for bulk patches to present the
algorithm/semantic patch/etc. that was used.

It is also useful to have it around so that it can be reused/reapplied
later on, too.

> I didn't log that link-by-link. Maybe because I also didn't follow plain
> HTTP redirects while opening HTTPS links. Maybe it even matched, but was
> added after I made the changes.

It would be nice to have a list of links which cannot be converted,
since nowadays they are likely to be the exception rather than the
rule.

> * Linus *didn't even respond* (at least I didn't receive anything) to my
> catch-them-all patch at all, not even like please not as .gz attachment
> or please split by subsystem

Please take into account that LKML volume is huge and Linus (like
everybody else) only reads a small subset. Further, as a general rule,
Linus shouldn't be picking individual patches to begin with because
that skips the review tree.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11 10:40         ` Miguel Ojeda
@ 2020-06-11 11:02           ` Alexander A. Klimov
  2020-06-11 12:37             ` Miguel Ojeda
  2020-06-11 13:52             ` Jonathan Corbet
  0 siblings, 2 replies; 11+ messages in thread
From: Alexander A. Klimov @ 2020-06-11 11:02 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Kees Cook, Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, Linux Doc Mailing List, linux-kernel,
	clang-built-linux, Linus Torvalds



Am 11.06.20 um 12:40 schrieb Miguel Ojeda:
> On Thu, Jun 11, 2020 at 9:02 AM Alexander A. Klimov
> <grandmaster@al2klimov.de> wrote:
>>
>> Is any of you familiar with Golang?
> 
> Don't worry about that! I'd expect seasoned C programmers to be able
> to read Go (or near languages) -- at least to have a general idea of
> what an algorithm does.
> 
> It is not APL, after all :-)
Fine.


package main

import (
	"bufio"
	"bytes"
	"context"
	"errors"
	"fmt"
	fatomic "github.com/natefinch/atomic"
	"golang.org/x/sync/semaphore"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"os/exec"
	"regexp"
	"runtime"
	"sync"
	"sync/atomic"
	"time"
)

var fileSemaphore = semaphore.NewWeighted(int64(runtime.NumCPU()) * 16)
var wg sync.WaitGroup

var processingFiles = struct {
	sync.RWMutex

	files map[string]struct{}
}{
	files: map[string]struct{}{},
}

func main() {
	cmd := exec.Command("git", "ls-files", "-sz")
	cmd.Stderr = os.Stderr

	out, errSP := cmd.StdoutPipe()
	if errSP != nil {
		fmt.Fprintln(os.Stderr, errSP.Error())
		os.Exit(1)
	}

	if errSt := cmd.Start(); errSt != nil {
		fmt.Fprintln(os.Stderr, errSt.Error())
		os.Exit(1)
	}

	//go printProcessingFiles()

	buf := bufio.NewReader(out)
	for {
		file, errRB := buf.ReadBytes(0)
		if errRB != nil && errRB != io.EOF {
			if errWt := cmd.Wait(); errWt != nil {
				fmt.Fprintln(os.Stderr, errWt.Error())
				wg.Wait()
				os.Exit(1)
			}

			fmt.Fprintln(os.Stderr, errRB.Error())
			wg.Wait()
			os.Exit(1)
		}

		if bytes.HasPrefix(file, []byte{'1', '0', '0'}) {
			if fields := bytes.SplitN(bytes.SplitN(file, []byte{0}, 2)[0], 
[]byte{9}, 2); len(fields) == 2 {
				_ = fileSemaphore.Acquire(context.Background(), 1)
				wg.Add(1)
				go processFile(string(fields[1]))
			}
		}

		if errRB == io.EOF {
			break
		}
	}

	wg.Wait()

	if errWt := cmd.Wait(); errWt != nil {
		fmt.Fprintln(os.Stderr, errWt.Error())
		os.Exit(1)
	}
}

/*
func printProcessingFiles() {
	for {
		time.Sleep(time.Second)

		processingFiles.RLock()
		fmt.Fprintln(os.Stderr, processingFiles.files)
		processingFiles.RUnlock()
	}
}
*/

var httpLink = regexp.MustCompile(`\bhttp://[^# \t\r\n]*(?:\w|/)`)
var xmlns = regexp.MustCompile(`\bxmlns\b`)

func processFile(file string) error {
	defer fileSemaphore.Release(1)
	defer wg.Done()

	processingFiles.Lock()
	processingFiles.files[file] = struct{}{}
	processingFiles.Unlock()

	defer func() {
		processingFiles.Lock()
		delete(processingFiles.files, file)
		processingFiles.Unlock()
	}()

	content, errRF := ioutil.ReadFile(file)
	if errRF != nil {
		return errRF
	}

	lines := bytes.Split(content, []byte{'\n'})
	for i := range lines {
		if !xmlns.Match(lines[i]) {
			lines[i] = httpLink.ReplaceAllFunc(lines[i], processLink)
		}
	}

	if modified := bytes.Join(lines, []byte{'\n'}); bytes.Compare(modified, 
content) != 0 {
		var buf bytes.Buffer
		buf.Write(modified)
		return fatomic.WriteFile(file, &buf)
	}

	return nil
}

type linkOk struct {
	sync.Mutex

	ok uint32
}

var links = map[string]*linkOk{}
var linksLock sync.RWMutex
var notsecure = http.Client{Timeout: 10 * time.Minute}
var secure = http.Client{Timeout: 10 * time.Minute, CheckRedirect: 
httpsRedirect}

func processLink(link []byte) []byte {
	linkStr := string(bytes.TrimPrefix(link, []byte("http://")))

	linksLock.RLock()
	lo, ok := links[linkStr]
	linksLock.RUnlock()

	if !ok {
		linksLock.Lock()

		lo, ok = links[linkStr]
		if !ok {
			lo = &linkOk{}
			links[linkStr] = lo
		}

		linksLock.Unlock()
	}

	for {
		switch atomic.LoadUint32(&lo.ok) {
		case 0:
			lo.Lock()

			if atomic.LoadUint32(&lo.ok) == 0 {
				if httpsAble(linkStr) {
					atomic.StoreUint32(&lo.ok, 2)
				} else {
					atomic.StoreUint32(&lo.ok, 1)
				}
			}

			lo.Unlock()

			continue
		case 2:
			return bytes.Replace(link, []byte("http://"), []byte("https://"), 1)
		default:
			return link
		}
	}
}

func httpsAble(link string) bool {
	resp, errGt := secure.Get("https://" + link)
	if errGt != nil {
		return false
	}

	defer resp.Body.Close()

	if resp.StatusCode != 200 {
		return false
	}

	resps, errGt := notsecure.Get("http://" + link)
	if errGt != nil {
		return false
	}

	defer resps.Body.Close()

	if resps.StatusCode != 200 {
		return false
	}

	var buf, bufs bytes.Buffer

	if _, errCp := io.Copy(&buf, resp.Body); errCp != nil {
		return false
	}

	if _, errCp := io.Copy(&bufs, resps.Body); errCp != nil {
		return false
	}

	return bytes.Compare(buf.Bytes(), bufs.Bytes()) == 0
}

var insecure = errors.New("insecure")

func httpsRedirect(req *http.Request, _ []*http.Request) error {
	switch req.URL.Scheme {
	case "", "https":
		return nil
	}

	return insecure
}



> 
>>
>> @Maintainers Would any of you actually review like this? If yes, is the
>> pseudo-code not enough?
> 
> Well, Kees already mentioned he would like to see it :-) As he said,
> it is usually the way for bulk patches to present the
> algorithm/semantic patch/etc. that was used.
> 
> It is also useful to have it around so that it can be reused/reapplied
> later on, too.
If you're going to reproduce one of my patches for reviewing, checkout 
torvalds/master and travel back to the latest commit before I submitted 
the patch. Then run the algo.

> 
>> I didn't log that link-by-link. Maybe because I also didn't follow plain
>> HTTP redirects while opening HTTPS links. Maybe it even matched, but was
>> added after I made the changes.
> 
> It would be nice to have a list of links which cannot be converted,
> since nowadays they are likely to be the exception rather than the
> rule.
Don't worry, (by typing this words right now) I've noted this TODO of 
mine (after this patch round).

> 
>> * Linus *didn't even respond* (at least I didn't receive anything) to my
>> catch-them-all patch at all, not even like please not as .gz attachment
>> or please split by subsystem
> 
> Please take into account that LKML volume is huge and Linus (like
> everybody else) only reads a small subset. Further, as a general rule,
I've addressed Linus directly (CC LKML) and explicitly asked like will 
you have a look at this or not.

> Linus shouldn't be picking individual patches to begin with because
> that skips the review tree.
Who if not Linus shall review one huge patch spreading across lots of 
subsystems?

> 
> Cheers,
> Miguel
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11 11:02           ` Alexander A. Klimov
@ 2020-06-11 12:37             ` Miguel Ojeda
  2020-06-11 13:52             ` Jonathan Corbet
  1 sibling, 0 replies; 11+ messages in thread
From: Miguel Ojeda @ 2020-06-11 12:37 UTC (permalink / raw)
  To: Alexander A. Klimov
  Cc: Kees Cook, Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, Linux Doc Mailing List, linux-kernel,
	clang-built-linux, Linus Torvalds

On Thu, Jun 11, 2020 at 1:02 PM Alexander A. Klimov
<grandmaster@al2klimov.de> wrote:
>
> Who if not Linus shall review one huge patch spreading across lots of
> subsystems?

Even if a patch is tree-wide, ideally it is first ack'd/reviewed by
each subsystem maintainer. The overall idea is that changes are
reviewed by several people. Thus sending patches directly to Linus,
Andrew Morton, Greg K-H, etc. without previous discussion is a last
resort.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11 11:02           ` Alexander A. Klimov
  2020-06-11 12:37             ` Miguel Ojeda
@ 2020-06-11 13:52             ` Jonathan Corbet
  1 sibling, 0 replies; 11+ messages in thread
From: Jonathan Corbet @ 2020-06-11 13:52 UTC (permalink / raw)
  To: Alexander A. Klimov
  Cc: Miguel Ojeda, Kees Cook, Federico Vaga, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, Linux Doc Mailing List, linux-kernel,
	clang-built-linux, Linus Torvalds

On Thu, 11 Jun 2020 13:02:08 +0200
"Alexander A. Klimov" <grandmaster@al2klimov.de> wrote:

> Who if not Linus shall review one huge patch spreading across lots of 
> subsystems?

In practice almost nobody, which is why I've said several times that you
shouldn't do that.  There is no flag-day situation forcing this work to be
done in a single big patch.

jon

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11  7:01       ` Alexander A. Klimov
  2020-06-11 10:40         ` Miguel Ojeda
@ 2020-06-11 16:05         ` Alexander A. Klimov
  2020-06-11 16:14           ` Jonathan Corbet
  1 sibling, 1 reply; 11+ messages in thread
From: Alexander A. Klimov @ 2020-06-11 16:05 UTC (permalink / raw)
  To: Kees Cook
  Cc: Federico Vaga, Jonathan Corbet, Mauro Carvalho Chehab,
	David Sterba, Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, linux-doc, linux-kernel, clang-built-linux,
	Linus Torvalds



Am 11.06.20 um 09:01 schrieb Alexander A. Klimov:
> 
> 
> Am 11.06.20 um 05:12 schrieb Kees Cook:
>> On Wed, Jun 10, 2020 at 08:11:39PM +0200, Alexander A. Klimov wrote:
>>> Am 10.06.20 um 10:57 schrieb Federico Vaga:
>>>> On Tuesday, June 9, 2020 10:12:41 PM CEST Alexander A. Klimov wrote:
>>>>> 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:
>>>>>     For each line:
>>>>>       If doesn't contain `\bxmlns\b`:
>>>>>         For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
>>>>>           If both the HTTP and HTTPS versions
>>>>>           return 200 OK and serve the same content:
>>>>>             Replace HTTP with HTTPS.
>>
>> Is this script somewhere we can read it? (It's easier usually to review
>> the code for bulk changes than the bulk changes themselves.)
> Is any of you familiar with Golang?
> 
> @Maintainers Would any of you actually review like this? If yes, is the 
> pseudo-code not enough?
> 
>>
>>>>>
>>>>> Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
>>>>> ---
>>>>>    .../translations/it_IT/admin-guide/README.rst      |  2 +-
>>>>>    .../translations/it_IT/doc-guide/parse-headers.rst |  2 +-
>>>>>    .../translations/it_IT/doc-guide/sphinx.rst        | 10 +++++-----
>>>>>    .../translations/it_IT/process/2.Process.rst       | 12 
>>>>> ++++++------
>>>>>    .../translations/it_IT/process/3.Early-stage.rst   |  2 +-
>>>>>    .../translations/it_IT/process/4.Coding.rst        |  4 ++--
>>>>>    .../it_IT/process/7.AdvancedTopics.rst             |  8 ++++----
>>>>>    .../translations/it_IT/process/8.Conclusion.rst    | 14 
>>>>> +++++++-------
>>>>>    .../translations/it_IT/process/adding-syscalls.rst |  4 ++--
>>>>>    .../translations/it_IT/process/changes.rst         |  6 +++---
>>>>>    .../translations/it_IT/process/clang-format.rst    |  2 +-
>>>>>    .../translations/it_IT/process/coding-style.rst    |  2 +-
>>>>>    Documentation/translations/it_IT/process/howto.rst |  2 +-
>>>>>    .../it_IT/process/maintainer-pgp-guide.rst         |  2 +-
>>>>>    .../it_IT/process/submitting-patches.rst           |  4 ++--
>>>>>    .../it_IT/process/volatile-considered-harmful.rst  |  4 ++--
>>>>>    16 files changed, 40 insertions(+), 40 deletions(-)
>>>>>
>>>>
>>>>
>>>>> diff --git a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>>> b/Documentation/translations/it_IT/doc-guide/sphinx.rst index
>>>>> f1ad4504b734..0aaeb0297661 100644
>>>>> --- a/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>>> +++ b/Documentation/translations/it_IT/doc-guide/sphinx.rst
>>>>> @@ -14,7 +14,7 @@ Per generare la documentazione in HTML o PDF, usate
>>>>> comandi ``make htmldocs`` o ``make pdfdocs``. La documentazione così
>>>>> generata sarà disponibile nella cartella ``Documentation/output``.
>>>>>
>>>>> -.. _Sphinx: http://www.sphinx-doc.org/
>>>>> +.. _Sphinx: https://www.sphinx-doc.org/
>>>>>    .. _reStructuredText: http://docutils.sourceforge.net/rst.html
>>>>
>>>> It is not part of the deterministic algorithm but you may consider 
>>>> this as
>>>> well
>>
>> Why did it not match?
> I didn't log that link-by-link. Maybe because I also didn't follow plain 
> HTTP redirects while opening HTTPS links. Maybe it even matched, but was 
> added after I made the changes.
> 
> Anyway, I'll maybe cover it in round II.
> 
>>
>>>>
>>>> -.. _reStructuredText: http://docutils.sourceforge.net/rst.html
>>>> +.. _reStructuredText: https://docutils.sourceforge.io/rst.html
>>>>
>>> I'll think about analyzing such almost-matches, extending the algo and
>>> supplying a second round of patches once all [1] of this round arrive in
>>> torvalds/master.
>>>
>>> [1]:
>>>
>>> ➜  linux git:(feature/https-links-3) ✗ git diff --shortstat
>>>   1963 files changed, 2882 insertions(+), 2882 deletions(-)
>>> ➜  linux git:(feature/https-links-3) ✗
>>
>> Is there a reason to do this one language at a time instead of just
>> doing everything in one go?
And yes, *at the moment* I'm patching one subsystem at a time. And the 
discussion around 93431e0607e5 and all of its prototypes shown that it 
was smarter than supplying thousands of patches at once.

Now I've (hopefully) made and corrected all possible mistakes in two 
patches and clearly know how to continue with the next thousands so the 
maintainers won't have anything to comply about.

Once the doc subsystems patches get applied (or even reach 
torvalds/master) I'll submit maybe ten patches at once. And the more 
maintainers apply them...

> There are two reasons:
> 
> * Jonathan said like theoretically you could give it all at once to 
> Linus, but practically I'd not do that, please split by subsystem
> * Linus *didn't even respond* (at least I didn't receive anything) to my 
> catch-them-all patch at all, not even like please not as .gz attachment 
> or please split by subsystem >
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT
  2020-06-11 16:05         ` Alexander A. Klimov
@ 2020-06-11 16:14           ` Jonathan Corbet
  0 siblings, 0 replies; 11+ messages in thread
From: Jonathan Corbet @ 2020-06-11 16:14 UTC (permalink / raw)
  To: Alexander A. Klimov
  Cc: Kees Cook, Federico Vaga, Mauro Carvalho Chehab, David Sterba,
	Randy Dunlap, Theodore Ts'o, Darrick J. Wong,
	Pankaj Bharadiya, Jacob Huisman, Jonathan Neuschäfer,
	Rob Herring, linux-doc, linux-kernel, clang-built-linux,
	Linus Torvalds

On Thu, 11 Jun 2020 18:05:37 +0200
"Alexander A. Klimov" <grandmaster@al2klimov.de> wrote:

> Once the doc subsystems patches get applied (or even reach 
> torvalds/master) I'll submit maybe ten patches at once. And the more 
> maintainers apply them...

The first patch is in mainline now.  I'll deal with subsequent ones after
the merge window closes.

Thanks,

jon

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-11 16:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 20:12 [PATCH] Replace HTTP links with HTTPS ones: Documentation/translations/it_IT Alexander A. Klimov
2020-06-10  8:57 ` Federico Vaga
2020-06-10 18:11   ` Alexander A. Klimov
2020-06-11  3:12     ` Kees Cook
2020-06-11  7:01       ` Alexander A. Klimov
2020-06-11 10:40         ` Miguel Ojeda
2020-06-11 11:02           ` Alexander A. Klimov
2020-06-11 12:37             ` Miguel Ojeda
2020-06-11 13:52             ` Jonathan Corbet
2020-06-11 16:05         ` Alexander A. Klimov
2020-06-11 16:14           ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).