All of lore.kernel.org
 help / color / mirror / Atom feed
From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: unlisted-recipients:; (no To-header on input)
Cc: Jonathan Corbet <corbet@lwn.net>,
	Federico Vaga <federico.vaga@vaga.pv.it>,
	Alex Shi <alexs@kernel.org>, Yanteng Si <siyanteng@loongson.cn>,
	Hu Haowen <src.res@email.cn>,
	Steven Rostedt <rostedt@goodmis.org>,
	Kees Cook <keescook@chromium.org>,
	Stefano Zacchiroli <zack@upsilon.cc>,
	Thorsten Leemhuis <linux@leemhuis.info>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Wu XiangCheng <bobwxc@email.cn>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc-tw-discuss@lists.sourceforge.net
Subject: [PATCH 15/15] Documentation: bury magic-number, now devoid of content
Date: Thu, 27 Oct 2022 00:43:47 +0200	[thread overview]
Message-ID: <83bd024a7f81492be259a531c407cb017186d745.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> (raw)
In-Reply-To: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz>

[-- Attachment #1: Type: text/plain, Size: 15207 bytes --]

The list is now empty, and we've largely moved away from this approach,
and we have better debugging instrumentation nowadays

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 Documentation/process/index.rst               |  1 -
 Documentation/process/magic-number.rst        | 71 -----------------
 .../translations/it_IT/process/index.rst      |  1 -
 .../it_IT/process/magic-number.rst            | 77 -------------------
 .../translations/zh_CN/process/index.rst      |  1 -
 .../zh_CN/process/magic-number.rst            | 60 ---------------
 .../translations/zh_TW/process/index.rst      |  1 -
 .../zh_TW/process/magic-number.rst            | 63 ---------------
 8 files changed, 275 deletions(-)
 delete mode 100644 Documentation/process/magic-number.rst
 delete mode 100644 Documentation/translations/it_IT/process/magic-number.rst
 delete mode 100644 Documentation/translations/zh_CN/process/magic-number.rst
 delete mode 100644 Documentation/translations/zh_TW/process/magic-number.rst

diff --git a/Documentation/process/index.rst b/Documentation/process/index.rst
index d4b6217472b0..a8c0c4bffa47 100644
--- a/Documentation/process/index.rst
+++ b/Documentation/process/index.rst
@@ -59,7 +59,6 @@ lack of a better place.
 
    applying-patches
    adding-syscalls
-   magic-number
    volatile-considered-harmful
    botching-up-ioctls
    clang-format
diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst
deleted file mode 100644
index 5a8c2755ac9c..000000000000
--- a/Documentation/process/magic-number.rst
+++ /dev/null
@@ -1,71 +0,0 @@
-.. _magicnumbers:
-
-Linux magic numbers
-===================
-
-This file is a registry of magic numbers which are in use.  When you
-add a magic number to a structure, you should also add it to this
-file, since it is best if the magic numbers used by various structures
-are unique.
-
-It is a **very** good idea to protect kernel data structures with magic
-numbers.  This allows you to check at run time whether (a) a structure
-has been clobbered, or (b) you've passed the wrong structure to a
-routine.  This last is especially useful --- particularly when you are
-passing pointers to structures via a void * pointer.  The tty code,
-for example, does this frequently to pass driver-specific and line
-discipline-specific structures back and forth.
-
-The way to use magic numbers is to declare them at the beginning of
-the structure, like so::
-
-	struct tty_ldisc {
-		int	magic;
-		...
-	};
-
-Please follow this discipline when you are adding future enhancements
-to the kernel!  It has saved me countless hours of debugging,
-especially in the screwy cases where an array has been overrun and
-structures following the array have been overwritten.  Using this
-discipline, these cases get detected quickly and safely.
-
-Changelog::
-
-					Theodore Ts'o
-					31 Mar 94
-
-  The magic table is current to Linux 2.1.55.
-
-					Michael Chastain
-					<mailto:mec@shout.net>
-					22 Sep 1997
-
-  Now it should be up to date with Linux 2.1.112. Because
-  we are in feature freeze time it is very unlikely that
-  something will change before 2.2.x. The entries are
-  sorted by number field.
-
-					Krzysztof G. Baranowski
-					<mailto: kgb@knm.org.pl>
-					29 Jul 1998
-
-  Updated the magic table to Linux 2.5.45. Right over the feature freeze,
-  but it is possible that some new magic numbers will sneak into the
-  kernel before 2.6.x yet.
-
-					Petr Baudis
-					<pasky@ucw.cz>
-					03 Nov 2002
-
-  Updated the magic table to Linux 2.5.74.
-
-					Fabian Frederick
-					<ffrederick@users.sourceforge.net>
-					09 Jul 2003
-
-
-===================== ================ ======================== ==========================================
-Magic Name            Number           Structure                File
-===================== ================ ======================== ==========================================
-===================== ================ ======================== ==========================================
diff --git a/Documentation/translations/it_IT/process/index.rst b/Documentation/translations/it_IT/process/index.rst
index 8d4e36a07ff4..71adf53bc297 100644
--- a/Documentation/translations/it_IT/process/index.rst
+++ b/Documentation/translations/it_IT/process/index.rst
@@ -56,7 +56,6 @@ perché non si è trovato un posto migliore.
 
    applying-patches
    adding-syscalls
-   magic-number
    volatile-considered-harmful
    clang-format
    ../riscv/patch-acceptance
diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst
deleted file mode 100644
index 2fbc1876534a..000000000000
--- a/Documentation/translations/it_IT/process/magic-number.rst
+++ /dev/null
@@ -1,77 +0,0 @@
-.. include:: ../disclaimer-ita.rst
-
-:Original: :ref:`Documentation/process/magic-number.rst <magicnumbers>`
-:Translator: Federico Vaga <federico.vaga@vaga.pv.it>
-
-.. _it_magicnumbers:
-
-I numeri magici di Linux
-========================
-
-Questo documento è un registro dei numeri magici in uso.  Quando
-aggiungete un numero magico ad una struttura, dovreste aggiungerlo anche
-a questo documento; la cosa migliore è che tutti i numeri magici usati
-dalle varie strutture siano unici.
-
-È **davvero** un'ottima idea proteggere le strutture dati del kernel con
-dei numeri magici.  Questo vi permette in fase d'esecuzione di (a) verificare
-se una struttura è stata malmenata, o (b) avete passato a una procedura la
-struttura errata.  Quest'ultimo è molto utile - particolarmente quando si passa
-una struttura dati tramite un puntatore void \*.  Il codice tty, per esempio,
-effettua questa operazione con regolarità passando avanti e indietro le
-strutture specifiche per driver e discipline.
-
-Per utilizzare un numero magico, dovete dichiararlo all'inizio della struttura
-dati, come di seguito::
-
-	struct tty_ldisc {
-		int	magic;
-		...
-	};
-
-Per favore, seguite questa direttiva quando aggiungerete migliorie al kernel!
-Mi ha risparmiato un numero illimitato di ore di debug, specialmente nei casi
-più ostici dove si è andati oltre la dimensione di un vettore e la struttura
-dati che lo seguiva in memoria è stata sovrascritta.  Seguendo questa
-direttiva, questi casi vengono identificati velocemente e in sicurezza.
-
-Registro dei cambiamenti::
-
-					Theodore Ts'o
-					31 Mar 94
-
-  La tabella magica è aggiornata a Linux 2.1.55.
-
-					Michael Chastain
-					<mailto:mec@shout.net>
-					22 Sep 1997
-
-  Ora dovrebbe essere aggiornata a Linux 2.1.112. Dato che
-  siamo in un momento di congelamento delle funzionalità
-  (*feature freeze*) è improbabile che qualcosa cambi prima
-  della versione 2.2.x.  Le righe sono ordinate secondo il
-  campo numero.
-
-					Krzysztof G. Baranowski
-					<mailto: kgb@knm.org.pl>
-					29 Jul 1998
-
-  Aggiornamento della tabella a Linux 2.5.45. Giusti nel congelamento
-  delle funzionalità ma è comunque possibile che qualche nuovo
-  numero magico s'intrufoli prima del kernel 2.6.x.
-
-					Petr Baudis
-					<pasky@ucw.cz>
-					03 Nov 2002
-
-  Aggiornamento della tabella magica a Linux 2.5.74.
-
-					Fabian Frederick
-					<ffrederick@users.sourceforge.net>
-					09 Jul 2003
-
-
-===================== ================ ======================== ==========================================
-Nome magico           Numero           Struttura                File
-===================== ================ ======================== ==========================================
-===================== ================ ======================== ==========================================
diff --git a/Documentation/translations/zh_CN/process/index.rst b/Documentation/translations/zh_CN/process/index.rst
index a1a35f88f4ae..300d579b3ad0 100644
--- a/Documentation/translations/zh_CN/process/index.rst
+++ b/Documentation/translations/zh_CN/process/index.rst
@@ -52,7 +52,6 @@
 .. toctree::
    :maxdepth: 1
 
-   magic-number
    volatile-considered-harmful
 
 .. only::  subproject and html
diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst
deleted file mode 100644
index f8ec4767bc4e..000000000000
--- a/Documentation/translations/zh_CN/process/magic-number.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _cn_magicnumbers:
-
-.. include:: ../disclaimer-zh_CN.rst
-
-:Original: :ref:`Documentation/process/magic-number.rst <magicnumbers>`
-
-如果想评论或更新本文的内容,请直接发信到LKML。如果你使用英文交流有困难的话,也可
-以向中文版维护者求助。如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者::
-
-        中文版维护者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
-        中文版翻译者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
-        中文版校译者: 贾威威 Jia Wei Wei <harryxiyou@gmail.com>
-
-Linux 魔术数
-============
-
-这个文件是有关当前使用的魔术值注册表。当你给一个结构添加了一个魔术值,你也应该把这个魔术值添加到这个文件,因为我们最好把用于各种结构的魔术值统一起来。
-
-使用魔术值来保护内核数据结构是一个非常好的主意。这就允许你在运行期检查(a)一个结构是否已经被攻击,或者(b)你已经给一个例行程序通过了一个错误的结构。后一种情况特别地有用---特别是当你通过一个空指针指向结构体的时候。tty源码,例如,经常通过特定驱动使用这种方法并且反复地排列特定方面的结构。
-
-使用魔术值的方法是在结构的开始处声明的,如下::
-
-        struct tty_ldisc {
-	        int	magic;
-        	...
-        };
-
-当你以后给内核添加增强功能的时候,请遵守这条规则!这样就会节省数不清的调试时间,特别是一些古怪的情况,例如,数组超出范围并且重新写了超出部分。遵守这个规则,‪这些情况可以被快速地,安全地避免。
-
-		Theodore Ts'o
-		  31 Mar 94
-
-给当前的Linux 2.1.55添加魔术表。
-
-		Michael Chastain
-		<mailto:mec@shout.net>
-		22 Sep 1997
-
-现在应该最新的Linux 2.1.112.因为在特性冻结期间,不能在2.2.x前改变任何东西。这些条目被数域所排序。
-
-		Krzysztof G.Baranowski
-	        <mailto: kgb@knm.org.pl>
-		29 Jul 1998
-
-更新魔术表到Linux 2.5.45。刚好越过特性冻结,但是有可能还会有一些新的魔术值在2.6.x之前融入到内核中。
-
-		Petr Baudis
-		<pasky@ucw.cz>
-		03 Nov 2002
-
-更新魔术表到Linux 2.5.74。
-
-		Fabian Frederick
-                <ffrederick@users.sourceforge.net>
-		09 Jul 2003
-
-===================== ================ ======================== ==========================================
-魔术数名              数字             结构                     文件
-===================== ================ ======================== ==========================================
-===================== ================ ======================== ==========================================
diff --git a/Documentation/translations/zh_TW/process/index.rst b/Documentation/translations/zh_TW/process/index.rst
index c5c59b4fd595..cb3dea0b78ab 100644
--- a/Documentation/translations/zh_TW/process/index.rst
+++ b/Documentation/translations/zh_TW/process/index.rst
@@ -54,7 +54,6 @@
 .. toctree::
    :maxdepth: 1
 
-   magic-number
    volatile-considered-harmful
 
 .. only::  subproject and html
diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst
deleted file mode 100644
index 0ccc60bee3d6..000000000000
--- a/Documentation/translations/zh_TW/process/magic-number.rst
+++ /dev/null
@@ -1,63 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-.. _tw_magicnumbers:
-
-.. include:: ../disclaimer-zh_TW.rst
-
-:Original: :ref:`Documentation/process/magic-number.rst <magicnumbers>`
-
-如果想評論或更新本文的內容,請直接發信到LKML。如果你使用英文交流有困難的話,也可
-以向中文版維護者求助。如果本翻譯更新不及時或者翻譯存在問題,請聯繫中文版維護者::
-
-        中文版維護者: 賈威威 Jia Wei Wei <harryxiyou@gmail.com>
-        中文版翻譯者: 賈威威 Jia Wei Wei <harryxiyou@gmail.com>
-        中文版校譯者: 賈威威 Jia Wei Wei <harryxiyou@gmail.com>
-                      胡皓文 Hu Haowen <src.res@email.cn>
-
-Linux 魔術數
-============
-
-這個文件是有關當前使用的魔術值註冊表。當你給一個結構添加了一個魔術值,你也應該把這個魔術值添加到這個文件,因爲我們最好把用於各種結構的魔術值統一起來。
-
-使用魔術值來保護內核數據結構是一個非常好的主意。這就允許你在運行期檢查(a)一個結構是否已經被攻擊,或者(b)你已經給一個例行程序通過了一個錯誤的結構。後一種情況特別地有用---特別是當你通過一個空指針指向結構體的時候。tty源碼,例如,經常通過特定驅動使用這種方法並且反覆地排列特定方面的結構。
-
-使用魔術值的方法是在結構的開始處聲明的,如下::
-
-        struct tty_ldisc {
-	        int	magic;
-        	...
-        };
-
-當你以後給內核添加增強功能的時候,請遵守這條規則!這樣就會節省數不清的調試時間,特別是一些古怪的情況,例如,數組超出範圍並且重新寫了超出部分。遵守這個規則,‪這些情況可以被快速地,安全地避免。
-
-		Theodore Ts'o
-		  31 Mar 94
-
-給當前的Linux 2.1.55添加魔術表。
-
-		Michael Chastain
-		<mailto:mec@shout.net>
-		22 Sep 1997
-
-現在應該最新的Linux 2.1.112.因爲在特性凍結期間,不能在2.2.x前改變任何東西。這些條目被數域所排序。
-
-		Krzysztof G.Baranowski
-	        <mailto: kgb@knm.org.pl>
-		29 Jul 1998
-
-更新魔術表到Linux 2.5.45。剛好越過特性凍結,但是有可能還會有一些新的魔術值在2.6.x之前融入到內核中。
-
-		Petr Baudis
-		<pasky@ucw.cz>
-		03 Nov 2002
-
-更新魔術表到Linux 2.5.74。
-
-		Fabian Frederick
-                <ffrederick@users.sourceforge.net>
-		09 Jul 2003
-
-===================== ================ ======================== ==========================================
-魔術數名              數字             結構                     文件
-===================== ================ ======================== ==========================================
-===================== ================ ======================== ==========================================
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2022-10-26 22:45 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 22:42 [PATCH 01/15] hamradio: baycom: remove BAYCOM_MAGIC наб
2022-10-26 22:42 ` наб
2022-10-26 22:42 ` [PATCH 02/15] hamradio: yam: remove YAM_MAGIC наб
2022-10-26 22:42   ` наб
2022-10-28 13:19   ` Bagas Sanjaya
2022-10-28 13:44     ` Dan Carpenter
2022-10-26 22:42 ` [PATCH 03/15] pcmcia: synclink_cs: remove MGSLPC_MAGIC наб
2022-10-28 13:21   ` Bagas Sanjaya
2022-10-26 22:42 ` [PATCH 04/15] pcmcia: synclink_cs: remove dead paranoia_check, warn for missing line наб
2022-10-27  4:53   ` Andy Shevchenko
2022-10-27 11:31     ` наб
2022-10-26 22:42 ` [PATCH 05/15] coda: remove CODA_MAGIC наб
2022-10-28 13:23   ` Bagas Sanjaya
2022-10-28 16:54     ` Jan Harkes
2022-10-26 22:43 ` [PATCH 06/15] Documentation: PG_MAGIC isn't a magic number наб
2022-10-28 13:39   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 07/15] MIPS: IP27: clean out sn/nmi.h наб
2022-10-27 12:26   ` Jason A. Donenfeld
2022-10-28 13:40   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 08/15] MIPS: IP27: remove KV_MAGIC наб
2022-10-28 13:42   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 09/15] x86/APM: remove APM_BIOS_MAGIC наб
2022-10-28 13:45   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} наб
2022-10-26 22:43   ` наб
2022-10-28 13:48   ` Bagas Sanjaya
2022-10-28 13:48     ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 11/15] hdlcdrv: remove HDLCDRV_MAGIC наб
2022-10-26 22:43   ` наб
2022-10-28 13:54   ` Bagas Sanjaya
2022-10-28 13:54     ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 12/15] drivers: net: slip: remove SLIP_MAGIC наб
2022-10-27 13:11   ` Oliver Hartkopp
2022-10-27 13:45     ` наб
2022-10-28 13:57   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 13/15] fcntl: remove FASYNC_MAGIC наб
2022-10-28 13:59   ` Bagas Sanjaya
2022-10-26 22:43 ` [PATCH 14/15] scsi: ncr53c8xx: replace CCB_MAGIC with bool busy наб
2022-10-28 14:01   ` Bagas Sanjaya
2022-10-26 22:43 ` наб [this message]
2022-10-28 14:04   ` [PATCH 15/15] Documentation: bury magic-number, now devoid of content Bagas Sanjaya
2022-10-27  1:37 ` [PATCH 01/15] hamradio: baycom: remove BAYCOM_MAGIC Jakub Kicinski
2022-10-28  1:54   ` Bagas Sanjaya
2022-10-28 13:13 ` Bagas Sanjaya
2022-10-28 13:43   ` Dan Carpenter
2022-10-28 13:50     ` Bagas Sanjaya
2022-10-28 14:07       ` Dan Carpenter
2022-10-28 21:43   ` наб

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bd024a7f81492be259a531c407cb017186d745.1666822928.git.nabijaczleweli@nabijaczleweli.xyz \
    --to=nabijaczleweli@nabijaczleweli.xyz \
    --cc=alexs@kernel.org \
    --cc=bobwxc@email.cn \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=lukas.bulwahn@gmail.com \
    --cc=rostedt@goodmis.org \
    --cc=siyanteng@loongson.cn \
    --cc=src.res@email.cn \
    --cc=zack@upsilon.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.