Tech
GPU在Confidential Computing中如何管理内存?
从UVM分配开始 Path: kernel-open/nvidia-uvm/uvm_va_space.c 注意这个: if (uvm_conf_computing_mode_enabled(gpu)) { NvU32 gpu_index = uvm_id_gpu_index(gpu->id); status = … Read more →
GPU TEE Setup: From Zero to (Almost) Hero
Setting up an H100 GPU TEE (Trusted Execution Environment) from scratch, while experiencing the joy of Artifact Evaluation. This post documents the pitfalls I encountered—referencing the official docs … Read more →
Verifying Constant-time
Constant-time的验证方法们。 Intro Constant-time作为密码学实现上一个重要的property,在抵御side-channel上面有很重要的作用。尤其是在这个Post-spectre的年代,microarchitectural level的side-channel attack已经成为了一个很大的威胁。近年来这个领域的researcher们飙了很多关于constant … Read more →
SMT/SAT: From Zero to 0.1
I’ve recently been learning about SMT/SAT solvers. Here’s a brief summary. Concepts SMT: Satisfiability Modulo Theories; wiki SAT: (Boolean) Satisfiability; wiki SMT can be viewed as a … Read more →
从零开始搓一个编译器
今年手痒痒选了一个Implementation of PL的课,需要徒手搓编译器。这里来小记一下这个过程,感觉这可能是我校CS最硬核的课之一了。 其实老师给了Racket和Python两种语言的选择,奈何我实在是不习惯那长到姥姥家的Racket括号,于是选择了Python。幸好在最新的Python 3.10中引入了match case的新特性,这直接使得代码量减少了非常多!它太好用了!!!(感 … Read more →
Dark Magic in Computing — Rust Pitfalls
As I once said: My life is a lifelong battle with the Rust compiler. —Me And also: When you think Rust has a problem, it’s not because Rust has a problem— it’s because you have a problem. … Read more →
Dark Magic in Computing — C Pitfalls
There is no dark magic in computing—computers have no flesh and blood. Anyone who believes in computer dark magic is a muggle. —Me cdqe The Symptom While debugging with a colleague, we encountered … Read more →
Rust Study Notes
最近突然对于Rust产生了兴趣因为它的吉祥物小螃蟹很可爱,遂开始阅读The Rust PL一书想要一探究竟。我发现Rust真的是一门相当阳间的语言,一些functional programming的特性和build system可以让使用者用起来十分舒爽。 虽然目前只看了两十章,但我已经从代码中嗅到了了浓郁的Rust的香锈味。 基本看完了现在。 在一个较为清闲的周末早上,我决定把最后一章看完。 创 … Read more →
Adventures in Kernel Module Development
最近在我大哥儿子@StanPlatinum的指导下搞了个截获/添加syscall的kernel module,在这里稍微记录一下折腾的过程。 前排特别感谢一下Robotxm大佬的这篇博文里面记录了他详细的折腾过程。大佬本科期间就开始吊着Linux Kernel到处捉迷藏了,我本科的时候还不知道在哪个田野里面玩泥巴呢。 虽然大抵之前就接触过这玩意,但是由于每个版本Kernel Module的食用方法 … Read more →
SGX Local Attestation Source Code Analysis
记一个对于Intel SGX Local Attestation Sample Code的一次Comprehensive的analysis。Warning:这篇文章十分臭长,超级干燥。 Overview Linux SGX样例里面给了Local Attestation的程序Sample。这里给出了两个Local Attestation的design:一个App下的俩Enclave和俩App对应 … Read more →