docs/zh_TW: process: add translations of 13 documents
Subsystems (2)
Chen-Yu Yeh
maintainerv2 cover docs/zh_TW: process: add translations of 13 documents
I previously promised Jon that if no contributors stepped forward within two months, the maintainers would have to produce some results ourselves.
This series adds zh_TW translations for 13 process/ documents that had no Traditional Chinese version, and moves each one from the TODOList into the toctree of process/index.rst.
It is independent of the "resync translations with the English originals" series sent alongside it, and applies on its own.
Terminology follows the decisions in that series; whole-file terminology unification and the glossary.rst update will follow separately.
The series is based on the docs-next branch of
https://github.com/kernel-zh/linux-zh_TW.
Changes in v2:
- Drop the seven labels that nothing refers to (Dongliang)
- handling-regressions.rst: display the zh_TW path in the :ref:s that point at zh_TW labels, so the text matches where the link goes (Weijie)
- maintainer-handbooks.rst: link to the zh_TW development-process.rst instead of the English one
- Collect Weijie's Reviewed-by on 01, 03, 04 and 13
v1: https://lore.kernel.org/all/[email protected]/
Chen-Yu Yeh (13):
docs/zh_TW: process: add researcher-guidelines.rst translation docs/zh_TW: process: add cve.rst translation
docs/zh_TW: process: add applying-patches.rst translation docs/zh_TW: process: add maintainer-pgp-guide.rst translation docs/zh_TW: process: add changes.rst translation docs/zh_TW: process: add handling-regressions.rst translation docs/zh_TW: process: add deprecated.rst translation docs/zh_TW: process: add kernel-docs.rst translation docs/zh_TW: process: add maintainer-handbooks.rst translation docs/zh_TW: process: add contribution-maturity-model.rst translation docs/zh_TW: process: add conclave.rst translation docs/zh_TW: process: add threat-model.rst translation docs/zh_TW: process: add maintainers.rst translation
.../zh_TW/process/applying-patches.rst | 390 +++++++ .../translations/zh_TW/process/changes.rst | 530 ++++++++++ .../translations/zh_TW/process/conclave.rst | 35 + .../process/contribution-maturity-model.rst | 83 ++ .../translations/zh_TW/process/cve.rst | 90 ++ .../translations/zh_TW/process/deprecated.rst | 361 +++++++ .../zh_TW/process/handling-regressions.rst | 969 ++++++++++++++++++ .../translations/zh_TW/process/index.rst | 35 +- .../zh_TW/process/kernel-docs.rst | 353 +++++++ .../zh_TW/process/maintainer-handbooks.rst | 20 + .../zh_TW/process/maintainer-pgp-guide.rst | 793 ++++++++++++++ .../zh_TW/process/maintainers.rst | 125 +++ .../zh_TW/process/researcher-guidelines.rst | 134 +++ .../zh_TW/process/threat-model.rst | 187 ++++ 14 files changed, 4087 insertions(+), 18 deletions(-) create mode 100644 Documentation/translations/zh_TW/process/applying-patches.rst create mode 100644 Documentation/translations/zh_TW/process/changes.rst create mode 100644 Documentation/translations/zh_TW/process/conclave.rst create mode 100644 Documentation/translations/zh_TW/process/contribution-maturity-model.rst create mode 100644 Documentation/translations/zh_TW/process/cve.rst create mode 100644 Documentation/translations/zh_TW/process/deprecated.rst create mode 100644 Documentation/translations/zh_TW/process/handling-regressions.rst create mode 100644 Documentation/translations/zh_TW/process/kernel-docs.rst create mode 100644 Documentation/translations/zh_TW/process/maintainer-handbooks.rst create mode 100644 Documentation/translations/zh_TW/process/maintainer-pgp-guide.rst create mode 100644 Documentation/translations/zh_TW/process/maintainers.rst create mode 100644 Documentation/translations/zh_TW/process/researcher-guidelines.rst create mode 100644 Documentation/translations/zh_TW/process/threat-model.rst
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 1/13 docs/zh_TW: process: add researcher-guidelines.rst translation
Translate Documentation/process/researcher-guidelines.rst into Traditional Chinese from the current English text, including the "Surveys" section from commit ad93f083bdb7 ("docs: Add a section on surveys to the researcher guidelines") and the tech-board list address from commit 27103dddc2da ("Documentation: update mailing list addresses"). The zh_CN translation was consulted for wording only.
Keep the three reference link titles and the example commit log in English, as in the original.
List the new file in the toctree of process/index.rst, after management-style as in the English index, and drop it from the TODOList.
update to commit 27103dddc2da ("Documentation: update mailing list addresses")
--- .../translations/zh_TW/process/index.rst | 2 +- .../zh_TW/process/researcher-guidelines.rst | 134 ++++++++++++++++++ 2 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/researcher-guidelines.rst
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -70,11 +70,11 @@ TODOList: stable-api-nonsense stable-kernel-rules management-style + researcher-guidelines TODOList: * contribution-maturity-model -* researcher-guidelines * generated-content * coding-assistants * conclave
Documentation/translations/zh_TW/process/researcher-guidelines.rst new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 2/13 docs/zh_TW: process: add cve.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/cve.rst into Traditional Chinese from the current English text. The zh_CN translation was consulted for wording only.
List the new file in the toctree of process/index.rst, after security-bugs as in the English index, and drop it from the TODOList.
update to commit 5928d411557e ("Documentation: Document the Linux Kernel CVE process")
--- .../translations/zh_TW/process/cve.rst | 90 +++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/cve.rst
Documentation/translations/zh_TW/process/cve.rst new file +90 -0
@@ -0,0 +1,90 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/cve.rst + +==== +CVEs +==== + +Common Vulnerabilities and Exposure(CVE®)編號的設計初衷,是提供一種 +明確的方式,來識別、定義與編錄公開披露的安全漏洞。隨著時間推移,CVE 編號 +對核心專案的用處逐漸降低,而且經常以不恰當的方式、出於不恰當的理由被分配。 +因此,核心開發社群一向傾向迴避它們。然而,要求分配 CVE 及其他形式安全識別 +碼的壓力持續不斷,加上核心社群以外的個人與公司持續濫用,已經清楚顯示核心 +社群應該掌控這些分配。 + +Linux 核心開發團隊確實有能力為潛在的 Linux 核心安全問題分配 CVE。這項分配 +獨立於 :doc:`一般的 Linux 核心安全缺陷回報流程 <../process/security-bugs>`。 + +所有已分配給 Linux 核心的 CVE 列表,可以在 linux-cve 郵件列表的存檔中找到, +見 https://lore.kernel.org/linux-cve-announce/ 。若要收到已分配 CVE 的 +通知,請 `訂閱 <https://subspace.kernel.org/subscribing.html>`_ 該郵件列表。 + +流程 +==== + +作為一般穩定版發布流程的一部分,可能構成安全問題的核心變更,會由負責 CVE +編號分配的開發者辨識出來,並自動為其分配 CVE 編號。這些分配會以公告的形式, +頻繁地發布在 linux-cve-announce 郵件列表上。 + +注意,由於 Linux 核心在系統中所處的層級,幾乎任何缺陷都可能被利用來危害 +核心的安全性,但在修復缺陷時,被利用的可能性往往並不明顯。因此,CVE 分配 +團隊採取過度謹慎的做法,會為他們辨識出的任何缺陷修復分配 CVE 編號。這也 +說明了為什麼 Linux 核心團隊發布的 CVE 數量看起來如此之多。 + +如果 CVE 分配團隊漏掉了某個特定的修復,而任何使用者認為它應該被分配 CVE, +請寄送電子郵件至 <[email protected]>,那裡的團隊會與你一起處理。請注意,任何 +潛在的安全問題都不應寄到這個信箱,它「僅」用於為已經進入已發布核心樹的修復 +分配 CVE。如果你認為自己發現了一個尚未修復的安全問題,請依照 +:doc:`一般的 Linux 核心安全缺陷回報流程 <../process/security-bugs>` 處理。 + +Linux 核心中尚未修復的安全問題不會被自動分配 CVE;只有在修復已經可用並套用 +到穩定核心樹之後,才會自動進行分配,並以原始修復的 git commit id 來追蹤。 +如果有人希望在問題透過提交解決之前就分配 CVE,請聯絡核心 CVE 分配團隊 +<[email protected]>,從他們保留的一批識別碼中取得一個。 + +對於 Stable/LTS 核心團隊目前未積極支援的核心版本中發現的任何問題,都不會 +分配 CVE。目前支援的核心分支列表可在 https://kernel.org/releases.html 找到。 + +對已分配 CVE 的爭議 +=================== + +對特定核心變更所分配的 CVE 提出爭議或加以修改的權限,僅屬於受影響的相關 +子系統的維護者。這項原則確保了漏洞回報的高度準確性與可問責性。只有對該子 +系統具備深厚專業知識與深入了解的人,才能有效評估所回報漏洞的有效性與範圍, +並判定其適當的 CVE 認定。任何在此指定權限之外修改或爭議 CVE 的嘗試,都可 +能導致混亂、不準確的回報,最終危及系統。 + +無效的 CVE +========== + +如果某個安全問題出現在僅由某個 Linux 發行版支援的 Linux 核心中,原因是該 +發行版所做的變更,或是該發行版支援的核心版本已不再屬於 kernel.org 支援的 +版本之一,那麼 Linux 核心 CVE 團隊無法分配 CVE,必須向該 Linux 發行版本身 +申請。 + +任何由核心 CVE 分配團隊以外的團體,針對積極支援中的核心版本分配給 Linux +核心的 CVE,都不應被視為有效的 CVE。請通知核心 CVE 分配團隊 +<[email protected]>,讓他們能透過 CNA 補救流程使這類條目失效。 + +特定 CVE 的適用性 +================= + +由於 Linux 核心可以用許多不同的方式使用,外部使用者存取它的方式也有很多種, +甚至完全無法存取,因此任何特定 CVE 的適用性應由 Linux 的使用者自行判斷, +而不是由 CVE 分配團隊決定。請不要聯絡我們,試圖確認任何特定 CVE 的適用性。 + +此外,由於原始程式碼樹非常龐大,而任何一個系統都只會使用其中一小部分,所有 +Linux 使用者都應該了解,大量已分配的 CVE 與他們的系統並不相關。 + +簡而言之,我們不知道你的使用情境,也不知道你使用了核心的哪些部分,因此我們 +無從判斷特定的 CVE 是否與你的系統相關。 + +一如既往,最好採用所有已發布的核心變更,因為它們是由許多社群成員作為一個 +統一的整體一起測試過的,而不是一個個單獨挑選(cherry-pick)出來的變更。 +另外也請注意,對於許多缺陷來說,整體問題的解決方案並不在單一變更中,而是 +由許多層層疊加的修復共同構成。理想情況下,所有問題的所有修復都會被分配 +CVE,但有時我們會沒有注意到某些修復,因此請假設某些沒有分配 CVE 的變更 +也可能值得採用。
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -90,13 +90,13 @@ TODOList: debugging/index security-bugs + cve embargoed-hardware-issues TODOList: * handling-regressions * threat-model -* cve 維護者資訊 ----------
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 3/13 docs/zh_TW: process: add applying-patches.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/applying-patches.rst into Traditional Chinese from the current English text, including the "Normal patches" and "Incremental patches" subsections of "The 5.x.y kernels". The zh_CN translation was consulted for wording only.
List the new file in the toctree of process/index.rst, after email-clients as in the English index, and drop it from the TODOList.
update to commit fa04150b8ef7 ("Documentation: describe how to apply incremental stable patches")
--- .../zh_TW/process/applying-patches.rst | 390 ++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/applying-patches.rst
Documentation/translations/zh_TW/process/applying-patches.rst new file +390 -0
@@ -0,0 +1,390 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/applying-patches.rst + +將修補程式套用到 Linux 核心 ++++++++++++++++++++++++++++ + +原作者: + Jesper Juhl,2005 年 8 月 + +.. note:: + + 本文件已經過時。在大多數情況下,你幾乎一定會想改用 Git,而不是手動 + 執行 ``patch``。 + +Linux 核心郵件列表上經常有人問:要如何把修補程式套用到核心?更具體地 +說,針對眾多樹或分支之一所製作的修補程式,應該套用到哪個基礎核心上? +希望本文件能為你解答這些問題。 + +除了說明如何套用與撤銷修補程式,本文件也會簡要介紹不同的核心樹(並舉例 +說明如何套用各個核心樹特有的修補程式)。 + + +什麼是修補程式? +================ + +修補程式是一份小型文字文件,記錄原始碼樹兩個不同版本之間的差異。修補 +程式由 ``diff`` 程式產生。 + +要正確套用修補程式,你需要知道它是以哪個版本為基礎產生的,以及它會把 +原始碼樹變成哪個新版本。這兩項資訊應該都記錄在修補程式檔案的中繼資料 +中,或者可以從檔名推斷出來。 + + +如何套用或撤銷修補程式? +======================== + +使用 ``patch`` 程式套用修補程式。patch 程式會讀取 diff 檔(或修補程式 +檔),並依照其中的描述修改原始碼樹。 + +Linux 核心的修補程式是以存放核心原始碼目錄的上層目錄為基準產生的。 + +這表示修補程式檔案中的檔案路徑,會包含產生修補程式時所用的核心原始碼 +目錄名稱(或「a/」與「b/」之類的其他目錄名稱)。 + +這個名稱不太可能與你本機上的核心原始碼目錄名稱相同(不過,對於沒有標示 +版本的修補程式,它常常是判斷其基礎版本的有用資訊),所以你應該先切換到 +核心原始碼目錄,套用修補程式時再去掉修補程式檔案中檔名路徑的第一個部分 +(``patch`` 的 ``-p1`` 參數就是做這件事)。 + +要撤銷先前套用的修補程式,請對 patch 使用 -R 參數。所以,如果你是這樣 +套用修補程式的:: + + patch -p1 < ../patch-x.y.z + +就可以這樣撤銷(復原)它:: + + patch -R -p1 < ../patch-x.y.z + + +如何把修補程式檔或 diff 檔交給 ``patch``? +========================================== + +這件事(就像在 Linux 和其他類 UNIX 作業系統上常見的那樣)有好幾種不同 +的做法。 + +在下面所有的範例中,我都用以下語法,透過標準輸入(stdin)把(未壓縮的) +檔案交給 patch:: + + patch -p1 < path/to/patch-x.y.z + +如果你只是想照著下面的範例操作,不想知道 patch 的其他用法,那麼本節讀到 +這裡就可以了。 + +patch 也可以透過 -i 參數取得要使用的檔案名稱,像這樣:: + + patch -p1 -i path/to/patch-x.y.z + +如果你的修補程式檔案是用 gzip 或 xz 壓縮的,而你不想在套用前先解壓縮, +可以改用這種方式把它交給 patch:: + + xzcat path/to/patch-x.y.z.xz | patch -p1 + bzcat path/to/patch-x.y.z.gz | patch -p1 + +如果你想在套用前先手動解壓縮修補程式檔案(下面的範例都假設你已經這樣 +做了),只要對檔案執行 gunzip 或 xz 即可,像這樣:: + + gunzip patch-x.y.z.gz + xz -d patch-x.y.z.xz + +這樣會留下一個純文字的 patch-x.y.z 檔案,你可以依自己的喜好,透過標準 +輸入或 ``-i`` 參數把它交給 patch。 + +patch 還有幾個好用的參數:``-s`` 讓 patch 除了錯誤以外不輸出任何訊息, +可以避免錯誤訊息太快捲出螢幕;``--dry-run`` 讓 patch 只列出將會發生的 +事情,而不實際做任何修改。最後,``--verbose`` 讓 patch 輸出更多關於 +處理過程的資訊。 + + +套用修補程式時的常見錯誤 +======================== + +patch 套用修補程式檔案時,會用各種方式檢查檔案是否合理。 + +檢查檔案看起來是否像有效的修補程式檔案,以及檢查要修改的部分周圍的程式碼 +是否與修補程式提供的上下文相符,只是 patch 所做的兩項基本檢查。 + +如果 patch 遇到看起來不太對的地方,它有兩種選擇:拒絕套用變更並中止, +或者設法稍作調整,讓修補程式能夠套用。 + +patch 會嘗試修正的「不太對」的情況之一,是上下文全部相符、要修改的行也 +相符,但行號不同。舉例來說,如果修補程式修改的是檔案中間的內容,而檔案 +開頭附近因為某些原因增加或刪除了幾行,就會發生這種情況。此時一切看起來 +都沒問題,只是位置上下移動了一些,patch 通常會調整行號並套用修補程式。 + +每當 patch 必須稍微修改修補程式才能套用時,它會告訴你修補程式是經過 +**fuzz** (模糊比對)才套用的。你應該對這類變更保持警覺,因為雖然 patch +很可能處理正確,但它並不/總是/正確,結果有時會是錯的。 + +當 patch 遇到無法用 fuzz 修正的變更時,會直接拒絕它,並留下一個副檔名為 +``.rej`` 的檔案(拒絕檔)。你可以閱讀這個檔案,確切了解哪項變更無法套用, +以便視需要手動修正。 + +如果你的核心原始碼沒有套用任何第三方修補程式,只套用了來自 kernel.org +的修補程式,而且套用順序正確,也沒有自行修改過原始碼檔案,那麼你應該 +永遠不會看到 patch 輸出 fuzz 或拒絕的訊息。如果你還是看到了這類訊息, +那麼你的本機原始碼樹或修補程式檔案很有可能已經以某種方式損毀。此時你 +大概應該試著重新下載修補程式;如果問題依舊,建議你從 kernel.org 重新 +完整下載一份全新的原始碼樹,從頭開始。 + +下面進一步看看 patch 可能輸出的幾種訊息。 + +如果 patch 停下來並顯示 ``File to patch:`` 提示,表示 patch 找不到要修改 +的檔案。最可能的原因是你忘了指定 -p1,或者你所在的目錄不對。比較少見的 +情況是,你會遇到需要用 ``-p0`` 而不是 ``-p1`` 套用的修補程式(閱讀修補 +程式檔案應該就能看出是否如此;如果是,這是製作修補程式的人的錯誤,但並 +不致命)。 + +如果你看到 ``Hunk #2 succeeded at 1887 with fuzz 2 (offset 7 lines).`` +或類似的訊息,表示 patch 必須調整變更的位置(在這個例子中,它必須把變更 +從預期的位置移動 7 行才能套用)。 + +產生的檔案不一定正確,要看檔案與預期不同的原因而定。 + +當你嘗試套用一個以不同核心版本產生的修補程式,而不是以你要修改的版本 +產生的修補程式時,經常會發生這種情況。 + +如果你看到像 ``Hunk #3 FAILED at 2387.`` 這樣的訊息,表示修補程式無法 +正確套用,patch 程式也無法透過 fuzz 完成套用。這會產生一個 ``.rej`` 檔, +其中包含導致修補程式失敗的變更,還會產生一個 ``.orig`` 檔,顯示無法修改 +的原始內容。 + +如果你看到 +``Reversed (or previously applied) patch detected! Assume -R? [n]`` +,表示 patch 偵測到修補程式中的變更似乎已經存在。 + +如果你確實之前已經套用過這個修補程式,只是不小心又套用了一次,那就回答 +[n]o 並中止這個修補程式。如果你之前套用過這個修補程式,本來就打算撤銷 +它,只是忘了指定 -R,那麼可以在這裡回答 [**y**]es,讓 patch 替你撤銷。 + +如果修補程式的製作者在製作時把來源目錄與目的目錄弄反了,也會發生這種 +情況;此時撤銷修補程式實際上就是套用它。 + +類似 ``patch: **** unexpected end of file in patch`` 或 +``patch unexpectedly ends in middle of line`` 的訊息,表示 patch 完全 +無法理解你交給它的檔案。可能是你下載的檔案已損壞、你沒有先解壓縮就把 +壓縮過的修補程式檔案交給 patch,或者你使用的修補程式檔案在傳遞途中被 +某個郵件用戶端或郵件傳輸代理弄亂了,例如把一行過長的內容拆成兩行。通常 +只要把被拆開的兩行重新接(串接)起來,就能輕鬆解決這類警告。 + +如前所述,如果你把 kernel.org 的修補程式套用到版本正確、未經修改的原始碼 +樹上,這些錯誤應該永遠不會發生。所以,如果你在套用 kernel.org 的修補程式 +時遇到這些錯誤,大概就該認定你的修補程式檔案或原始碼樹已經損壞;建議你 +重新下載完整的核心樹和要套用的修補程式,從頭開始。 + + +除了 ``patch`` 還有其他選擇嗎? +=============================== + + +有的。 + +你可以使用 ``interdiff`` 程式 (http://cyberelk.net/tim/patchutils/) +產生一個代表兩個修補程式之間差異的修補程式,然後套用這個結果。 + +這樣就能一步從 5.7.2 之類的版本更新到 5.7.3。interdiff 的 -z 選項甚至 +可以讓你直接傳入以 gzip 或 bzip2 壓縮的修補程式,不必使用 zcat 或 bzcat, +也不必手動解壓縮。 + +以下是一步從 5.7.2 更新到 5.7.3 的做法:: + + interdiff -z ../patch-5.7.2.gz ../patch-5.7.3.gz | patch -p1 + +雖然 interdiff 可以幫你省下一兩個步驟,但一般仍建議你執行那些額外的步驟, +因為 interdiff 在某些情況下會出錯。 + +另一個選擇是 ``ketchup``,它是一個自動下載並套用修補程式的 Python 指令碼 +(https://www.selenic.com/ketchup/)。 + +其他好用的工具還有:diffstat,顯示修補程式所做變更的摘要;lsdiff,簡短 +列出修補程式檔案影響到的檔案,並可選擇一併顯示每段修補程式的起始行號; +以及 grepdiff,列出修補程式中內容符合指定正規表示式的部分所修改的檔案。 + + +可以從哪裡下載修補程式? +======================== + +修補程式可以在 https://kernel.org/ 取得。 +首頁有最新修補程式的連結,但它們也各自有固定的存放位置。 + +5.x.y(-stable)與 5.x 修補程式位於 + + https://www.kernel.org/pub/linux/kernel/v5.x/ + +5.x.y 增量修補程式位於 + + https://www.kernel.org/pub/linux/kernel/v5.x/incr/ + +-rc 修補程式不存放在網頁伺服器上,而是從 git 標籤按需產生,例如 + + https://git.kernel.org/torvalds/p/v5.1-rc1/v5.0 + +穩定版的 -rc 修補程式位於 + + https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/ + + +5.x 核心 +======== + +這些是 Linus 發布的基礎穩定版本。版本號最大的就是最新的版本。 + +如果發現迴歸或其他嚴重缺陷,就會在這個基礎版本之上發布 -stable 修正 +修補程式(見下文)。一旦新的 5.x 基礎核心發布,也會提供一個修補程式, +內容是前一個 5.x 核心與新核心之間的差異。 + +要套用從 5.6 更新到 5.7 的修補程式,請依照下列步驟操作(請注意,這類 +修補程式 **不能** 套用在 5.x.y 核心之上,而是套用在基礎 5.x 核心之上; +如果你要從 5.x.y 更新到 5.x+1,必須先撤銷 5.x.y 修補程式)。 + +以下是一些範例:: + + # moving from 5.6 to 5.7 + + $ cd ~/linux-5.6 # change to kernel source dir + $ patch -p1 < ../patch-5.7 # apply the 5.7 patch + $ cd .. + $ mv linux-5.6 linux-5.7 # rename source dir + + # moving from 5.6.1 to 5.7 + + $ cd ~/linux-5.6.1 # change to kernel source dir + $ patch -p1 -R < ../patch-5.6.1 # revert the 5.6.1 patch + # source dir is now 5.6 + $ patch -p1 < ../patch-5.7 # apply new 5.7 patch + $ cd .. + $ mv linux-5.6.1 linux-5.7 # rename source dir + + +5.x.y 核心 +========== + +版本號有三段數字的核心是 -stable 核心。它們包含針對某個 5.x 核心中發現 +的安全問題或重大迴歸所做的(較)小型關鍵修正。 + +對於想要最新穩定核心、又無意幫忙測試開發版或實驗版的使用者,建議使用 +這個分支。 + +如果沒有可用的 5.x.y 核心,那麼版本號最大的 5.x 核心就是目前的穩定核心。 + +-stable 團隊同時提供一般修補程式與增量修補程式。以下說明如何套用這些 +修補程式。 + +一般修補程式 +~~~~~~~~~~~~ + +這類修補程式不是增量的,也就是說,例如 5.7.3 修補程式並不是套用在 +5.7.2 核心原始碼之上,而是套用在基礎 5.7 核心原始碼之上。 + +因此,要把 5.7.3 修補程式套用到你現有的 5.7.2 核心原始碼,必須先撤銷 +5.7.2 修補程式(回到基礎 5.7 核心原始碼),再套用新的 5.7.3 修補程式。 + +以下是一個簡單的範例:: + + $ cd ~/linux-5.7.2 # change to the kernel source dir + $ patch -p1 -R < ../patch-5.7.2 # revert the 5.7.2 patch + $ patch -p1 < ../patch-5.7.3 # apply the new 5.7.3 patch + $ cd .. + $ mv linux-5.7.2 linux-5.7.3 # rename the kernel source dir + +增量修補程式 +~~~~~~~~~~~~ + +增量修補程式則不同:它們不是套用在基礎 5.x 核心之上,而是套用在前一個 +穩定版核心(5.x.y-1)之上。 + +以下是套用這類修補程式的範例:: + + $ cd ~/linux-5.7.2 # change to the kernel source dir + $ patch -p1 < ../patch-5.7.2-3 # apply the new 5.7.3 patch + $ cd .. + $ mv linux-5.7.2 linux-5.7.3 # rename the kernel source dir + + +-rc 核心 +======== + +這些是候選發布版(release-candidate)核心。每當 Linus 認為目前的 git +(核心的原始碼管理工具)樹處於相當穩健、足以進行測試的狀態時,就會發布 +這種開發版核心。 + +這些核心並不穩定,如果你打算執行它們,應該預期偶爾會出問題。不過,這是 +幾個主要開發分支中最穩定的一個,也是最終會成為下一個穩定核心的分支, +所以讓越多人測試它越好。 + +如果你想幫忙測試開發版核心,但又不想執行真正實驗性的東西,這是個適合 +執行的分支(想執行實驗性內容的人,請參閱下文關於 -next 與 -mm 核心的 +章節)。 + +-rc 修補程式不是增量的,它們和上文介紹的 5.x.y 修補程式一樣,套用在 +基礎 5.x 核心之上。-rcN 字尾前面的核心版本,表示這個 -rc 核心最終會 +成為的核心版本。 + +所以,5.8-rc5 表示這是 5.8 核心的第五個候選發布版,這個修補程式應該 +套用在 5.7 核心原始碼之上。 + +以下是三個套用這類修補程式的範例:: + + # first an example of moving from 5.7 to 5.8-rc3 + + $ cd ~/linux-5.7 # change to the 5.7 source dir + $ patch -p1 < ../patch-5.8-rc3 # apply the 5.8-rc3 patch + $ cd .. + $ mv linux-5.7 linux-5.8-rc3 # rename the source dir + + # now let's move from 5.8-rc3 to 5.8-rc5 + + $ cd ~/linux-5.8-rc3 # change to the 5.8-rc3 dir + $ patch -p1 -R < ../patch-5.8-rc3 # revert the 5.8-rc3 patch + $ patch -p1 < ../patch-5.8-rc5 # apply the new 5.8-rc5 patch + $ cd .. + $ mv linux-5.8-rc3 linux-5.8-rc5 # rename the source dir + + # finally let's try and move from 5.7.3 to 5.8-rc5 + + $ cd ~/linux-5.7.3 # change to the kernel source dir + $ patch -p1 -R < ../patch-5.7.3 # revert the 5.7.3 patch + $ patch -p1 < ../patch-5.8-rc5 # apply new 5.8-rc5 patch + $ cd .. + $ mv linux-5.7.3 linux-5.8-rc5 # rename the kernel source dir + + +-mm 修補程式與 linux-next 樹 +============================ + +-mm 修補程式是 Andrew Morton 發布的實驗性修補程式。 + +過去 -mm 樹也用來測試子系統的修補程式,但這項功能現在改由 +`linux-next` (https://www.kernel.org/doc/man-pages/linux-next.html) +樹負責。子系統維護者會先把他們的修補程式推送到 linux-next,並在合併視窗 +期間直接發送給 Linus。 + +-mm 修補程式可以說是新功能和其他未經子系統樹合併的實驗性修補程式的試驗場。 +這類修補程式在 -mm 中經過一段時間證明其價值後,Andrew 就會把它推送給 +Linus,以納入主線。 + +linux-next 樹每天更新,並包含 -mm 修補程式。兩者都持續變動,包含許多 +實驗性功能、大量不適合進入主線的除錯修補程式等,是本文件所介紹的各分支 +中最具實驗性的。 + +這些修補程式不適合用在需要保持穩定的系統上,執行它們的風險也比其他任何 +分支都高(請確保你有最新的備份——這適用於任何實驗性核心,對 -mm 修補 +程式或使用 linux-next 樹的核心更是如此)。 + +我們非常感謝大家測試 -mm 修補程式與 linux-next,因為它們存在的意義, +就是在變更合併進更穩定的 Linus 主線樹之前,找出迴歸、當機、資料損毀 +缺陷、建置失敗(以及其他一般的缺陷)。 + +不過,-mm 與 linux-next 的測試者應該要知道,這些樹出問題的頻率比其他 +任何樹都高。 + + +各種核心樹的說明到此結束。希望你現在已經清楚如何套用各種修補程式,並能 +幫忙測試核心。 + +感謝 Randy Dunlap、Rolf Eike Beer、Linus Torvalds、Bodo Eggert、 +Johannes Stezenbach、Grant Coady、Pavel Machek,以及其他可能被我遺漏 +的人,感謝他們對本文件的審閱與貢獻。
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -43,13 +43,13 @@ programming-language coding-style email-clients + applying-patches volatile-considered-harmful TODOList: * changes * maintainer-pgp-guide -* applying-patches * backporting * adding-syscalls * botching-up-ioctls
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 4/13 docs/zh_TW: process: add maintainer-pgp-guide.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/maintainer-pgp-guide.rst into Traditional Chinese from the current English text, including the GnuPG 2.4 requirement, the Nitrokey 3 entry, the B4 note on patatt and the updated kernel.org documentation links. The zh_CN translation was consulted for wording only.
List the new file in the toctree of process/index.rst, after coding-style as in the English index, and drop it from the TODOList.
update to commit 4a0be1a25d98 ("Documentation: process: Capitalize Git, Quilt, and Mercurial consistently")
--- .../translations/zh_TW/process/index.rst | 2 +- .../zh_TW/process/maintainer-pgp-guide.rst | 793 ++++++++++++++++++ 2 files changed, 794 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/maintainer-pgp-guide.rst
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -42,6 +42,7 @@ programming-language coding-style + maintainer-pgp-guide email-clients applying-patches volatile-considered-harmful
@@ -49,7 +50,6 @@ TODOList: * changes -* maintainer-pgp-guide * backporting * adding-syscalls * botching-up-ioctls
Documentation/translations/zh_TW/process/maintainer-pgp-guide.rst new file +793 -0
793 lines not on this page · raw message
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 5/13 docs/zh_TW: process: add changes.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/changes.rst into Traditional Chinese from the current English text, including the minimum version table (Clang/LLVM 17.0.1, Rust 1.85.0, bindgen 0.71.1, pahole 1.26) and the GNU AWK, mkimage and rustdoc sections. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, before programming-language as in the English index, and drop it from the TODOList.
update to commit fd5425b67355 ("docs, resolve_btfids: Document kfunc BTF annotation emission")
--- .../translations/zh_TW/process/changes.rst | 530 ++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/changes.rst
Documentation/translations/zh_TW/process/changes.rst new file +530 -0
@@ -0,0 +1,530 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/changes.rst + +編譯核心的最低需求 +++++++++++++++++++ + +簡介 +==== + +本文件列出執行目前版本核心所需的最低軟體版本。 + +本文件最初是以我為 2.0.x 核心所寫的「Changes」檔案為基礎,因此要感謝的人 +也和那份檔案相同(Jared Mauch、Axel Boldt、Alessandro Sigala,以及網路上 +無數的其他使用者)。 + +目前的最低需求 +************** + +在認為自己遇到缺陷之前,請 **至少** 先升級到下列軟體版本!如果不確定目前 +執行的是哪個版本,表中建議的指令應該可以告訴你。如果要列出系統上這些程式 +的版本,請執行 ./scripts/ver_linux + +再次提醒,這份清單假設你已經能夠正常執行 Linux 核心。此外,並不是每個系統 +都需要所有工具;舉例來說,如果你沒有任何 PC Card 硬體,大概就不必理會 +pcmciautils。 + +====================== =============== ======================================== +程式 最低版本 檢查版本的指令 +====================== =============== ======================================== +bash 4.2 bash --version +bc 1.06.95 bc --version +bindgen(選用) 0.71.1 bindgen --version +binutils 2.30 ld -v +bison 2.0 bison --version +btrfs-progs 0.18 btrfs --version +Clang/LLVM(選用) 17.0.1 clang --version +e2fsprogs 1.41.4 e2fsck -V +flex 2.5.35 flex --version +gdb 7.2 gdb --version +GNU awk(選用) 5.1.0 gawk --version +GNU C 8.1 gcc --version +GNU make 4.0 make --version +GNU tar 1.28 tar --version +GRUB 0.93 grub --version || grub-install --version +gtags(選用) 6.6.5 gtags --version +iptables 1.4.2 iptables -V +jfsutils 1.1.3 fsck.jfs -V +kmod 13 kmod -V +mcelog 0.6 mcelog --version +mkimage(選用) 2017.01 mkimage --version +nfs-utils 1.0.5 showmount --version +openssl & libcrypto 1.0.0 openssl version +pahole 1.26 pahole --version +pcmciautils 004 pccardctl -V +PPP 2.4.0 pppd --version +procps 3.2.0 ps --version +Python 3.9.x python3 --version +quota-tools 3.09 quota -V +Rust(選用) 1.85.0 rustc --version +Sphinx\ [#f1]_ 3.4.3 sphinx-build --version +squashfs-tools 4.0 mksquashfs -version +udev 081 udevadm --version +util-linux 2.10o mount --version +xfsprogs 2.6.0 xfs_db -V +====================== =============== ======================================== + +.. [#f1] 只有建置核心文件時才需要 Sphinx + +核心編譯 +******** + +GCC +--- + +gcc 的版本需求可能會因電腦的 CPU 類型而有所不同。 + +Clang/LLVM(選用) +------------------ + +建置核心時支援 clang 與 LLVM 工具的最新正式版本(依據 +`releases.llvm.org <https://releases.llvm.org>`_)。不保證舊版本可以正常 +運作,而且我們可能會從核心中移除過去為了支援舊版本而加入的權宜措施。更多 +說明請參閱 :ref:`使用 Clang/LLVM 建置 Linux <kbuild_llvm>`。 + +Rust(選用) +------------ + +需要較新版本的 Rust 編譯器。 + +如何滿足 Rust 支援的建置需求,請參閱 Documentation/rust/quick-start.rst。 +特別是 ``Makefile`` 的 ``rustavailable`` 目標,可以用來檢查為什麼偵測不到 +Rust 工具鏈。 + +bindgen(選用) +--------------- + +``bindgen`` 用來產生核心 C 語言端的 Rust 綁定,它依賴 ``libclang``。 + +Make +---- + +建置核心需要 GNU make 4.0 或更新版本。 + +Bash +---- + +核心建置過程會用到一些 bash 指令稿,需要 Bash 4.2 或更新版本。 + +Binutils +-------- + +建置核心需要 Binutils 2.30 或更新版本。 + +pkg-config +---------- + +從 4.18 開始,建置系統需要 pkg-config 來檢查已安裝的 kconfig 工具,並決定 +'make {g,x}config' 所用的旗標設定。在此之前雖然已經使用 pkg-config,但並 +沒有檢查,也沒有寫進文件。 + +Flex +---- + +從 Linux 4.16 開始,建置系統會在建置期間產生詞法分析器,因此需要 flex +2.5.35 或更新版本。 + + +Bison +----- + +從 Linux 4.16 開始,建置系統會在建置期間產生剖析器,因此需要 bison +2.0 或更新版本。 + +pahole +------ + +從 Linux 5.2 開始,如果選擇了 CONFIG_DEBUG_INFO_BTF,建置系統會從 vmlinux +的 DWARF 產生 BTF(BPF Type Format),稍後也會從核心模組產生。這需要 +pahole v1.22 或更新版本。 + +可以在發行版的「dwarves」或「pahole」套件中找到它,或從 +https://fedorapeople.org/~acme/dwarves/ 取得。 + +Perl +---- + +建置核心需要 perl 5 以及下列模組:``Getopt::Long``、``Getopt::Std``、 +``File::Basename`` 與 ``File::Find``。 + +Python +------ + +有幾個設定選項需要它:arm/arm64 的預設設定、CONFIG_LTO_CLANG、某些 DRM +選用設定、kernel-doc 工具,以及文件建置(Sphinx)等都需要 Python。 + +BC +-- + +建置 3.10 及更新版本的核心需要 bc。 + + +OpenSSL +------- + +模組簽章與外部憑證處理會使用 OpenSSL 程式與加密函式庫來產生金鑰與簽章。 + +如果啟用了模組簽章,建置 3.7 及更新版本的核心需要 openssl。建置 4.3 及 +更新版本的核心還需要 openssl 的開發套件。 + +Tar +--- + +如果要啟用透過 sysfs 存取核心標頭檔的功能(CONFIG_IKHEADERS),需要 GNU +tar。 + +gtags / GNU GLOBAL(選用) +-------------------------- + +核心建置需要 GNU GLOBAL 6.6.5 或更新版本,才能透過 ``make gtags`` 產生 +標籤檔,這是因為它用到 gtags 的 ``-C (--directory)`` 旗標。 + +mkimage +------- + +建置 Flat Image Tree(FIT)時會用到這個工具,FIT 常見於 ARM 平臺。這個 +工具可以從 ``u-boot-tools`` 套件取得,也可以從 U-Boot 原始碼建置。請參閱 +https://docs.u-boot.org/en/latest/build/tools.html#building-tools-for-linux +的說明。 + +GNU AWK +------- + +如果要讓核心建置產生內建模組的位址範圍資料 +(CONFIG_BUILTIN_MODULE_RANGES),需要 GNU AWK。 + +系統工具 +******** + +架構上的變更 +------------ + +DevFS 已經淘汰,改用 udev +(https://www.kernel.org/pub/linux/utils/kernel/hotplug/) + +32 位元 UID 支援現在已經就緒。好好享受吧! + +Linux 函式的文件正逐步改為行內文件,也就是寫在原始碼中函式定義附近、具有 +特殊格式的註解。這些註解可以與 Documentation/ 目錄下的 ReST 檔案結合, +產生內容更豐富的文件,再轉換成 PostScript、HTML、LaTex、ePUB 與 PDF 檔案。 +要把 ReST 格式轉換成你想要的格式,需要 Sphinx。 + +Util-linux +---------- + +新版的 util-linux 讓 ``fdisk`` 支援更大的磁碟、為 mount 提供新的選項、 +能辨識更多種分割區類型,還有其他類似的好處。你大概會想升級。 + +Ksymoops +-------- + +如果發生了難以想像的事,你的核心出現 oops,你可能需要用 ksymoops 工具來 +解碼,不過大多數情況下並不需要。一般建議在建置核心時啟用 +``CONFIG_KALLSYMS``,讓核心產生可以直接使用的可讀傾印(這也比 ksymoops +的輸出更好)。如果因為某些原因,你的核心沒有啟用 ``CONFIG_KALLSYMS``,而 +你又沒辦法用該選項重新建置並重現 Oops,仍然可以用 ksymoops 解碼該 Oops。 + +Mkinitrd +-------- + +``/lib/modules`` 檔案樹配置的這些變更,也需要升級 mkinitrd。 + +E2fsprogs +--------- + +最新版的 ``e2fsprogs`` 修正了 fsck 與 debugfs 的幾個缺陷。顯然,升級是個 +好主意。 + +JFSutils +-------- + +``jfsutils`` 套件包含這個檔案系統的工具程式,提供下列工具: + +- ``fsck.jfs`` - 啟動交易日誌的重播,並檢查與修復 JFS 格式的分割區。 + +- ``mkfs.jfs`` - 建立 JFS 格式的分割區。 + +- 這個套件裡也有其他檔案系統工具。 + +Xfsprogs +-------- + +最新版的 ``xfsprogs`` 包含 XFS 檔案系統的 ``mkfs.xfs``、``xfs_db`` 與 +``xfs_repair`` 等工具。它與架構無關,2.0.0 以後的任何版本應該都能與這個 +版本的 XFS 核心程式碼正常搭配(建議使用 2.6.0 或更新版本,因為有一些重大 +改進)。 + +PCMCIAutils +----------- + +PCMCIAutils 取代了 ``pcmcia-cs``。如果核心採用模組化並使用熱插拔子系統, +它會在系統啟動時正確設定 PCMCIA 插槽,並為 16 位元 PCMCIA 裝置載入適當的 +模組。 + +Quota-tools +----------- + +如果要使用較新的第 2 版 quota 格式,必須支援 32 位元的 uid 與 gid。 +Quota-tools 3.07 及更新版本提供這項支援。請使用上表建議的版本或更新版本。 + +Intel IA32 微碼 +--------------- + +核心已加入一個驅動程式,可以更新 Intel IA32 微碼,它是一個一般的(misc) +字元裝置。如果你沒有使用 udev,在使用之前可能需要以 root 身分執行:: + + mkdir /dev/cpu + mknod /dev/cpu/microcode c 10 184 + chmod 0644 /dev/cpu/microcode + +你大概也會想取得使用者空間的 microcode_ctl 工具來搭配使用。 + +udev +---- + +``udev`` 是一個使用者空間應用程式,以動態方式在 ``/dev`` 中只建立實際存在 +的裝置項目。``udev`` 取代了 devfs 的基本功能,同時能為裝置提供固定的 +裝置名稱。 + +FUSE +---- + +需要 libfuse 2.4.0 或更新版本。最低限度是 2.3.0,但 mount 選項 +``direct_io`` 與 ``kernel_cache`` 將無法使用。 + +網路 +**** + +一般變更 +-------- + +如果你有進階的網路設定需求,或許應該考慮使用 ip-route2 的網路工具。 + +封包過濾 / NAT +-------------- +封包過濾與 NAT 程式碼使用的工具與之前的 2.4.x 核心系列相同(iptables)。 +它仍然包含與 2.2.x 風格的 ipchains 及 2.0.x 風格的 ipfwadm 向下相容的模組。 + +PPP +--- + +PPP 驅動程式已經重新架構,以支援多重連結(multilink),並能在多種不同的 +媒介層上運作。如果你使用 PPP,請將 pppd 升級到至少 2.4.0。 + +如果你沒有使用 udev,必須要有裝置檔案 /dev/ppp,可以以 root 身分執行下列 +指令建立:: + + mknod /dev/ppp c 108 0 + +NFS-utils +--------- + +在古老的(2.4 及更早的)核心中,nfs 伺服器必須知道每個預期能透過 NFS 存取 +檔案的用戶端。這些資訊會在用戶端掛載檔案系統時由 ``mountd`` 提供給核心, +或在系統啟動時由 ``exportfs`` 提供。exportfs 會從 ``/var/lib/nfs/rmtab`` +取得活動中用戶端的資訊。 + +這種做法相當脆弱,因為它依賴 rmtab 的正確性,而這並不容易做到,特別是在 +嘗試實作容錯移轉(fail-over)時。即使系統運作正常,``rmtab`` 也會累積許多 +永遠不會被移除的舊項目。 + +在現代的核心中,可以選擇讓核心在收到未知主機的請求時通知 mountd,再由 +mountd 把適當的匯出資訊提供給核心。這樣就不再依賴 ``rmtab``,而且核心只需 +要知道目前活動中的用戶端。 + +要啟用這項新功能,需要在執行 exportfs 或 mountd 之前執行:: + + mount -t nfsd nfsd /proc/fs/nfsd + +建議盡可能用防火牆保護所有 NFS 服務,使其不暴露在整個網際網路上。 + +mcelog +------ + +在 x86 核心上,啟用 ``CONFIG_X86_MCE`` 時需要 mcelog 工具來處理並記錄 +機器檢查事件。機器檢查事件是 CPU 回報的錯誤,強烈建議處理這些事件。 + +核心文件 +******** + +Sphinx +------ + +關於 Sphinx 需求的詳細資訊,請參閱 Documentation/doc-guide/sphinx.rst 中的 +:ref:`sphinx_install`。 + +rustdoc +------- + +``rustdoc`` 用來產生 Rust 程式碼的文件。更多資訊請參閱 +Documentation/rust/general-information.rst。 + +取得更新的軟體 +============== + +核心編譯 +******** + +gcc +--- + +- <ftp://ftp.gnu.org/gnu/gcc/> + +Clang/LLVM +---------- + +- :ref:`取得 LLVM <getting_llvm>`。 + +Rust +---- + +- Documentation/rust/quick-start.rst。 + +bindgen +------- + +- Documentation/rust/quick-start.rst。 + +Make +---- + +- <ftp://ftp.gnu.org/gnu/make/> + +Bash +---- + +- <ftp://ftp.gnu.org/gnu/bash/> + +Binutils +-------- + +- <https://www.kernel.org/pub/linux/devel/binutils/> + +Flex +---- + +- <https://github.com/westes/flex/releases> + +Bison +----- + +- <ftp://ftp.gnu.org/gnu/bison/> + +OpenSSL +------- + +- <https://www.openssl.org/> + +系統工具 +******** + +Util-linux +---------- + +- <https://www.kernel.org/pub/linux/utils/util-linux/> + +Kmod +---- + +- <https://www.kernel.org/pub/linux/utils/kernel/kmod/> +- <https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git> + +Ksymoops +-------- + +- <https://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/> + +Mkinitrd +-------- + +- <https://code.launchpad.net/initrd-tools/main> + +E2fsprogs +--------- + +- <https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/> +- <https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/> + +JFSutils +-------- + +- <https://jfs.sourceforge.net/> + +Xfsprogs +-------- + +- <https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git> +- <https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/> + +Pcmciautils +----------- + +- <https://www.kernel.org/pub/linux/utils/kernel/pcmcia/> + +Quota-tools +----------- + +- <https://sourceforge.net/projects/linuxquota/> + + +Intel P6 微碼 +------------- + +- <https://downloadcenter.intel.com/> + +udev +---- + +- <https://www.freedesktop.org/software/systemd/man/udev.html> + +FUSE +---- + +- <https://github.com/libfuse/libfuse/releases> + +mcelog +------ + +- <https://www.mcelog.org/> + +網路 +**** + +PPP +--- + +- <https://download.samba.org/pub/ppp/> +- <https://git.ozlabs.org/?p=ppp.git> +- <https://github.com/paulusmack/ppp/> + +NFS-utils +--------- + +- <https://sourceforge.net/project/showfiles.php?group_id=14> +- <https://nfs.sourceforge.net/> + +Iptables +-------- + +- <https://netfilter.org/projects/iptables/index.html> + +Ip-route2 +--------- + +- <https://www.kernel.org/pub/linux/utils/net/iproute2/> + +OProfile +-------- + +- <https://oprofile.sf.net/download/> + +核心文件 +******** + +Sphinx +------ + +- <https://www.sphinx-doc.org/>
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -40,6 +40,7 @@ .. toctree:: :maxdepth: 1 + changes programming-language coding-style maintainer-pgp-guide
@@ -49,7 +50,6 @@ TODOList: -* changes * backporting * adding-syscalls * botching-up-ioctls
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 6/13 docs/zh_TW: process: add handling-regressions.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/handling-regressions.rst into Traditional Chinese from the current English text, including the regzbot sections and the "Quotes from Linus about regression" section. The quoted mails are kept in English as in the original literal blocks. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, after debugging/index as in the English index, and drop it from the TODOList.
update to commit fdd100ee60a0 ("docs: process: use gender-neutral pronouns")
--- .../zh_TW/process/handling-regressions.rst | 969 ++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 970 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/handling-regressions.rst
Documentation/translations/zh_TW/process/handling-regressions.rst new file +969 -0
@@ -0,0 +1,969 @@ +.. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0) +.. 重新散布的相關資訊請見本文件結尾。 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/handling-regressions.rst + +處理迴歸問題 +++++++++++++ + +*我們不製造迴歸* ——本文件說明這條「Linux 核心開發的首要規則」在實務上對 +開發者的意義。本文件是 Documentation/admin-guide/reporting-regressions.rst +的補充,後者從使用者的角度說明這個主題;如果你從未讀過那份文件,請在繼續 +閱讀本文之前,至少先大致瀏覽一遍。 + +重點摘要(亦即「TL;DR」) +========================= + +#. 確保 `迴歸郵件列表 <https://lore.kernel.org/regressions/>`_ + ([email protected])的訂閱者能盡快得知任何新的迴歸報告: + + * 收到沒有抄送(CC)該列表的郵件報告時,立即至少發送一封簡短的 + 「全部回覆」(Reply-all)並抄送該列表,讓列表參與其中。 + + * 把提交到缺陷追蹤器的報告轉寄或退回(bounce)到該列表。 + +#. 讓 Linux 核心迴歸追蹤機器人「regzbot」追蹤這個問題(此步驟可選,但建議 + 這麼做): + + * 對於郵件報告,檢查報告者是否附上了類似 ``#regzbot + introduced: v5.13..v5.14-rc1`` 的一行。如果沒有,請發送一封回覆(抄送 + 迴歸列表),其中包含類似下面的段落,告訴 regzbot 問題從何時開始發生:: + + #regzbot ^introduced: 1f2e3d4c5b6a + + * 把缺陷追蹤器中的報告轉寄到迴歸列表時(見上文),請附上類似下面的 + 段落:: + + #regzbot introduced: v5.13..v5.14-rc1 + #regzbot from: Some N. Ice Human <[email protected]> + #regzbot monitor: http://some.bugtracker.example.com/ticket?id=123456789 + +#. 提交迴歸的修正時,依照 Documentation/process/submitting-patches.rst 與 + :ref:`Documentation/translations/zh_TW/process/5.Posting.rst <tw_development_posting>` 的要求, + 在修補程式描述中加上「Closes:」標籤,指向所有回報該問題的地方。如果你 + 只修正了造成迴歸之問題的一部分,可以改用「Link:」標籤。regzbot 目前 + 不區分這兩者。 + +#. 一旦找出肇事提交(culprit),請盡快修復迴歸;大多數迴歸的修正應在兩週 + 內合併,但有些需要在兩到三天內解決。 + + +與開發者相關的 Linux 核心迴歸完整細節 +===================================== + + +重要基本事項詳述 +---------------- + + +收到迴歸報告時該怎麼做 +~~~~~~~~~~~~~~~~~~~~~~ + +確保 Linux 核心的迴歸追蹤者以及 +`迴歸郵件列表 <https://lore.kernel.org/regressions/>`_ +([email protected])的其他訂閱者得知任何新回報的迴歸: + + * 如果你收到的郵件報告沒有抄送該列表,請立即至少發送一封簡短的「全部 + 回覆」並抄送該列表,讓列表參與其中;如果你回覆的郵件漏掉了該列表, + 也請設法確保再次抄送它。 + + * 如果提交到缺陷追蹤器的報告出現在你的收件匣中,請把它轉寄或退回到該 + 列表。轉寄之前,不妨先查看列表的封存,確認報告者是否已經依照 + Documentation/admin-guide/reporting-issues.rst 的指示轉寄過該報告。 + +進行上述任一動作時,可以考慮讓 Linux 核心迴歸追蹤機器人「regzbot」立即 +開始追蹤這個問題: + + * 對於郵件報告,檢查報告者是否附上了類似 + ``#regzbot introduced: 1f2e3d4c5b6a`` 的「regzbot 命令」。如果沒有, + 請發送一封回覆(抄送迴歸列表),其中包含類似下面的段落:: + + #regzbot ^introduced: v5.13..v5.14-rc1 + + 這會告訴 regzbot 問題開始發生的版本範圍;你也可以用 commit ID 指定 + 範圍,或在報告者已用二分法找出肇事提交時,只指定單一 commit ID。 + + 請注意「introduced」前面的插入符號(^):它告訴 regzbot 把上層郵件 + (你所回覆的那封)當作你想追蹤之迴歸的初始報告;這一點很重要,因為 + regzbot 之後會尋找帶有「Closes:」標籤、指向 lore.kernel.org 封存中 + 該報告的修補程式。 + + * 轉寄回報到缺陷追蹤器的迴歸時,請附上包含下列 regzbot 命令的段落:: + + #regzbot introduced: 1f2e3d4c5b6a + #regzbot from: Some N. Ice Human <[email protected]> + #regzbot monitor: http://some.bugtracker.example.com/ticket?id=123456789 + + 之後,regzbot 就會自動把帶有「Closes:」標籤、指向你的郵件或上述工單 + 的修補程式與該報告關聯起來。 + +修復迴歸時的要點 +~~~~~~~~~~~~~~~~ + +提交迴歸的修正時不需要做任何特別的事,只要記得照著 +Documentation/process/submitting-patches.rst、 +:ref:`Documentation/translations/zh_TW/process/5.Posting.rst <tw_development_posting>` 與 +Documentation/process/stable-kernel-rules.rst 中已更詳細說明的做法即可: + + * 使用「Closes:」標籤指向所有回報該問題的地方:: + + Closes: https://lore.kernel.org/r/[email protected]/ + Closes: https://bugzilla.kernel.org/show_bug.cgi?id=1234567890 + + 如果你只修正了問題的一部分,可以依照上述第一份文件的說明改用「Link:」。 + regzbot 目前把兩者視為相同,並將所連結的報告視為已解決。 + + * 加上「Fixes:」標籤,指出造成迴歸的提交。 + + * 如果肇事提交是在較早的開發週期中合併的,請使用 + ``Cc: [email protected]`` 標籤,明確標記此修正需要向後移植。 + +以上這些都是對你的期望,且在處理迴歸時十分重要,因為這些標籤對每個可能在 +數週、數月甚至數年後研究這個問題的人(包括你自己)都非常有價值。這些標籤 +對其他核心開發者或 Linux 發行版所使用的工具和腳本也至關重要;regzbot 就是 +其中之一,它高度依賴「Closes:」標籤,把迴歸報告與解決它們的變更關聯起來。 + +修復迴歸的期望與最佳實務 +~~~~~~~~~~~~~~~~~~~~~~~~ + +身為 Linux 核心開發者,你應該盡最大努力,避免讓你最近的變更所造成的迴歸 +使使用者只剩下以下選擇: + + * 執行一個帶有影響使用之迴歸的核心。 + + * 改用較舊或較新的核心系列。 + + * 在找出迴歸的肇事提交後,繼續執行過時、因而可能不安全的核心超過三週。 + 理想情況下應少於兩週。而如果問題嚴重或影響許多使用者(無論是整體而言, + 還是在普遍的環境中),則應該只有短短幾天。 + +實務上如何做到這一點取決於各種因素。請以下列經驗法則作為指引。 + +一般而言: + + * 將迴歸的處理優先於所有其他 Linux 核心工作,除非後者涉及嚴重問題(例如 + 緊急的安全漏洞、資料遺失、硬體變磚……)。 + + * 加速修復最近進入正式主線、穩定版或長期支援版發布(無論是直接進入還是 + 經由向後移植)的主線迴歸。 + + * 不要把目前週期中的迴歸當作可以等到週期結束再處理的事情,因為這個問題 + 可能讓使用者和 CI 系統現在或往後都不願或無法測試主線。 + + * 以必要的謹慎進行工作,避免造成額外或更大的損害,即使這樣解決問題可能 + 會比下文所述花費更長的時間。 + +找出迴歸的肇事提交之後,關於時程: + + * 如果問題嚴重或困擾許多使用者(無論是整體而言,還是在特定硬體環境、 + 發行版或穩定版/長期支援版系列等普遍情況下),目標是在兩到三天內將修正 + 合併進主線。 + + * 如果肇事提交進入了最近的主線、穩定版或長期支援版發布(無論是直接進入 + 還是經由向後移植),目標是在下下個星期日之前將修正合併進主線;如果 + 肇事提交在一週的前段就已確認且容易解決,請盡量在同一週內將修正合併進 + 主線。 + + * 對於其他迴歸,目標是在接下來三週內的最後一個星期日之前將修正合併進 + 主線。如果該迴歸是人們可以輕鬆忍受一段時間的問題(例如輕微的效能迴歸), + 延後一到兩個星期日也可以接受。 + + * 強烈不建議把迴歸修正延到下一個合併視窗才合併進主線,除非該修正的風險 + 極高,或肇事提交是在一年多以前合併進主線的。 + +關於流程: + + * 一定要考慮撤銷(revert)肇事提交,因為這通常是修復迴歸最快、危險最小 + 的方式。不必擔心之後把修正過的版本合併進主線:這應該很直接,因為大部分 + 程式碼都已經審查過一次。 + + * 盡量在目前的開發週期結束前,解決過去十二個月內在主線中引入的任何迴歸: + Linus 希望這類迴歸能像目前週期中的迴歸一樣處理,除非修復它們有不尋常 + 的風險。 + + * 如果迴歸看起來很棘手,可以考慮在討論或修補程式審查中抄送 Linus。在危急 + 或緊急的情況下也這麼做,特別是子系統維護者可能無法聯繫時。當你知道這類 + 迴歸已進入主線、穩定版或長期支援版發布時,也請抄送穩定版團隊。 + + * 對於緊急的迴歸,可以考慮請 Linus 直接從郵件列表取用修正:對於沒有爭議 + 的修正,他完全可以接受這種做法。不過理想情況下,這類請求應該與子系統 + 維護者協調一致,或直接由他們提出。 + + * 如果你不確定在新的主線版本發布前幾天套用某個修正是否值得冒險,請寄一封 + 郵件給 Linus,並照常抄送相關列表與人員;在郵件中概述情況,同時請他考慮 + 直接從列表取用該修正。之後他可以自己做出決定,必要時甚至可以延後發布。 + 同樣地,這類請求理想上應該與子系統維護者協調一致,或直接由他們提出。 + +關於穩定版與長期支援版核心: + + * 如果迴歸從未在主線中出現過,或已經在主線中修復,你可以把它們留給穩定版 + 團隊處理。 + + * 如果某個迴歸在過去十二個月內進入了正式的主線發布,請務必在修正中加上 + 「Cc: [email protected]」標籤,因為單靠「Fixes:」標籤並不能保證會 + 被向後移植。如果你知道肇事提交已被向後移植到穩定版或長期支援版核心, + 也請加上同樣的標籤。 + + * 收到最近的穩定版或長期支援版核心系列的迴歸報告時,請至少簡單評估一下 + 該問題是否也可能發生在目前的主線中;如果看起來很可能,請接手處理該報告。 + 如有疑問,請報告者在主線上檢查。 + + * 每當你想迅速解決一個最近也進入了正式主線、穩定版或長期支援版發布的迴歸 + 時,請在主線中盡快修復它;在適當的時候,請 Linus 協助加速處理這個修正 + (見上文)。這是因為穩定版團隊通常既不撤銷、也不修復在主線中造成相同 + 問題的變更。 + + * 對於緊急的迴歸修正,你可能會想在修正合併進主線後,給穩定版團隊留個訊息, + 以確保它盡快被向後移植;在合併視窗期間及其後不久特別建議這麼做,否則該 + 修正可能會排在一個龐大的修補程式佇列的最後面。 + +關於修補程式的流程: + + * 開發者們,在設法達成上述時限時,請記得把修正接受測試、審查以及被 Linus + 合併所需的時間計算在內,理想情況下修正至少要在 linux-next 中待上一小段 + 時間。因此,如果某個修正很緊急,請明確表示出來,確保其他人適當地處理它。 + + * 審查者們,懇請你們及時審查迴歸修正,協助開發者達成上述時限。 + + * 子系統維護者們,同樣也鼓勵你們加速處理迴歸修正。因此,請評估對於特定的 + 修正是否可以跳過 linux-next。必要時也可以考慮比平常更頻繁地發送 git 拉取 + 請求。並且盡量避免在週末把迴歸修正壓著不處理,特別是當該修正被標記為需要 + 向後移植時。 + + +開發者應該留意的其他迴歸相關面向 +-------------------------------- + + +如何處理已知有迴歸風險的變更 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +評估迴歸風險有多大,例如在 Linux 發行版和 Git 託管平台(forge)中搜尋 +程式碼。也可以考慮請可能受影響的其他開發者或專案評估、甚至測試所提議的 +變更;如果出現問題,或許可以找到所有人都能接受的解決方案。 + +如果最後看來迴歸風險相對較小,就繼續進行這個變更,但要讓所有相關人員知道 +這個風險。因此,請確保你的修補程式描述清楚說明這一點。變更合併後,請告知 +Linux 核心的迴歸追蹤者和迴歸郵件列表這個風險,讓大家在有報告陸續出現時都 +已注意到這個變更。視風險而定,你可能也會想請子系統維護者在他們的主線拉取 +請求中提及這個問題。 + +關於迴歸還有什麼需要知道的? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +請參閱 Documentation/admin-guide/reporting-regressions.rst,其中涵蓋了許多 +你可能想要了解的其他面向: + + * 「無迴歸」規則的目的 + + * 哪些問題真正算是迴歸 + + * 誰負責找出迴歸的根本原因 + + * 如何處理棘手的情況,例如迴歸是由安全修正所造成,或修復某個迴歸可能造成 + 另一個迴歸 + +遇到迴歸時可以向誰尋求建議 +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +寄一封郵件到迴歸郵件列表([email protected]),同時抄送 Linux +核心的迴歸追蹤者([email protected]);如果問題比較適合私下處理, +可以省略該列表。 + + +關於迴歸追蹤與 regzbot 的更多資訊 +--------------------------------- + + +為什麼 Linux 核心有迴歸追蹤者?為什麼要使用 regzbot? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +像「無迴歸」這樣的規則需要有人確保它被遵守,否則就會因意外或刻意而遭到 +破壞。歷史已經證明,這對 Linux 核心來說也是如此。因此 Thorsten Leemhuis +自願擔任 Linux 核心的迴歸追蹤者來留意這些事,偶爾也有其他人協助。他們都 +沒有因此獲得報酬,所以迴歸追蹤是盡力而為的。 + +先前手動追蹤迴歸的嘗試顯示,這是一項令人筋疲力盡又沮喪的工作,因此在一段 +時間後就被放棄了。為了避免這種情況再次發生,Thorsten 開發了 regzbot 來協助 +這項工作,長期目標是盡可能為所有相關人員自動化迴歸追蹤。 + +regzbot 如何進行迴歸追蹤? +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +這個機器人會留意已追蹤迴歸的報告所收到的回覆。此外,它也會尋找以 +「Closes:」標籤引用這些報告、已發布或已提交(commit)的修補程式;對這些 +修補程式貼文的回覆也會被追蹤。綜合這些資料,就能清楚了解修復過程目前的 +狀態。 + +regzbot 盡量以最少的額外負擔為報告者和開發者完成工作。事實上,只有報告者 +多了一項額外的責任:他們需要使用上述的 ``#regzbot introduced`` 命令,把 +迴歸報告告知 regzbot;如果他們沒有這麼做,其他人可以使用 +``#regzbot ^introduced`` 代為處理。 + +對開發者而言,通常不需要額外的工作,只需要確實做到早在 regzbot 出現之前 +就被期望做的事:在修補程式描述中加上連結,指向所有關於所修復問題的報告。 + +我一定要使用 regzbot 嗎? +~~~~~~~~~~~~~~~~~~~~~~~~~ + +如果你使用,這對所有人都有好處,因為像 Linus Torvalds 這樣的核心維護者在 +工作中部分依賴 regzbot 的追蹤,例如在決定要發布新版本或延長開發階段時。 +為此,他們需要知道所有尚未修復的迴歸;眾所周知,Linus 會查看 regzbot 每週 +發送的報告。 + +我一定要把遇到的每個迴歸都告訴 regzbot 嗎? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +理想上是的:我們都是凡人,當更重要的事情突然出現時很容易忘記問題,例如 +Linux 核心中更大的問題,或是現實生活中讓我們有一陣子無法碰鍵盤的事情。 +因此,最好把每個迴歸都告訴 regzbot,除非你立即寫出修正,並把它提交到一個 +會定期合併到受影響核心系列的樹中。 + +如何查看 regzbot 目前追蹤哪些迴歸? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +請查看 `regzbot 的網頁介面 <https://linux-regtracking.leemhuis.info/regzbot/>`_ +以取得最新資訊;或者,`搜尋最新的迴歸報告 +<https://lore.kernel.org/lkml/?q=%22Linux+regressions+report%22+f%3Aregzbot>`_, +regzbot 通常每週日晚上(UTC)發送一次這份報告,也就是 Linus 通常發布新的 +版本或預發布版本的幾個小時之前。 + +regzbot 監看哪些地方? +~~~~~~~~~~~~~~~~~~~~~~ + +regzbot 會監看最重要的 Linux 郵件列表,以及 linux-next、主線和穩定版/ +長期支援版的 git 儲存庫。 + +哪些問題應該由 regzbot 追蹤? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +這個機器人是用來追蹤迴歸的,因此請不要讓 regzbot 處理一般問題。不過,如果 +你用 regzbot 追蹤嚴重的問題,例如卡死(hang)、資料損毀或內部錯誤(Panic、 +Oops、BUG()、warning……)的報告,Linux 核心的迴歸追蹤者也可以接受。 + +可以把 CI 系統發現的迴歸加入 regzbot 的追蹤嗎? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +可以,只要該迴歸很可能影響實際的使用情境,因而可能被使用者注意到即可; +因此,請不要讓 regzbot 處理不太可能在實際使用中出現的理論上的迴歸。 + +如何與 regzbot 互動? +~~~~~~~~~~~~~~~~~~~~~ + +在直接或間接回覆迴歸報告郵件時使用「regzbot 命令」。這些命令必須自成一個 +段落(換句話說:必須用空行與郵件的其他內容分隔開)。 + +其中一個命令是 ``#regzbot introduced: <version or commit>``,如前所述,它會 +讓 regzbot 把你的郵件視為一份加入追蹤的迴歸報告;另一個這樣的命令是 +``#regzbot ^introduced: <version or commit>``,它會讓 regzbot 把上層郵件 +視為一份迴歸報告並開始追蹤。 + +一旦使用了這兩個命令之一,就可以在直接或間接回覆該報告時使用其他 regzbot +命令。你可以把它們寫在某個 `introduced` 命令的下方,或寫在回覆以下郵件的 +郵件中:使用了其中一個命令的郵件,或本身是回覆該郵件的郵件: + + * 設定或更新標題:: + + #regzbot title: foo + + * 監看討論該問題其他面向或修正的討論串或 bugzilla.kernel.org 工單,例如 + 修復該迴歸的修補程式貼文:: + + #regzbot monitor: https://lore.kernel.org/all/[email protected]/ + + 監看功能只適用於 lore.kernel.org 和 bugzilla.kernel.org;regzbot 會把 + 該討論串或工單中的所有訊息都視為與修復過程有關。 + + * 指向一個有其他值得注意之細節的地方,例如稍微相關、但主題不同的郵件列表 + 貼文或缺陷追蹤器中的工單:: + + #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=123456789 + + * 將迴歸標記為已由某個正在送往上游或已經合併的提交修復:: + + #regzbot fix: 1f2e3d4c5d + + * 將迴歸標記為另一個已由 regzbot 追蹤之迴歸的重複:: + + #regzbot dup-of: https://lore.kernel.org/all/[email protected]/ + + * 將迴歸標記為無效:: + + #regzbot invalid: wasn't a regression, problem has always existed + +關於 regzbot 及其命令還有更多資訊嗎? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +關於 Linux 核心迴歸追蹤機器人更詳細且最新的資訊,可以在它的 +`專案頁面 <https://gitlab.com/knurd42/regzbot>`_ 找到,其中包括 +`入門指南 <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md>`_ +和 `參考文件 <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md>`_, +兩者涵蓋的細節都比上面這一節更多。 + +Linus 關於迴歸的發言 +-------------------- + +以下是 Linus Torvalds 的一些發言,有助於了解 Linux 的「無迴歸」規則,以及 +他期望如何處理迴歸: + +迴歸應該多快修復 +~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-22 <https://lore.kernel.org/all/CAHk-=wheQNiW_WtHGO7bKkT7Uib-p+ai2JP9M+z+FYcZ6CAxYA@mail.gmail.com/>`_:: + + But a user complaining should basically result in an immediate fix - + possibly a "revert and rethink". + + 稍後在 `2026-01-28 <https://lore.kernel.org/all/CAHk-%3Dwi86AosXs66-yi54%2BmpQjPu0upxB8ZAfG%[email protected]/>`_ 又進一步說明:: + + It's also worth noting that "immediate" obviously doesn't mean "right + this *second* when the problem has been reported". + + But if it's a regression with a known commit that caused it, I think + the rule of thumb should generally be "within a week", preferably + before the next rc. + +* 出自 `2023-04-21 <https://lore.kernel.org/all/CAHk-=wgD98pmSK3ZyHk_d9kZ2bhgN6DuNZMAJaV0WTtbkf=RDw@mail.gmail.com/>`_:: + + Known-broken commits either + (a) get a timely fix that doesn't have other questions + or + (b) get reverted + +* 出自 `2021-09-20(2) <https://lore.kernel.org/all/CAHk-=wgOvmtRw1TNbMC1rn5YqyTKyn0hz+sc4k0DGNn++u9aYw@mail.gmail.com/>`_:: + + [...] review shouldn't hold up reported regressions of existing code. That's + just basic _testing_ - either the fix should be applied, or - if the fix is + too invasive or too ugly - the problematic source of the regression should + be reverted. + + Review should be about new code, it shouldn't be holding up "there's a + bug report, here's the obvious fix". + +* 出自 `2023-05-08 <https://lore.kernel.org/all/CAHk-=wgzU8_dGn0Yg+DyX7ammTkDUCyEJ4C=NvnHRhxKWC7Wpw@mail.gmail.com/>`_:: + + If something doesn't even build, it should damn well be fixed ASAP. + +以撤銷來修復迴歸如何有助於避免維護者過勞 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-28 <https://lore.kernel.org/all/CAHk-%3Dwi86AosXs66-yi54%2BmpQjPu0upxB8ZAfG%[email protected]/>`_:: + + > So how can I/we make "immediate fixes" happen more often without + > contributing to maintainer burnout? + + [...] the "revert and rethink" model [...] often a good idea in general [...] + + Exactly so that maintainers don't get stressed out over having a pending + problem report that people keep pestering them about. + + I think people are sometimes a bit too bought into whatever changes + they made, and reverting is seen as "too drastic", but I think it's + often the quick and easy solution for when there isn't some obvious + response to a regression report. + +最後一個 -rc 或新版本即將發布時,將修正合併進主線 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-02-01 <https://lore.kernel.org/all/CAHk-%3DwhXTw1oPsa%[email protected]/>`_:: + + So I think I'd rather see them hit rc8 (later today) and have a week + of testing in my tree and be reverted if they cause problems, than + have them go in after rc8 and then cause problems in the 6.19 release + instead. + +* 出自 `2023-04-20 <https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/>`_:: + + But something like this, where the regression was in the previous release + and it's just a clear fix with no semantic subtlety, I consider to be just a + regular regression that should be expedited - partly to make it into stable, + and partly to avoid having to put the fix into _another_ stable kernel. + +只為單一修正發送合併請求 +~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2024-04-24 <https://lore.kernel.org/all/CAHk-=wjy_ph9URuFt-pq+2AJ__p7gFDx=yzVSCsx16xAYvNw9g@mail.gmail.com/>`_:: + + If the issue is just that there's nothing else happening, I think people + should just point me to the patch and say "can you apply this single fix?" + +* 出自 `2023-04-20 <https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/>`_:: + + I'm always open to direct fixes when there is no controversy about the fix. + No problem. I still happily deal with individual patches. + +使用 Link:/Closes: 標籤指向缺陷報告的重要性 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2025-07-29(1) <https://lore.kernel.org/all/CAHk-=wj2kJRPWx8B09AAtzj+_g+T6UBX11TP0ebs1WJdTtv=WQ@mail.gmail.com/>`_:: + + [...] revert like this, it really would be good to link to the problems, so + that when people try to re-enable it, they have the history for why it + didn't work the first time. + +* 出自 `2022-05-08 <https://lore.kernel.org/all/CAHk-=wjMmSZzMJ3Xnskdg4+GGz=5p5p+GSYyFBTh0f-DgvdBWg@mail.gmail.com/>`_:: + + So I have to once more complain [...] + + [...] There's no link to the actual problem the patch fixes. + +* 出自 `2022-06-22 <https://lore.kernel.org/all/CAHk-=wjxzafG-=J8oT30s7upn4RhBs6TX-uVFZ5rME+L5_DoJA@mail.gmail.com/>`_:: + + See, *that* link [to the report] would have been useful in the commit. + +為什麼會有「無迴歸」規則 +~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-22 <https://lore.kernel.org/all/CAHk-=wheQNiW_WtHGO7bKkT7Uib-p+ai2JP9M+z+FYcZ6CAxYA@mail.gmail.com/>`_:: + + But the basic rule is: be so good about backwards compatibility that + users never have to worry about upgrading. They should absolutely feel + confident that any kernel-reported problem will either be solved, or + have an easy solution that is appropriate for *them* (ie a + non-technical user shouldn't be expected to be able to do a lot). + + Because the last thing we want is people holding back from trying new + kernels. + +* 出自 `2024-05-28 <https://lore.kernel.org/all/CAHk-=wgtb7y-bEh7tPDvDWru7ZKQ8-KMjZ53Tsk37zsPPdwXbA@mail.gmail.com/>`_:: + + I introduced that "no regressions" rule something like two decades + ago, because people need to be able to update their kernel without + fear of something they relied on suddenly stopping to work. + +* 出自 `2018-08-03 <https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/>`_:: + + The whole point of "we do not regress" is so that people can upgrade + the kernel and never have to worry about it. + + [...] + + Because the only thing that matters IS THE USER. + +* 出自 `2017-10-26(1) <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: + + If the kernel used to work for you, the rule is that it continues to work + for you. + + [...] + + People should basically always feel like they can update their kernel + and simply not have to worry about it. + + I refuse to introduce "you can only update the kernel if you also + update that other program" kind of limitations. If the kernel used to + work for you, the rule is that it continues to work for you. + +「無迴歸」規則的例外 +~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-22 <https://lore.kernel.org/all/CAHk-=wheQNiW_WtHGO7bKkT7Uib-p+ai2JP9M+z+FYcZ6CAxYA@mail.gmail.com/>`_:: + + There are _very_ few exceptions to that rule, the main one being "the + problem was a fundamental huge and gaping security issue and we *had* to + make that change, and we couldn't even make your limited use-case just + continue to work". + + The other exception is "the problem was reported years after it was + introduced, and now most people rely on the new behavior". + + [...] + + Now, if it's one or two users and you can just get them to recompile, + that's one thing. Niche hardware and odd use-cases can sometimes be + solved that way, and regressions can sometimes be fixed by handholding + every single reporter if the reporter is willing and able to change + his or her workflow. + +* 出自 `2023-04-20 <https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/>`_:: + + And yes, I do consider "regression in an earlier release" to be a + regression that needs fixing. + + There's obviously a time limit: if that "regression in an earlier + release" was a year or more ago, and just took forever for people to + notice, and it had semantic changes that now mean that fixing the + regression could cause a _new_ regression, then that can cause me to + go "Oh, now the new semantics are what we have to live with". + +* 出自 `2017-10-26(2) <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: + + There have been exceptions, but they are few and far between, and they + generally have some major and fundamental reasons for having happened, + that were basically entirely unavoidable, and people _tried_hard_ to + avoid them. Maybe we can't practically support the hardware any more + after it is decades old and nobody uses it with modern kernels any + more. Maybe there's a serious security issue with how we did things, + and people actually depended on that fundamentally broken model. Maybe + there was some fundamental other breakage that just _had_ to have a + flag day for very core and fundamental reasons. + +更新使用者空間的某些東西即可解決迴歸的情況 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2018-08-03 <https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/>`_:: + + And dammit, we upgrade the kernel ALL THE TIME without upgrading any + other programs at all. It is absolutely required, because flag-days + and dependencies are horribly bad. + + And it is also required simply because I as a kernel developer do not + upgrade random other tools that I don't even care about as I develop the + kernel, and I want any of my users to feel safe doing the same time. + +* 出自 `2017-10-26(3) <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: + + But if something actually breaks, then the change must get fixed or + reverted. And it gets fixed in the *kernel*. Not by saying "well, fix your + user space then". It was a kernel change that exposed the problem, it needs + to be the kernel that corrects for it, because we have a "upgrade in place" + model. We don't have a "upgrade with new user space". + + And I seriously will refuse to take code from people who do not understand + and honor this very simple rule. + + This rule is also not going to change. + + And yes, I realize that the kernel is "special" in this respect. I'm proud + of it. + +* 出自 `2017-10-26(4) <https://lore.kernel.org/all/CA+55aFwiiQYJ+YoLKCXjN_beDVfu38mg=Ggg5LFOcqHE8Qi7Zw@mail.gmail.com/>`_:: + + If you break existing user space setups THAT IS A REGRESSION. + + It's not ok to say "but we'll fix the user space setup". + + Really. NOT OK. + +什麼算是使用者空間介面、ABI、API、有文件記載的介面等 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-20 <https://lore.kernel.org/all/CAHk-=wga8Qu0-OSE9VZbviq9GuqwhPhLUXeAt-S7_9+fMCLkKg@mail.gmail.com/>`_:: + + So I absolutely detest the whole notion of "ABI changes". It's a + meaningless concept, and I hate it with a passion, [...] + + The Linux rule for regressions is basically based on the philosophical + question of "If a tree falls in the forest, and nobody is around to + hear it, does it make a sound?". + + So the only thing that matters is if something breaks user-*conscious* + behavior. + + And when that happens, the distinction between "bug fix" and "new + feature" and "ABI change" matters not one whit, and the change needs + to be done differently. + + [...] + + I just wanted to point out that the argument about whether it's an ABI + change or not is irrelevant. If it turns out that some program - not a test + script, but something with relevance to conscious user expectations ~ + depended on the old broken behavior, then it needs to be done some other + way. + +* 出自 `2026-02-13 <https://lore.kernel.org/all/CAHk-=whY-N8kjm8kiFUV5Ei-8AuYw--EPGD-AR3Pd+5GTx2sAQ@mail.gmail.com/>`_:: + + > [...] this should not fall under the don't break user space rule [...] + + Note that the rule is about breaking *users*, not breaking user space per + se. [...] + + If some user setup breaks, things need fixing. + + [...] but I want to make it very clear that there are no excuses about "user + space applications". + +* 出自 `2021-09-20(4) <https://lore.kernel.org/all/CAHk-=wi7DB2SJ-wngVvsJ7Ak2cM556Q8437sOXo4EJt2BWPdEg@mail.gmail.com/>`_:: + + [...] a regression is a bit like Schrödinger's cat - if nobody is around + to notice it and it doesn't actually affect any real workload, then you + can treat the regression as if it doesn't exist. + +* 出自 `2020-05-21 <https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/>`_:: + + The rules about regressions have never been about any kind of documented + behavior, or where the code lives. + + The rules about regressions are always about "breaks user workflow". + + Users are literally the _only_ thing that matters. + +* 出自 `2019-09-15 <https://lore.kernel.org/lkml/CAHk-=wiP4K8DRJWsCo=20hn_6054xBamGKF2kPgUzpB5aMaofA@mail.gmail.com/>`_:: + + One _particularly_ last-minute revert is the top-most commit (ignoring + the version change itself) done just before the release, and while + it's very annoying, it's perhaps also instructive. + + What's instructive about it is that I reverted a commit that wasn't + actually buggy. In fact, it was doing exactly what it set out to do, + and did it very well. In fact it did it _so_ well that the much + improved IO patterns it caused then ended up revealing a user-visible + regression due to a real bug in a completely unrelated area. + + The actual details of that regression are not the reason I point that + revert out as instructive, though. It's more that it's an instructive + example of what counts as a regression, and what the whole "no + regressions" kernel rule means. + + [...] The reverted commit didn't change any API's, and it didn't introduce + any new bugs. But it ended up exposing another problem, and as such caused + a kernel upgrade to fail for a user. So it got reverted. + + The point here being that we revert based on user-reported _behavior_, not + based on some "it changes the ABI" or "it caused a bug" concept. The problem + was really pre-existing, and it just didn't happen to trigger before. [...] + + Take-away from the whole thing: it's not about whether you change the + kernel-userspace ABI, or fix a bug, or about whether the old code + "should never have worked in the first place". It's about whether + something breaks existing users' workflow. + +* 出自 `2017-11-05 <https://lore.kernel.org/all/CA+55aFzUvbGjD8nQ-+3oiMBx14c_6zOj2n7KLN3UsJ-qsd4Dcw@mail.gmail.com/>`_:: + + And our regression rule has never been "behavior doesn't change". + That would mean that we could never make any changes at all. + +* 出自 `2020-05-21 <https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/>`_:: + + No amount of "you shouldn't have used this" or "that behavior was + undefined, it's your own fault your app broke" or "that used to work + simply because of a kernel bug" is at all relevant. + +* 出自 `2021-05-21 <https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/>`_:: + + But no, "that was documented to be broken" (whether it's because the code + was in staging or because the man-page said something else) is irrelevant. + If staging code is so useful that people end up using it, that means that + it's basically regular kernel code with a flag saying "please clean this + up". + + [...] + + The other side of the coin is that people who talk about "API stability" are + entirely wrong. API's don't matter either. You can make any changes to an + API you like - as long as nobody notices. + + Again, the regression rule is not about documentation, not about API's, and + not about the phase of the moon. + +* 出自 `2012-07-06 <https://lore.kernel.org/all/CA+55aFwnLJ+0sjx92EGREGTWOx84wwKaraSzpTNJwPVV8edw8g@mail.gmail.com/>`_:: + + > Now this got me wondering if Debian _unstable_ actually qualifies as a + > standard distro userspace. + + Oh, if the kernel breaks some standard user space, that counts. Tons + of people run Debian unstable + +* 出自 `2011-05-06 <https://lore.kernel.org/all/[email protected]/>`_:: + + It's clearly NOT an internal tracepoint. By definition. It's being + used by powertop. + +使用者或測試套件/CI 發現的迴歸 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2026-01-22 <https://lore.kernel.org/all/CAHk-=wheQNiW_WtHGO7bKkT7Uib-p+ai2JP9M+z+FYcZ6CAxYA@mail.gmail.com/>`_:: + + Users complaining is the only real line in the end. + + [...] a test-suite complaining is then often a *very* good indication that + maybe users will hit some problem, and test suite issues should be taken + very seriously [...] + + But a test-suite error isn't necessarily where you have to draw the + line - it's a big red flag [...] + +* 出自 `2024-29-01 <https://lore.kernel.org/all/CAHk-=wg8BrZEzjJ5kUyZzHPZmFqH6ooMN1gRBCofxxCfucgjaw@mail.gmail.com/>`_:: + + The "no regressions" rule is not about made-up "if I do this, behavior + changes". + + The "no regressions" rule is about *users*. + + If you have an actual user that has been doing insane things, and we + change something, and now the insane thing no longer works, at that + point it's a regression, and we'll sigh, and go "Users are insane" and + have to fix it. + + But if you have some random test that now behaves differently, it's + not a regression. It's a *warning* sign, sure: tests are useful. + +承認迴歸的發生 +~~~~~~~~~~~~~~ + +* 出自 `2026-01-22 <https://lore.kernel.org/all/CAHk-=wheQNiW_WtHGO7bKkT7Uib-p+ai2JP9M+z+FYcZ6CAxYA@mail.gmail.com/>`_:: + + But starting to argue about users reporting breaking changes is + basically the final line for me. I have a couple of people that I have + in my spam block-list and refuse to have anything to do with, and they + have generally been about exactly that. + + Note how it's not about making mistakes and _causing_ the regression. + That's normal. That's development. But then arguing about it is a + no-no. + +* 出自 `2024-06-23 <https://lore.kernel.org/all/CAHk-=wi_KMO_rJ6OCr8mAWBRg-irziM=T9wxGC+J1VVoQb39gw@mail.gmail.com/>`_:: + + We don't introduce regressions and then blame others. + + There's a very clear rule in kernel development: things that break + other things ARE NOT FIXES. + + EVER. + + They get reverted, or the thing they broke gets fixed. + +* 出自 `2021-06-05 <https://lore.kernel.org/all/CAHk-=wiUVqHN76YUwhkjZzwTdjMMJf_zN4+u7vEJjmEGh3recw@mail.gmail.com/>`_:: + + THERE ARE NO VALID ARGUMENTS FOR REGRESSIONS. + + Honestly, security people need to understand that "not working" is not + a success case of security. It's a failure case. + + Yes, "not working" may be secure. But security in that case is *pointless*. + +* 出自 `2017-10-26(5) <https://lore.kernel.org/lkml/CA+55aFwiiQYJ+YoLKCXjN_beDVfu38mg=Ggg5LFOcqHE8Qi7Zw@mail.gmail.com/>`_:: + + [...] when regressions *do* occur, we admit to them and fix them, instead of + blaming user space. + + The fact that you have apparently been denying the regression now for + three weeks means that I will revert, and I will stop pulling apparmor + requests until the people involved understand how kernel development + is done. + +反覆來回 +~~~~~~~~ + +* 出自 `2024-05-28 <https://lore.kernel.org/all/CAHk-=wgtb7y-bEh7tPDvDWru7ZKQ8-KMjZ53Tsk37zsPPdwXbA@mail.gmail.com/>`_:: + + The "no regressions" rule is that we do not introduce NEW bugs. + + It *literally* came about because we had an endless dance of "fix two + bugs, introduce one new one", and that then resulted in a system that + you cannot TRUST. + +* 出自 `2021-09-20(1) <https://lore.kernel.org/all/CAHk-=wi7DB2SJ-wngVvsJ7Ak2cM556Q8437sOXo4EJt2BWPdEg@mail.gmail.com/>`_:: + + And the thing that makes regressions special is that back when I + wasn't so strict about these things, we'd end up in endless "seesaw + situations" where somebody would fix something, it would break + something else, then that something else would break, and it would + never actually converge on anything reliable at all. + +* 出自 `2015-08-13 <https://lore.kernel.org/all/CA+55aFxk8-BsiKwr_S-c+4G6wihKPQVMLE34H9wOZpeua6W9+Q@mail.gmail.com/>`_:: + + The strict policy of no regressions actually originally started mainly wrt + suspend/resume issues, where the "fix one machine, break another" kind of + back-and-forth caused endless problems, and meant that we didn't actually + necessarily make any forward progress, just moving a problem around. + +有造成迴歸風險的變更 +~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2023-06-02 <https://lore.kernel.org/all/CAHk-=wgyAGUMHmQM-5Eb556z5xiHZB7cF05qjrtUH4F7P-1rSA@mail.gmail.com/>`_:: + + So what I think you should do is to fix the bug right, with a clean + patch, and no crazy hacks. That is something we can then apply and + test. All the while knowing full well that "uhhuh, this is a visible + change, we may have to revert it". + + If then some *real* load ends up showing a regression, we may just be + screwed. Our current behavior may be buggy, but we have the rule that + once user space depends on kernel bugs, they become features pretty + much by definition, however much we might dislike it. + +以核心內的權宜做法避免迴歸 +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2017-10-26(6) <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: + + Behavioral changes happen, and maybe we don't even support some + feature any more. There's a number of fields in /proc/<pid>/stat that + are printed out as zeroes, simply because they don't even *exist* in + the kernel any more, or because showing them was a mistake (typically + an information leak). But the numbers got replaced by zeroes, so that + the code that used to parse the fields still works. The user might not + see everything they used to see, and so behavior is clearly different, + but things still _work_, even if they might no longer show sensitive + (or no longer relevant) information. + +缺陷修正造成的迴歸 +~~~~~~~~~~~~~~~~~~ + +* 出自 `2018-08-03 <https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/>`_:: + + > Kernel had a bug which has been fixed + + That is *ENTIRELY* immaterial. + + Guys, whether something was buggy or not DOES NOT MATTER. + + [...] + + It's basically saying "I took something that worked, and I broke it, + but now it's better". Do you not see how f*cking insane that statement + is? + +內部 API 的變更 +~~~~~~~~~~~~~~~ + +* 出自 `2017-10-26(7) <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: + + We do API breakage _inside_ the kernel all the time. We will fix + internal problems by saying "you now need to do XYZ", but then it's + about internal kernel API's, and the people who do that then also + obviously have to fix up all the in-kernel users of that API. Nobody + can say "I now broke the API you used, and now _you_ need to fix it + up". Whoever broke something gets to fix it too. + +很久之後才發現的迴歸 +~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2024-03-28 <https://lore.kernel.org/all/CAHk-=wgFuoHpMk_Z_R3qMXVDgq0N1592+bABkyGjwwSL4zBtHA@mail.gmail.com/>`_:: + + I'm definitely not reverting a patch from almost a decade ago as a + regression. + + If it took that long to find, it can't be that critical of a regression. + + So yes, let's treat it as a regular bug. + +在 linux-next 中測試迴歸修正 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* 在 `2024 年維護者高峰會 <https://lwn.net/Articles/990599/>`_ 上:: + + So running fixes though linux-next is just a waste of time. + +與迴歸相關的其他幾個面向 +~~~~~~~~~~~~~~~~~~~~~~~~ + +* 出自 `2025-07-29(2) <https://lore.kernel.org/all/CAHk-=wjj9DvOZtmTkoLtyfHmy5mNKy6q_96d9=4FUEDXre=cww@mail.gmail.com/>`_ + [這件事 `雖然不完全算是迴歸,但造成了極大的不便 <https://lore.kernel.org/all/CAHk-=wgO0Rx2LcYT4f75Xs46orbJ4JxO2jbAFQnVKDYAjV5HeQ@mail.gmail.com/>`_]:: + + I no longer have sound. + + I also suspect that it's purely because "make oldconfig" doesn't work, + and probably turned off my old Intel HDA settings. Or something. + + Renaming config parameters is *bad*. I've harped on the Kconfig phase + of the kernel build probably being our nastiest point, and a real pain + point to people getting involved with development simply because + building your own kernel can be so daunting with hundreds of fairly + esoteric questions. + +.. + end-of-content +.. + 如本文件開頭所述,本文以 GPL-2.0+ 或 CC-BY-4.0 授權提供。如果你想只以 + CC-BY-4.0 授權散布本文,請以「The Linux kernel developers」作為作者署名, + 並連結以下網址作為來源: + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/handling-regressions.rst +.. + 注意:只有在 Linux 核心原始碼中找到的本 RST 檔案內容才以 CC-BY-4.0 授權 + 提供,因為經過處理的文字版本(例如經由核心的建置系統處理)可能包含取自 + 授權較嚴格之檔案的內容。
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -89,13 +89,13 @@ TODOList: :maxdepth: 1 debugging/index + handling-regressions security-bugs cve embargoed-hardware-issues TODOList: -* handling-regressions * threat-model 維護者資訊
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 7/13 docs/zh_TW: process: add deprecated.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/deprecated.rst into Traditional Chinese from the current English text, including the kmalloc_obj() family section and the rewritten strncpy() section that lists its replacements. There is no zh_CN translation of this file to consult.
The note in the allocator section links to the "Zero-length and one-element arrays" section by its HTML anchor; since the translated heading no longer produces that anchor, add an explicit zero-length-and-one-element-arrays target before the section.
List the new file in the toctree of process/index.rst, under "Other material" as in the English index, and drop it from the TODOList.
update to commit 079a028d6327 ("string: Remove strncpy() from the kernel")
--- .../translations/zh_TW/process/deprecated.rst | 361 ++++++++++++++++++ .../translations/zh_TW/process/index.rst | 6 +- 2 files changed, 366 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/deprecated.rst
Documentation/translations/zh_TW/process/deprecated.rst new file +361 -0
@@ -0,0 +1,361 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/deprecated.rst + +====================================== +已棄用的介面、語言特性、屬性與慣例 +====================================== + +在理想的世界裡,我們可以在單一開發週期內,把某個已棄用 API 的所有使用處 +都轉換成新的 API,並完全移除舊的 API。然而,由於核心的規模、維護者的層級 +架構以及時程等因素,這類轉換並不總是能一次完成。這表示在移除舊用法的同時, +新的用法可能會偷偷混進核心,只會讓移除該 API 的工作量越來越大。為了讓開發者 +了解哪些東西已被棄用以及原因,我們建立了這份清單;當有人提議把已棄用的東西 +納入核心時,可以引用這份清單。 + +__deprecated +------------ +雖然這個屬性確實會在視覺上把介面標示為已棄用,但它 `在建置時已不再產生警告 +<https://git.kernel.org/linus/771c035372a036f83353eef46dbb829780330234>`_, +因為核心的長期目標之一是在建置時不產生任何警告,而且實際上也沒有人在著手 +移除這些已棄用的介面。雖然在標頭檔中使用 `__deprecated` 來標註舊的 API +是不錯的做法,但這並不是完整的解決方案。這類介面必須從核心中完全移除, +或者加入這份檔案,以勸阻其他人未來再使用它們。 + +BUG() 和 BUG_ON() +----------------- +請改用 WARN() 和 WARN_ON(),並盡可能妥善地處理這種「不可能發生」的錯誤 +狀況。雖然 BUG() 系列 API 最初是設計成「不可能發生的情況」的斷言,並「安全 +地」終止核心執行緒,但事實證明它們的風險實在太高。(例如:「鎖需要以什麼 +順序釋放?各種狀態都已經恢復了嗎?」)使用 BUG() 經常會讓系統變得不穩定或 +完全崩潰,使得除錯甚至取得可用的當機報告都變得不可能。Linus 對此有 `非常強烈 +<https://lore.kernel.org/lkml/CA+55aFy6jNLsywVYdGp83AMrXBo_P-pkjkphPGrO=82SPKCpLQ@mail.gmail.com/>`_ +的 `看法 +<https://lore.kernel.org/lkml/CAHk-=whDHsbK3HTOpTF=ue_o04onRwTEaK_ZoJp_fjbqq4+=Jw@mail.gmail.com/>`_。 + +請注意,WARN() 系列只應該用於「預期不會執行到」的情況。如果要對「可能執行 +到但不希望發生」的情況發出警告,請使用 pr_warn() 系列函式。系統擁有者可能 +設定了 *panic_on_warn* sysctl,以確保系統在遇到「不可能執行到」的狀況時不會 +繼續執行。(例如,請參考 `這個 +<https://git.kernel.org/linus/d4689846881d160a4d12a514e991a740bcb5d65a>`_ +之類的 commit。) + +在配置函式的參數中直接進行算術運算 +---------------------------------- +動態的大小計算(尤其是乘法)不應該在記憶體配置函式(或類似函式)的參數中 +進行,因為有溢位的風險。這可能導致數值繞回(wrap around),使實際配置的 +空間比呼叫者預期的還小。使用這些配置出來的空間,可能導致堆積(heap)記憶體 +的線性溢位以及其他異常行為。(一個例外是字面常數值,此時編譯器可以在可能 +溢位時發出警告。不過在這些情況下,比較好的做法仍然是依照下面的建議重構程式 +碼,以避免直接進行算術運算。) + +例如,不要像這樣使用 ``count * size`` 作為參數:: + + foo = kmalloc(count * size, GFP_KERNEL); + +而應該使用配置函式的雙因子形式:: + + foo = kmalloc_array(count, size, GFP_KERNEL); + +具體來說,kmalloc() 可以換成 kmalloc_array(),kzalloc() 可以換成 +kcalloc()。 + +如果沒有可用的雙因子形式,就應該使用溢位時會飽和(saturate-on-overflow)的 +輔助函式:: + + bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL); + +另一個應避免的常見情況,是計算尾端帶有其他結構陣列的結構大小,例如:: + + header = kzalloc(sizeof(*header) + count * sizeof(*header->item), + GFP_KERNEL); + +請改用輔助函式:: + + header = kzalloc(struct_size(header, item, count), GFP_KERNEL); + +.. note:: 如果你在尾端陣列成員為零長度陣列或單元素陣列的結構上使用 + struct_size(),請重構這類陣列的用法,改用 `彈性陣列成員 + <#zero-length-and-one-element-arrays>`_。 + +其他計算請組合使用 size_mul()、size_add() 和 size_sub() 輔助函式。例如 +以下這種情況:: + + foo = krealloc(current_size + chunk_size * (count - 3), GFP_KERNEL); + +請改用輔助函式:: + + foo = krealloc(size_add(current_size, + size_mul(chunk_size, + size_sub(count, 3))), GFP_KERNEL); + +更多細節請參考 array3_size() 和 flex_array_size(),以及相關的 +check_mul_overflow()、check_add_overflow()、check_sub_overflow() 和 +check_shl_overflow() 系列函式。 + +simple_strtol()、simple_strtoll()、simple_strtoul()、simple_strtoull() +---------------------------------------------------------------------- +simple_strtol()、simple_strtoll()、simple_strtoul() 和 simple_strtoull() +函式會刻意忽略溢位,這可能讓呼叫者得到預期之外的結果。對應的 kstrtol()、 +kstrtoll()、kstrtoul() 和 kstrtoull() 函式通常是正確的替代品,但請注意, +它們要求字串必須以 NUL 或換行字元結尾。 + +strcpy() +-------- +strcpy() 不會對目的緩衝區做任何邊界檢查。這可能導致超出緩衝區結尾的線性溢位, +進而造成各種異常行為。雖然 `CONFIG_FORTIFY_SOURCE=y` 和各種編譯器旗標有助於 +降低使用這個函式的風險,但沒有任何好理由再新增這個函式的用法。安全的替代品 +是 strscpy(),但凡是用到 strcpy() 回傳值的地方都必須小心處理,因為 strscpy() +回傳的不是指向目的緩衝區的指標,而是複製的非 NUL 位元組數(截斷時則回傳負的 +errno)。 + +strncpy() +--------- +strncpy() 已經從核心中移除。所有原本的呼叫者都已改用更安全的替代函式。 + +strncpy() 不保證目的緩衝區會以 NUL 結尾,因而導致線性讀取溢位和其他異常行為。 +它也會無條件地以 NUL 填補目的緩衝區,對只使用以 NUL 結尾字串的呼叫者來說, +這是不必要的效能損失。由於它具有多種不同的行為,從這個 API 很難判斷作者進行 +複製時的真正意圖。 + +strncpy() 的替代函式如下: + +- strscpy():目的緩衝區必須以 NUL 結尾時使用。 +- strscpy_pad():目的緩衝區必須以 NUL 結尾並以零填補時使用(例如跨越權限 + 邊界的結構)。 +- memtostr():來源是不以 NUL 結尾的固定寬度資料、目的緩衝區需以 NUL 結尾時 + 使用(來源需加上 `__nonstring` 屬性)。 +- memtostr_pad():同上,但另外以零填補。 +- strtomem():目的是不以 NUL 結尾的固定寬度緩衝區時使用,目的緩衝區需加上 + `__nonstring` 屬性。 +- strtomem_pad():目的緩衝區不以 NUL 結尾且也需要以零填補時使用。 +- memcpy_and_pad():從可能沒有結尾字元的來源進行有界複製,且目的緩衝區大小 + 是執行期數值時使用。 + +strlcpy() +--------- +strlcpy() 會先讀取整個來源緩衝區(因為它的回傳值應該與 strlen() 的回傳值 +相同)。這次讀取可能會超出目的緩衝區的大小限制。這既沒有效率,而且當來源 +字串不以 NUL 結尾時,還可能導致線性讀取溢位。安全的替代品是 strscpy(),但 +凡是用到 strlcpy() 回傳值的地方都必須小心處理,因為 strscpy() 在截斷時會 +回傳負的 errno 值。 + +%p 格式指定符 +------------- +傳統上,在格式字串中使用 "%p" 經常會造成位址在 dmesg、proc、sysfs 等處外洩 +的漏洞。為了避免這些漏洞被利用,核心中所有 "%p" 的用法現在都會印出雜湊值, +使其無法用於定址。不應該在核心中新增 "%p" 的用法。對於程式碼(text)位址, +使用 "%pS" 可能比較好,因為它會改為印出更有用的符號名稱。至於幾乎其他所有 +情況,就乾脆不要加入 "%p"。 + +轉述 Linus 目前的 `指導原則 <https://lore.kernel.org/lkml/CA+55aFwQEd_d40g4mUCSsVRZzrFPUJt74vc6PPpb675hYNXcKw@mail.gmail.com/>`_: + +- 如果雜湊過的 "%p" 值沒有意義,請先問問自己指標本身是否重要。也許應該把它 + 整個移除? +- 如果你真的認為真實的指標值很重要,那麼為什麼某些系統狀態或使用者權限等級 + 會被視為「特殊」?如果你認為自己能(在註解和 commit 日誌中)提出足以經得起 + Linus 檢驗的理由,也許可以使用 "%px",同時確保權限設定合理。 + +如果你在除錯時遇到 "%p" 雜湊造成的問題,可以暫時以除錯旗標 +"`no_hash_pointers +<https://git.kernel.org/linus/5ead723a20e0447bc7db33dc3070b420e5f80aa6>`_" +開機。 + +可變長度陣列(VLA) +------------------- +使用堆疊上的 VLA 所產生的機器碼,比靜態大小的堆疊陣列差得多。雖然這些不容 +忽視的 `效能問題 <https://git.kernel.org/linus/02361bc77888>`_ 已足以成為 +消除 VLA 的理由,但它們同時也是安全風險。堆疊陣列的動態成長可能超出堆疊區段 +中剩餘的記憶體。這可能導致當機,可能覆寫堆疊尾端的敏感內容(在沒有啟用 +`CONFIG_THREAD_INFO_IN_TASK=y` 建置時),或覆寫與堆疊相鄰的記憶體(在沒有 +啟用 `CONFIG_VMAP_STACK=y` 建置時)。 + +隱式的 switch case 貫穿(fall-through) +--------------------------------------- +C 語言允許在某個 case 結尾缺少 "break" 敘述時,貫穿到下一個 case。然而這會 +讓程式碼產生歧義,因為缺少 break 究竟是刻意的還是 bug,並不總是那麼清楚。 +例如,光看程式碼並無法明顯看出 `STATE_ONE` 是否刻意設計成貫穿到 +`STATE_TWO`:: + + switch (value) { + case STATE_ONE: + do_something(); + case STATE_TWO: + do_other(); + break; + default: + WARN("unknown state"); + } + +由於已經出現過一長串 `因缺少 "break" 敘述而造成的缺陷 +<https://cwe.mitre.org/data/definitions/484.html>`_,我們不再允許隱式貫穿。 +為了標示刻意的貫穿情況,我們採用了一個名為 "fallthrough" 的偽關鍵字巨集, +它會展開成 gcc 的擴充語法 `__attribute__((__fallthrough__)) +<https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html>`_。 +(等到 C17/C18 的 `[[fallthrough]]` 語法普遍獲得 C 編譯器、靜態分析器和 +IDE 支援時,我們就可以改用該語法來實作這個巨集偽關鍵字。) + +所有 switch/case 區塊都必須以下列其中之一結尾: + +* break; +* fallthrough; +* continue; +* goto <label>; +* return [expression]; + +.. _zero-length-and-one-element-arrays: + +零長度與單元素陣列 +------------------ +核心中經常需要一種方式,來宣告結構尾端帶有一組大小動態決定的元素。在這些 +情況下,核心程式碼應該一律使用 `「彈性陣列成員」(flexible array members) +<https://en.wikipedia.org/wiki/Flexible_array_member>`_。不應該再使用舊式的 +單元素或零長度陣列。 + +在較舊的 C 程式碼中,大小動態決定的尾端元素是透過在結構結尾宣告一個單元素 +陣列來實作的:: + + struct something { + size_t count; + struct foo items[1]; + }; + +這導致透過 sizeof() 計算大小時很容易出錯(必須扣掉那一個尾端元素的大小, +才能得到「標頭」的正確大小)。為了避免這類大小問題,後來引入了一個 +`GNU C 擴充 <https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_, +允許使用零長度陣列:: + + struct something { + size_t count; + struct foo items[0]; + }; + +但這又導致了其他問題,而且並未解決兩種寫法共有的一些問題,例如無法偵測到 +這種陣列被意外地 _沒有_ 放在結構的結尾(這可能直接發生,也可能在這種結構 +位於 union、結構中的結構等情況下發生)。 + +C99 引入了「彈性陣列成員」,它的陣列宣告完全不帶數字大小:: + + struct something { + size_t count; + struct foo items[]; + }; + +這就是核心預期宣告大小動態決定的尾端元素的方式。它讓編譯器能在彈性陣列不是 +結構中最後一個成員時產生錯誤,有助於防止某些 `未定義行為 +<https://git.kernel.org/linus/76497732932f15e7323dc805e8ea8dc11bb587cf>`_ +的缺陷被不小心引入程式碼庫。它也讓編譯器能正確分析陣列大小(透過 sizeof()、 +`CONFIG_FORTIFY_SOURCE` 和 `CONFIG_UBSAN_BOUNDS`)。舉例來說,沒有任何機制 +會警告我們,以下對零長度陣列套用 sizeof() 運算子的結果永遠是零:: + + struct something { + size_t count; + struct foo items[0]; + }; + + struct something *instance; + + instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL); + instance->count = count; + + size = sizeof(instance->items) * instance->count; + memcpy(instance->items, source, size); + +在上面程式碼的最後一行,``size`` 的值結果是 ``zero``,但有人可能以為它代表 +剛剛為尾端陣列 ``items`` 配置的動態記憶體的總位元組數。以下是這個問題的幾個 +例子:`連結 1 +<https://git.kernel.org/linus/f2cd32a443da694ac4e28fbf4ac6f9d5cc63a539>`_、 +`連結 2 +<https://git.kernel.org/linus/ab91c2a89f86be2898cee208d492816ec238b2cf>`_。 +相對地,`彈性陣列成員屬於不完整型別,因此不能套用 sizeof() 運算子 +<https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_,所以任何對這類運算子 +的誤用都會在建置時立刻被發現。 + +至於單元素陣列,必須特別留意 `這種陣列佔用的空間至少與該型別的單一物件相同 +<https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_, +因此它們會計入外層結構的大小。每當有人要為含有這種陣列成員的結構計算需要 +配置的動態記憶體總大小時,就很容易出錯:: + + struct something { + size_t count; + struct foo items[1]; + }; + + struct something *instance; + + instance = kmalloc(struct_size(instance, items, count - 1), GFP_KERNEL); + instance->count = count; + + size = sizeof(instance->items) * instance->count; + memcpy(instance->items, source, size); + +在上面的例子中,使用 struct_size() 輔助函式時必須記得計算 ``count - 1``, +否則就會——不小心地——多配置一個 ``items`` 物件的記憶體。最乾淨、最不容易 +出錯的實作方式,是使用 `彈性陣列成員`,並搭配 struct_size() 和 +flex_array_size() 輔助函式:: + + struct something { + size_t count; + struct foo items[]; + }; + + struct something *instance; + + instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL); + instance->count = count; + + memcpy(instance->items, source, flex_array_size(instance, items, instance->count)); + +有兩種特殊的替換情況必須使用 DECLARE_FLEX_ARRAY() 輔助巨集。(請注意,在 +UAPI 標頭檔中使用時,它的名稱是 __DECLARE_FLEX_ARRAY()。)這兩種情況是: +彈性陣列單獨存在於結構中,或是 union 的一部分。C99 規格不允許這兩種用法, +但並沒有技術上的理由(從這類陣列在這些地方的既有用法,以及 +DECLARE_FLEX_ARRAY() 所用的變通方法都可以看出來)。例如,要轉換以下程式碼:: + + struct something { + ... + union { + struct type1 one[0]; + struct type2 two[0]; + }; + }; + +就必須使用這個輔助巨集:: + + struct something { + ... + union { + DECLARE_FLEX_ARRAY(struct type1, one); + DECLARE_FLEX_ARRAY(struct type2, two); + }; + }; + +直接撰寫的結構物件 kmalloc 指派 +------------------------------- +直接撰寫 kmalloc() 系列的配置指派,會讓核心(以及編譯器)無法檢查被指派 +變數的型別,因而限制了相關的自我檢查(introspection),而這些檢查原本可能 +有助於對齊、繞回(wrap-around)或額外的強化措施。kmalloc_obj() 系列巨集 +提供了這種自我檢查,可用於單一物件、陣列和彈性物件配置的常見程式碼模式。 +例如,下列直接撰寫的指派:: + + ptr = kmalloc(sizeof(*ptr), gfp); + ptr = kzalloc(sizeof(*ptr), gfp); + ptr = kmalloc_array(count, sizeof(*ptr), gfp); + ptr = kcalloc(count, sizeof(*ptr), gfp); + ptr = kmalloc(struct_size(ptr, flex_member, count), gfp); + ptr = kmalloc(sizeof(struct foo), gfp); + +分別改寫成:: + + ptr = kmalloc_obj(*ptr [, gfp] ); + ptr = kzalloc_obj(*ptr [, gfp] ); + ptr = kmalloc_objs(*ptr, count [, gfp] ); + ptr = kzalloc_objs(*ptr, count [, gfp] ); + ptr = kmalloc_flex(*ptr, flex_member, count [, gfp] ); + __auto_type ptr = kmalloc_obj(struct foo [, gfp] ); + +gfp 參數是可選的,預設值為 GFP_KERNEL。如果 `ptr->flex_member` 有以 +__counted_by() 標註,那麼當 `count` 大於與 `flex_member` 相關聯的計數器 +成員所能儲存的最大值時,配置就會自動失敗。
Documentation/translations/zh_TW/process/index.rst +5 -1
@@ -113,10 +113,14 @@ TODOList: 這裡是一些大多數開發者會感興趣的其他社群指南: +.. toctree:: + :maxdepth: 1 + + deprecated + TODOList: * kernel-docs -* deprecated .. only:: subproject and html
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 8/13 docs/zh_TW: process: add kernel-docs.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/kernel-docs.rst into Traditional Chinese from the current English text, including the Rust section and The Linux Memory Manager entry. Book, site and talk titles are kept in English, and the long book titles are wrapped to fit in 80 columns. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, before deprecated as in the English index, and drop it from the TODOList.
update to commit 57937eac1f78 ("kernel-docs: Add book to process/kernel-docs.rst")
--- .../translations/zh_TW/process/index.rst | 5 +- .../zh_TW/process/kernel-docs.rst | 353 ++++++++++++++++++ 2 files changed, 354 insertions(+), 4 deletions(-) create mode 100644 Documentation/translations/zh_TW/process/kernel-docs.rst
Documentation/translations/zh_TW/process/index.rst +1 -4
@@ -116,12 +116,9 @@ TODOList: .. toctree:: :maxdepth: 1 + kernel-docs deprecated -TODOList: - -* kernel-docs - .. only:: subproject and html 目錄
Documentation/translations/zh_TW/process/kernel-docs.rst new file +353 -0
353 lines not on this page · raw message
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 9/13 docs/zh_TW: process: add maintainer-handbooks.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/maintainer-handbooks.rst into Traditional Chinese from the current English text. The maintainers-profile-toc directive is kept as is, as in the it_IT and pt_BR translations, so the list of subsystem profiles is generated from MAINTAINERS. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, under "Maintainer information" as in the English index, and drop it from the TODOList.
update to commit bda185c30593 ("docs: maintainers_include: Only show main entry for profiles")
--- .../translations/zh_TW/process/index.rst | 6 +++++- .../zh_TW/process/maintainer-handbooks.rst | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/maintainer-handbooks.rst
Documentation/translations/zh_TW/process/index.rst +5 -1
@@ -103,9 +103,13 @@ TODOList: 如何找到會接受你補丁的人。 +.. toctree:: + :maxdepth: 1 + + maintainer-handbooks + TODOList: -* maintainer-handbooks * maintainers 其他材料
Documentation/translations/zh_TW/process/maintainer-handbooks.rst new file +20 -0
@@ -0,0 +1,20 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/maintainer-handbooks.rst + +子系統與維護者樹特定的開發流程說明 +================================== + +本文件的目的是提供子系統特定的資訊,作為一般開發流程手冊 +:ref:`Documentation/translations/zh_TW/process <tw_development_process_main>` 的補充。 + +對開發者而言,下面列出了所有已知的子系統特定指南。如果你要貢獻的子系統 +沒有在這裡列出指南,可以就 +Documentation/maintainer/maintainer-entry-profile.rst 中提出的問題尋求釐清。 + +對維護者而言,如果投稿經常忽略某些特定的提交標準,可以考慮把額外的要求與 +期望寫成文件。請參閱 Documentation/maintainer/maintainer-entry-profile.rst。 + +.. maintainers-profile-toc::
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 10/13 docs/zh_TW: process: add contribution-maturity-model.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/contribution-maturity-model.rst into Traditional Chinese from the current English text. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, after code-of-conduct-interpretation as in the English index, and drop it from the TODOList.
update to commit 10a29eb658b3 ("Documentation/process: Add Linux Kernel Contribution Maturity Model")
--- .../process/contribution-maturity-model.rst | 83 +++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/contribution-maturity-model.rst
Documentation/translations/zh_TW/process/contribution-maturity-model.rst new file +83 -0
@@ -0,0 +1,83 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/contribution-maturity-model.rst + +======================== +Linux 核心貢獻成熟度模型 +======================== + + +背景 +==== + +在 2021 年 Linux 核心維護者高峰會(Linux Kernel Maintainers’ Summit)上,有一場 +關於招募核心維護者以及維護者接班所面臨之挑戰的 `討論 +<https://lwn.net/Articles/870581/>`_。該討論得出的部分結論包括:身為 Linux 核心 +社群一份子的公司,需要允許工程師將擔任維護者作為其工作的一部分,讓他們能夠成長 +為受人尊敬的領導者,並最終成為核心維護者。為了支持穩定的人才輸送管道,應該允許 +並鼓勵開發者承擔上游貢獻,例如審查他人的修補程式、重構核心基礎架構,以及撰寫 +文件。 + +為此,Linux 基金會技術諮詢委員會(Technical Advisory Board,TAB)提出這份 Linux +核心貢獻成熟度模型。這些關於參與上游社群的共同期望,旨在提升個別開發者的影響力、 +增進組織之間的協作,並改善 Linux 核心生態系的整體健康。 + +TAB 呼籲各組織持續評估自身的開源(Open Source)成熟度模型,並承諾進行改進,以與 +本模型保持一致。為了讓評估有成效,評估應納入來自整個組織的回饋,包括管理階層以及 +各個資歷層級的開發者。秉持開源精神,我們鼓勵各組織公開其評估結果,以及改善其與 +上游社群互動的計畫。 + +第 0 級 +======= + +* 不允許軟體工程師向 Linux 核心貢獻修補程式。 + + +第 1 級 +======= + +* 允許軟體工程師向 Linux 核心貢獻修補程式,無論是作為其工作職責的一部分, + 還是利用個人時間。 + +第 2 級 +======= + +* 期望軟體工程師將貢獻 Linux 核心作為其工作職責的一部分。 +* 軟體工程師參加 Linux 相關會議將獲得支持,並視為其工作的一部分。 +* 軟體工程師的上游程式碼貢獻,將在升遷與績效考核中納入考量。 + +第 3 級 +======= + +* 期望軟體工程師將審查修補程式(包括其他公司工程師所撰寫的修補程式)作為其 + 工作職責的一部分。 +* 在 Linux 相關會議或學術會議(例如由 Linux 基金會、Usenix、ACM 等主辦的會議) + 上發表簡報或論文,視為工程師工作的一部分。 +* 軟體工程師的社群貢獻,將在升遷與績效考核中納入考量。 +* 組織將定期回報其開源貢獻的指標,並長期追蹤這些指標。這些指標可以只在組織內部 + 公開,也可以由組織自行決定將部分或全部對外公開。強烈建議的指標包括: + + * 依團隊或組織計算的上游核心貢獻數量(例如所有向同一位經理、總監或副總裁回報 + 的人員)。 + * 已做出上游貢獻的核心開發者,佔組織內核心開發者總數的百分比。 + * 組織的伺服器和/或產品所使用的核心,與其內部核心所依據的上游核心發布日期 + 之間的時間間隔。 + * 內部核心中所含樹外(out-of-tree)提交的數量。 + +第 4 級 +======= + +* 鼓勵軟體工程師將一部分工作時間投入上游工作(Upstream Work),其定義包括審查 + 修補程式、擔任議程委員會(program committee)成員、改善專案的關鍵基礎架構 + (例如撰寫或維護測試)、減少上游的技術債、撰寫文件等。 +* 軟體工程師協助籌辦 Linux 相關會議將獲得支持。 +* 組織在正式的績效考核中,將考量社群成員的回饋。 + +第 5 級 +======= + +* 上游核心開發被視為正式的職位,工程師至少有三分之一的時間用於上游工作。 +* 組織將主動徵求社群成員的回饋,作為正式績效考核的一項因素。 +* 組織將定期在內部報告上游工作與直接追求商業目標之工作兩者的比例。
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -65,6 +65,7 @@ TODOList: license-rules code-of-conduct code-of-conduct-interpretation + contribution-maturity-model kernel-enforcement-statement kernel-driver-statement stable-api-nonsense
@@ -74,7 +75,6 @@ TODOList: TODOList: -* contribution-maturity-model * generated-content * coding-assistants * conclave
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 11/13 docs/zh_TW: process: add conclave.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/conclave.rst into Traditional Chinese from the current English text. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, after researcher-guidelines (generated-content and coding-assistants, which precede it in the English index, are not translated), and drop it from the TODOList.
update to commit 102606402f4f ("Documentation: Project continuity")
--- .../translations/zh_TW/process/conclave.rst | 35 +++++++++++++++++++ .../translations/zh_TW/process/index.rst | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_TW/process/conclave.rst
Documentation/translations/zh_TW/process/conclave.rst new file +35 -0
@@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: ../disclaimer-zh_TW.rst + +:Original: Documentation/process/conclave.rst + +Linux 核心專案延續性 +==================== + +Linux 核心開發專案的分布非常廣泛,有超過 100 位維護者,各自努力讓變更在他們 +自己的儲存庫中持續推進。不過,最後一步是集中式的:變更會被拉取(pull)進主線 +儲存庫。這項工作通常由 Linus Torvalds 負責,但正如 2018 年 4.19 版發布時所 +展現的,在有需要時,也有其他人能夠承擔這項工作。 + +若該儲存庫的維護者今後不願意或無法再承擔這項工作(包括協助交接),本專案將 +需要立即找到一位或多位接替者。完成此事的流程列於下方。$ORGANIZER 指的是最近 +一次維護者高峰會(Maintainer Summit)的籌辦人,或以 Linux 基金會(Linux +Foundation,LF)技術諮詢委員會(Technical Advisory Board,TAB)的現任主席 +作為備援。 + +- 在 72 小時內,$ORGANIZER 將與最近一次已結束的維護者高峰會(Maintainers + Summit)的受邀者展開討論。這些受邀者與 TAB 之間的會議(線上或實體皆可)將 + 盡快安排,並以能讓最多人參與的方式進行。 + +- 若過去 15 個月內沒有舉行過維護者高峰會,本次會議的受邀者名單將由 TAB 決定。 + +- 本次會議的受邀者可視需要再邀請其他維護者加入。 + +- 本次會議由 $ORGANIZER 主持,將考量頂層核心儲存庫後續管理的各種選項,且所做 + 的選擇須符合「能最大化本專案及其社群的長期健康」此一期望。 + +- 在兩週內,此小組的一位代表將透過 [email protected] 郵件列表,向更廣大 + 的社群說明接下來的步驟。 + +Linux 基金會將在 TAB 的指導下,採取必要的步驟來支持並執行此計畫。
Documentation/translations/zh_TW/process/index.rst +1 -1
@@ -72,12 +72,12 @@ TODOList: stable-kernel-rules management-style researcher-guidelines + conclave TODOList: * generated-content * coding-assistants -* conclave 處理缺陷 --------
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 12/13 docs/zh_TW: process: add threat-model.rst translation
In reply to Chen-Yu YehTranslate Documentation/process/threat-model.rst into Traditional Chinese from the current English text. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, after security-bugs as in the English index, and drop it from the TODOList.
update to commit 60763c2f834d ("docs: threat-model: fix /dev/kmsg reference")
--- .../translations/zh_TW/process/index.rst | 5 +- .../zh_TW/process/threat-model.rst | 187 ++++++++++++++++++ 2 files changed, 188 insertions(+), 4 deletions(-) create mode 100644 Documentation/translations/zh_TW/process/threat-model.rst
Documentation/translations/zh_TW/process/index.rst +1 -4
@@ -91,13 +91,10 @@ TODOList: debugging/index handling-regressions security-bugs + threat-model cve embargoed-hardware-issues -TODOList: - -* threat-model - 維護者資訊 ----------
Documentation/translations/zh_TW/process/threat-model.rst new file +187 -0
187 lines not on this page · raw message
Signature · 1 line
2.43.0
Chen-Yu Yeh
maintainerPATCH v2 13/13 docs/zh_TW: process: add maintainers.rst translation
In reply to Chen-Yu YehDocumentation/process/maintainers.rst consists only of the maintainers-include directive, which renders the top-level MAINTAINERS file. The directive cannot be reused in the translation, as it would define the maintainers and maintainers_table labels a second time and duplicate the whole maintainers table.
Instead, translate the descriptive header of MAINTAINERS (the section entry descriptions and the note on the maintainers list) into Traditional Chinese, and point readers to the English page and the MAINTAINERS file for the list itself. There is no zh_CN translation of this file to consult.
List the new file in the toctree of process/index.rst, under "Maintainer information" as in the English index, and drop it from the TODOList.
update to commit 45a92c0b91d7 ("docs: maintainers: add SPDX license to the file")
--- .../translations/zh_TW/process/index.rst | 5 +- .../zh_TW/process/maintainers.rst | 125 ++++++++++++++++++ 2 files changed, 126 insertions(+), 4 deletions(-) create mode 100644 Documentation/translations/zh_TW/process/maintainers.rst
Documentation/translations/zh_TW/process/index.rst +1 -4
@@ -104,10 +104,7 @@ TODOList: :maxdepth: 1 maintainer-handbooks - -TODOList: - -* maintainers + maintainers 其他材料 --------
Documentation/translations/zh_TW/process/maintainers.rst new file +125 -0
125 lines not on this page · raw message
Signature · 1 line
2.43.0