HackerTrans
热门最新趋势评论往期问答秀出招聘

rapidlua

no profile record

提交

Failing Randomly: Linux Seccomp and Kernel Hacking

mejedi.dev
9 分·作者 rapidlua·2年前·0 评论

评论

rapidlua
·7个月前·讨论
For go specifically, I find ko-build handy. It builds on the host (leveraging go crosscompilation and taking advantage of caches) and outputs a Docker image.
rapidlua
·9个月前·讨论
> How to manage pointer+offset address integrity/legality inside the kernel (for instance) has a proof by examples a-plenty in the other code

Let me provide some context here. These annotations aren’t there to help the compiler/linter. They exist to aid external tooling. Kernel can load BPF programs (JIT-compiled bytecode). BPF can invoke kernel functions and also some kernel entities can be implemented or augmented with BPF.

It is paramount to ensure that types are compatible at the boundaries and that constraints such as RCU locking are respected.

Kernel build records type info in a BTF blob. Some aspects aren’t captured in the type system, such as rcu facet, this is what the annotations are used for. The verifier relies on the BTF.
rapidlua
·10个月前·讨论
Go build is fundamentally better? How so? Go build is so light on features that adding generated files to source control is a norm in go land.
rapidlua
·去年·讨论
> Packages may not circularly reference each other.

Actually possible with go:linkname.
rapidlua
·2年前·讨论
I do occasionally attempt to edit patch files produced by git-format-patch. Frequently I end up with corrupt patch. Still curious how to fix those numbers.
rapidlua
·2年前·讨论
Is it just me, or the piece doesn’t explain how to make edits without messing up the hunk?
rapidlua
·2年前·讨论
Re nuclear reactor: higher tier virtualization products work flawlessly. It is a shame what a garbage virtual box turned into over the years.
rapidlua
·2年前·讨论
It was fun to read, but it would’ve probably been easier to rely on seccomp filters instead.
rapidlua
·2年前·讨论
Hardly. For starters, wasm doesn’t guarantee that a piece of code terminates in bound time. There are further security guarantees in ebpf such as any lock acquired must be released.