kexec_stack is misaligned
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- c, linux
研究方向
從 a/p/kexec/core_64.c 中的 kexec_stack 宣告開始,檢查 __init_task_data 如何針對 powerpc 展開,包括所參照的 commit。重新建置核心並檢查 .build/System.map;當 kexec_stack 以 16384 位元組對齊且不破壞 kexec 路徑時即表示完成。
由索引模型根據 Issue 內容生成。
描述
There is code in a/p/kexec/core_64.c:
/*
* kexec thread structure and stack.
*
* We need to make sure that this is 16384-byte aligned due to the
* way process stacks are handled. It also must be statically allocated
* or allocated as part of the kimage, because everything else may be
* overwritten when we copy the kexec image. We piggyback on the
* "init_task" linker section here to statically allocate a stack.
*
* We could use a smaller stack if we don't care about anything using
* current, but that audit has not been performed.
*/
static union thread_union kexec_stack __init_task_data =
{ };
But since commit torvalds/linux@d11ed3ab3166a2bfad60681aebf3e13e1c3408a9 the __init_task_data macro has expanded to nothing on powerpc, because CONFIG_ARCH_TASK_STRUCT_ON_STACK is not set.
That means kexec_stack is not 16K aligned:
$ grep kexec_stack .build/System.map
c000000002a86800 b kexec_stack
In practice it probably doesn't matter, and no one has reported any breakage.
With modern kernels the only thing that's found by doing arithmetic on the stack pointer is pt_regs, via current_pt_regs(). That tends to only get used in ptrace and exec and so on, so is probably not called during the kexec sequence.
However it's still possible that bugs could be lurking due to the misaligned stack, so it should be properly aligned.
- 主要語言
- 沒有語言資料
- 星號
- 14
- 分支
- 0
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
linuxppc/issues 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
-
bug
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
nixos/rog-control-center: autoStart fails to build with asusctl 6.5.0 due to renamed .desktop file未關閉0.kind: bug
難度 1/5 1 小時以內 新手友好度 90/100
NixOS/nixpkgs#597200 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
Cisco-Talos/clamav#1957 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 2 天內回覆
-
[BUG] msetcfg accepts unsupported mcfg encodings可能已有人在做 @BinaryBardY 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
OpenXiangShan/NEMU#1319 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
cloud-hypervisor/cloud-hypervisor#9562 · 5 則留言 ·
維護者通常 1 天內回覆