docs: 新增 Linux 内核热补丁 sysfs 节点文档 (docs/livepatch-sysfs.md)#1
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/JohnsPony/bpf-developer-tutorial/sessions/7552335a-4aea-473d-95da-5b0d01faeae9 Co-authored-by: JohnsPony <112840588+JohnsPony@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] 新增文档《热补丁内核节点》到 docs/livepatch-sysfs.md
docs: 新增 Linux 内核热补丁 sysfs 节点文档 (docs/livepatch-sysfs.md)
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增面向内核/BPF 初学者的参考文档,系统讲解
/sys/kernel/livepatchsysfs 接口及 Linux livepatch 机制。覆盖内容
/sys/kernel/livepatch/<patch>/完整目录树,含 vmlinux 与内核模块补丁示例enabled、transition、force、patched、callbacks/的含义、取值、读写属性及注意事项transition卡住(RT 任务/中断上下文)、rmmod -EBUSY、加载失败错误速查表、force节点风险说明Original prompt
新增文档《热补丁内核节点》到 docs/livepatch-sysfs.md,系统讲解 Linux 内核 livepatch(如 kpatch、livepatch、kgraft 框架)的 sysfs 节点 /sys/kernel/livepatch,包括:
文档采用简体中文,内容为学习/排查热补丁 sysfs 节点入口资料,便于 BPF 或内核初学者理解原理和使用。该 PR 不涉及任何代码/功能变更,对现有内容无破坏性影响。
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: [ 0.929735] ------------[ cut here ]------------
[ 0.929736] WARNING: drivers/acpi/irq.c:63 at acpi_register_gsi+0xe0/0x100, CPU#0: swapper/0/1
[ 0.929740] Modules linked in:
[ 0.929742] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 7.1.0-rc1+ eunomia-bpf#4 PREEMPT(full)
[ 0.929745] Tainted: [W]=WARN
[ 0.929746] Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022
[ 0.929747] pc 9000000000df7ff0 ra 9000000000df7f7c tp 9000000100220000 sp 9000000100223a70
[ 0.929750] a0 0000000000000000 a1 0000000000000051 a2 0000000000000000 a3 0000000000000000
[ 0.929752] a4 9000000100223b10 a5 9000000100223b04 a6 9000000100223860 a7 0000000000000080
[ 0.929754] t0 0000000000000000 t1 90000000032f90c0 t2 ffffffffffffffff t3 0000000000000040
[ 0.929756] t4 0000000000000008 t5 90000000032fc3c8 t6 00000000000000f5 t7 0000800000000000
[ 0.929758] t8 000000000000002f u0 90000000018f8afc s9 90000000019740a8 s0 0000000000000051
[ 0.929760] s1 0000000000000000 s2 0000000000000000 s3 90000000025b5000 s4 0000000000000001
[ 0.929762] s5 900000010004b620 s6 9000000100b4d0c0 s7 9000000002473f18 s8 90000000019000b8
[ 0.929764] ra: 9000000000df7f7c acpi_register_gsi+0x6c/0x100
[ 0.929767] ERA: 9000000000df7ff0 acpi_register_gsi+0xe0/0x100
[ 0.929769] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[ 0.929775] PRMD: 00000004 (PPLV0 +PIE -PWE)
[ 0.929779] EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[ 0.929783] ECFG: 00071c3d (LIE=0,2-5,10-12 VS=7)
[ 0.929786] ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0)
[ 0.929789] PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
[ 0.929792] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 7.1.0-rc1+ eunomia-bpf#4 PREEMPT(full)
[ 0.929795] Tainted: [W]=WARN
[ 0.929796] Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022
[ 0.929797] Stack : 9000000100223748 0000000000000000 90000000002478e4 9000000100220000
[ 0.929802] 9000000100223690 9000000100223698 0000000000000000 90000001002237d8
[ 0.929806] 90000001002237d0 90000001002237d0 9000000100223540 0000000000000001
[ 0.929810] 0000000000000001 9000000100223698 bb631f1dda87d000 90000000027b4b58
[ 0.929814] bfffffffffffed36 fffffffffffffffe 900000000331e710 ffffffffffff0a00
[ 0.929819] ffffffffffffb000 9000000001ffc662 000000026a628000 90000000019740a8
[ 0.929823] 0000000000000000 0000000000000000 9000000002279b68 90000000025b5000
[ 0.929827] 0000000000000009 000000000000003f 0000000000000002 9000000002473f18
[ 0.929832] 90000000019000b8 0000000000000000 90000000002478fc 00007fffefa5831c
[ 0.929836] 00000000000000b0 0000000000000004 0000000000000000 0000000000071c3d
[ 0.929840] ...
[ 0.929842] Call Trace:
[ 0.929843] [<90000000002478fc>] show_stack+0x5c/0x190
[ 0.929846] [<90000000002414fc>] dump_stack_lvl+0x9c/0xc8
[ 0.929851] [<900000000026d32c>] __warn+0x8c/0x140
[ 0.929856] [<90000000018b5878>] __report_bug+0x88/0x1c0
[ 0.929860] [<90000000018b5ab0>] report_bug+0x40/0xc0
[ 0.929864] [<90000000018ee7f4>] do_bp+0x314/0x3a0
[ 0.929866] [<9000000000245fe0>] handle_bp+0x120/0x1c0
[ 0.929869] [<9000000000df7ff0>] acpi_register_gsi+0xe0/0x100
[ 0.929872] [<9000000000defec8>] acpi_pci_irq_enable+0xd8/0x280
[ 0.929876] [<9000000000d71e14>] pci_device_probe+0x64/0x2d0
[ 0.929880] [<9000000000f8b0ec>] really_probe+0xbc/0x370
[ 0.929884] [<9000000000f8b42c>] __driver_probe_device+0x8c/0x1e0
[ 0.929888] [<9000000000f8b6a8>] driver_probe_device+0x38/0x150
[ 0.929891] [<9000000000f8b9e0>] __driver_attach+0xa0/0x1f0
[ 0.929895] [<9000000000f881d8>] bus_for_each_dev+0x88/0x110
[ 0.929898] [<9000000000f89dc4>] bus_add_driver+0x104/0x270
[ 0.929901] [<9000000000f8cb98>] driver_register+0x68/0x140
[ 0.929905] [<9000000000244168>] do_one_initcall+0x78/0x210
[ 0.929910] [<9000000001901290>] kernel_init_freeable+0x274/0x314
[ 0.929912] [<90000000018f12b0>] kernel_init+0x1c/0x12c
[ 0.929915] [<90000000018eea48>] ret_from_kernel_thread+0x28/0x1c0
[ 0.929918] [<90000000002456c4>] ret_from_kernel_thread_asm+0xc/0x88
[ 0.929921]
[ 0.929922] ---[ end trace 0000000000000000 ]---
[ 0.929924] GSI: No registered irqchip, giving up
Assistant: 这段 dmesg/堆栈里最关键的两条信息...
This pull request was created from Copilot chat.