今日重点:🏷️ 术语卡——今天认识两个安全术语:arm64 的 GCS(影子栈)和 SPDM(设备认证协议)。都来自今天日报的头条,定义取自补丁邮件原文(带 lore 链接可溯源)。
🏷️ 术语卡:两个安全地基术语
/ section★ ① GCS = Guarded Control Stack(受防护的控制栈 / 影子栈)
英文定义(原句) The current GCS pointer value stored in LR is also pushed onto the GCS, and when a RET is executed the top of the GCS is popped and compared to LR with a fault being raised if the values do not match. GCS operations may only be performed on GCS pages, a data abort is generated if they are not.
中文理解 「存在 LR 里的当前 GCS 指针值,也会压进 GCS;执行 RET 时,GCS 栈顶被弹出并与 LR 对比,不一致就触发 fault。GCS 操作只能在 GCS 页上进行,否则产生 data abort。」—— GCS 就是 arm64 的影子栈:函数返回地址多存一份在受保护的第二栈,返回时对账,防 ROP 攻击改返回地址。
记忆钩子 GCS =
Guarded Control Stack。三个动词串起机制:pushed(压入 LR 的副本)→ popped and compared(弹出对比)→ fault raised(不符即报错)。想成「返回地址存了个受保护的副本,回家时对一下账」。 🔗 原文
★ ② SPDM = Security Protocols and Data Models(安全协议与数据模型)
英文定义(原句) Security Protocols and Data Models (SPDM) is used for authentication, attestation and key exchange. SPDM is generally used over a range of [transports]. The SPDM specification is also complex, with the 1.2.1 spec being almost 200 [pages].
中文理解 「SPDM 用于认证、可信证明和密钥交换,通常跑在一系列传输层之上。规范本身很复杂,1.2.1 版就有近 200 页。」—— 设备向主机证明「我是真设备、我没被篡改」的协议(如 PCIe 设备的 CMA 认证)。今天的新闻点是它被 Rust 重写(复杂规范 × 不可信输入 = 内存安全该上阵)。
记忆钩子 SPDM 三件事,记三个词:
authentication(你是谁)、attestation(你值得信)、key exchange(建立密钥)。缩写展开:Security Protocol + Data Model,一个管「怎么安全地谈」,一个管「谈的数据长什么样」。 🔗 原文
✨ 辅助彩蛋(地道表达)
/ section★ 原句里可直接用的两个表达
a fault being raised if ... 「若……则触发 fault」—— 内核英文里描述异常条件的标准结构:
with a fault being raised if the values do not match。用「条件放在 if 后、后果用被动 being raised」把两个事件压缩成一句,读起来像设计文档,很地道。 is used for A, B and C SPDM 定义那句
is used for authentication, attestation and key exchange —— 「用于 A、B 和 C」的并列式,是解释一个东西用途的万能句式。给自己造一句:BPF is used for tracing, networking and security. 🔗 原文
✍️ 今日练习
/ section✍️ 用 GCS 原句里学到的结构,用 2~3 句英文向别人解释「GCS 是怎么防返回地址被篡改的」。提示线索:LR 的副本压进第二个栈 → RET 时弹出对比 → 不符就 fault → 只能在 GCS 页上操作。
💡 显示答案
参考(仿写示范,非原句):When GCS is active, a copy of the return address in LR is pushed onto a secondary, protected stack. On a RET, the top of that stack is popped and compared with LR — a fault is raised if they do not match. Since GCS operations are only allowed on dedicated GCS pages, an attacker who corrupts the return address can't pass the check.
📖 原文:The current GCS pointer value stored in LR is also pushed onto the GCS, and when a RET is executed the top of the GCS is popped and compared to LR with a fault being raised if the values do not match. GCS operations may only be performed on GCS pages, a data abort is generated if they are not.
📎 原文引用 A term is a door — open it with the original sentence, and the whole mechanism walks in.
内核英语 · 每日一篇
💬 评论
使用 GitHub 账号登录即可留言