← Documents Documentation/ABI/testing/sysfs-kernel-livepatch GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Kernel livepatch sysfs ABI

Load된 live patch의 patch→object→function 계층, enable·transition·force·atomic-replace·stack order와 object patch 상태를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-kernel-livepatch
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Patch lifecycle and transition control

sysfs-kernel-livepatch:1-68

Load된 patch modules를 object별로 구성하고 enable·transition·force, atomic replacement와 stack order를 통해 적용 상태를 제어·관찰합니다.

Object and function state

sysfs-kernel-livepatch:69-95

Kernel object의 patch 여부와 function name·kallsyms occurrence를 결합한 function directory identity를 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/kernel/livepatch
2 Date: Nov 2014
3 KernelVersion: 3.19.0
4 Contact: live-patching@vger.kernel.org
5 Description:
6 Interface for kernel live patching
7
8 The /sys/kernel/livepatch directory contains subdirectories for
9 each loaded live patch module.
10
11 What: /sys/kernel/livepatch/<patch>
12 Date: Nov 2014
13 KernelVersion: 3.19.0
14 Contact: live-patching@vger.kernel.org
15 Description:
16 The patch directory contains subdirectories for each kernel
17 object (vmlinux or a module) in which it patched functions.
18
19 What: /sys/kernel/livepatch/<patch>/enabled
20 Date: Nov 2014
21 KernelVersion: 3.19.0
22 Contact: live-patching@vger.kernel.org
23 Description:
24 A writable attribute that indicates whether the patched
25 code is currently applied. Writing 0 will disable the patch
26 while writing 1 will re-enable the patch.
27
28 What: /sys/kernel/livepatch/<patch>/transition
29 Date: Feb 2017
30 KernelVersion: 4.12.0
31 Contact: live-patching@vger.kernel.org
32 Description:
33 An attribute which indicates whether the patch is currently in
34 transition.
35
36 What: /sys/kernel/livepatch/<patch>/force
37 Date: Nov 2017
38 KernelVersion: 4.15.0
39 Contact: live-patching@vger.kernel.org
40 Description:
41 A writable attribute that allows administrator to affect the
42 course of an existing transition. Writing 1 clears
43 TIF_PATCH_PENDING flag of all tasks and thus forces the tasks to
44 the patched or unpatched state. Administrator should not
45 use this feature without a clearance from a patch
46 distributor. Removal (rmmod) of patch modules is permanently
47 disabled when the feature is used. See
48 Documentation/livepatch/livepatch.rst for more information.
49
50 What: /sys/kernel/livepatch/<patch>/replace
51 Date: Jun 2024
52 KernelVersion: 6.11.0
53 Contact: live-patching@vger.kernel.org
54 Description:
55 An attribute which indicates whether the patch supports
56 atomic-replace.
57
58 What: /sys/kernel/livepatch/<patch>/stack_order
59 Date: Jan 2025
60 KernelVersion: 6.14.0
61 Description:
62 This attribute specifies the sequence in which live patch modules
63 are applied to the system. If multiple live patches modify the same
64 function, the implementation with the biggest 'stack_order' number
65 is used, unless a transition is currently in progress.
66
67 What: /sys/kernel/livepatch/<patch>/<object>
68 Date: Nov 2014
69 KernelVersion: 3.19.0
70 Contact: live-patching@vger.kernel.org
71 Description:
72 The object directory contains subdirectories for each function
73 that is patched within the object.
74
75 What: /sys/kernel/livepatch/<patch>/<object>/patched
76 Date: August 2022
77 KernelVersion: 6.1.0
78 Contact: live-patching@vger.kernel.org
79 Description:
80 An attribute which indicates whether the object is currently
81 patched.
82
83 What: /sys/kernel/livepatch/<patch>/<object>/<function,sympos>
84 Date: Nov 2014
85 KernelVersion: 3.19.0
86 Contact: live-patching@vger.kernel.org
87 Description:
88 The function directory contains attributes regarding the
89 properties and state of the patched function.
90
91 The directory name contains the patched function name and a
92 sympos number corresponding to the nth occurrence of the symbol
93 name in kallsyms for the patched object.
94
95 There are currently no such attributes.
96

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Kernel livepatch

1-10
항목한국어 전문 번역
What/sys/kernel/livepatch
Date2014년 11월
KernelVersion3.19.0
Contactlive-patching@vger.kernel.org
DescriptionKernel live patching interface입니다. `/sys/kernel/livepatch` directory에는 load된 각 live patch module의 subdirectory가 있습니다.

Kernel <patch>

11-18
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>
Date2014년 11월
KernelVersion3.19.0
Contactlive-patching@vger.kernel.org
DescriptionPatch directory에는 patched functions가 있는 각 kernel object(`vmlinux` 또는 module)의 subdirectory가 있습니다.
Livepatch sysfs hierarchy
LevelPathContent
Patch/sys/kernel/livepatch/<patch>Patched kernel objects
Object<patch>/<object>Patched functions in vmlinux or module
Function<patch>/<object>/<function,sympos>Function name and kallsyms occurrence

Load된 patch에서 kernel object와 patched function까지 내려가는 계층입니다.

Kernel enabled

19-27
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/enabled
Date2014년 11월
KernelVersion3.19.0
Contactlive-patching@vger.kernel.org
DescriptionPatched code가 현재 적용되었는지 나타내는 writable attribute입니다. `0`을 쓰면 patch를 disable하고 `1`을 쓰면 다시 enable합니다.

Kernel transition

28-35
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/transition
Date2017년 2월
KernelVersion4.12.0
Contactlive-patching@vger.kernel.org
DescriptionPatch가 현재 transition 중인지 나타내는 attribute입니다.

Kernel force

36-49
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/force
Date2017년 11월
KernelVersion4.15.0
Contactlive-patching@vger.kernel.org
DescriptionAdministrator가 진행 중인 transition 과정에 영향을 줄 수 있는 writable attribute입니다. `1`을 쓰면 모든 tasks의 `TIF_PATCH_PENDING` flag를 clear하여 tasks를 patched 또는 unpatched state로 강제합니다. Patch distributor의 clearance 없이 사용해서는 안 됩니다. 이 feature를 사용하면 patch modules의 removal(`rmmod`)이 영구적으로 disabled됩니다. 자세한 내용은 `Documentation/livepatch/livepatch.rst`를 참조합니다.

Kernel replace

50-57
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/replace
Date2024년 6월
KernelVersion6.11.0
Contactlive-patching@vger.kernel.org
DescriptionPatch가 `atomic-replace`를 지원하는지 나타내는 attribute입니다.

Kernel stack order

58-66
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/stack_order
Date2025년 1월
KernelVersion6.14.0
DescriptionLive patch modules가 system에 적용되는 sequence를 지정합니다. 여러 live patches가 같은 function을 수정하면 transition이 진행 중인 경우를 제외하고 가장 큰 `stack_order` number를 가진 implementation을 사용합니다.
Livepatch patch-level state and controls
AttributeAccess or valueMeaning
enabledWritable: 0 | 1Disable or re-enable patch
transitionStateTransition currently in progress
forceWritable: 1Clear TIF_PATCH_PENDING for all tasks
replaceCapabilitySupports atomic-replace
stack_orderSequence numberLargest number wins for same function
Permanent consequenceforce를 사용하면 patch module removal(rmmod)이 영구적으로 disabled됩니다.

Patch 적용, transition 제어와 replacement·stacking 특성을 비교합니다.

Kernel <object>

67-74
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/<object>
Date2014년 11월
KernelVersion3.19.0
Contactlive-patching@vger.kernel.org
DescriptionObject directory에는 해당 object 안에서 patch된 각 function의 subdirectory가 있습니다.

Kernel patched

75-82
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/<object>/patched
Date2022년 8월
KernelVersion6.1.0
Contactlive-patching@vger.kernel.org
DescriptionObject가 현재 patched 상태인지 나타내는 attribute입니다.

Kernel <function,sympos>

83-95
항목한국어 전문 번역
What/sys/kernel/livepatch/<patch>/<object>/<function,sympos>
Date2014년 11월
KernelVersion3.19.0
Contactlive-patching@vger.kernel.org
DescriptionFunction directory에는 patch된 function의 properties와 state 관련 attributes가 들어갑니다. Directory name은 patched function name과, patched object의 `kallsyms`에서 같은 symbol name이 몇 번째로 나타나는지에 대응하는 `sympos` number를 포함합니다. 현재는 이러한 attributes가 없습니다.