<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Systems on Ethan-ZYF</title><link>https://ethanzyf.com/tags/systems/</link><description>Recent content in Systems on Ethan-ZYF</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 31 May 2026 01:10:00 -0700</lastBuildDate><atom:link href="https://ethanzyf.com/tags/systems/index.xml" rel="self" type="application/rss+xml"/><item><title>HyperLogLog: Counting Billions of Distinct Items in Kilobytes</title><link>https://ethanzyf.com/blog/hyperloglog/</link><pubDate>Sun, 31 May 2026 01:10:00 -0700</pubDate><guid>https://ethanzyf.com/blog/hyperloglog/</guid><description>&lt;p&gt;HyperLogLog (HLL) is a probabilistic &lt;strong&gt;cardinality estimation&lt;/strong&gt; algorithm: using a tiny, fixed amount of memory (typically ~12 KB), it estimates the number of &lt;em&gt;distinct&lt;/em&gt; elements in a huge set, with a standard error of about 0.81%.&lt;/p&gt;</description></item><item><title>Cuckoo Filter: Approximate Membership That Supports Deletion</title><link>https://ethanzyf.com/blog/cuckoo-filter/</link><pubDate>Sun, 31 May 2026 00:45:00 -0700</pubDate><guid>https://ethanzyf.com/blog/cuckoo-filter/</guid><description>&lt;p&gt;A Cuckoo Filter is a probabilistic data structure for approximate set membership. Like a Bloom filter it answers &amp;ldquo;is this element &lt;em&gt;possibly&lt;/em&gt; in the set?&amp;rdquo; with a tunable false-positive rate and zero false negatives — but unlike a standard Bloom filter it also supports &lt;strong&gt;deleting&lt;/strong&gt; elements, is more space-efficient at low false-positive rates, and is more cache-friendly on lookups.&lt;/p&gt;</description></item><item><title>Day 5: AppArmor + layered sandbox design</title><link>https://ethanzyf.com/blog/day5-apparmor/</link><pubDate>Sat, 16 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day5-apparmor/</guid><description>&lt;p&gt;How AppArmor actually attaches to a process (via the &lt;code&gt;bprm_check_security&lt;/code&gt; LSM hook at &lt;code&gt;execve&lt;/code&gt; time, keyed on binary path), why &lt;code&gt;bash script.sh&lt;/code&gt; silently runs &lt;em&gt;unconfined&lt;/em&gt; while &lt;code&gt;./script.sh&lt;/code&gt; does not, the six exec modifiers (&lt;code&gt;ix&lt;/code&gt;/&lt;code&gt;Px&lt;/code&gt;/&lt;code&gt;Cx&lt;/code&gt;/&lt;code&gt;Ux&lt;/code&gt; and their setuid-preserving uppercase forms), the hardlink and bind-mount tricks that bypass path-based MAC, and why a production sandbox layers &lt;strong&gt;namespace + capability + seccomp + AppArmor + cgroup&lt;/strong&gt; — with the argument that, if you can only afford two, &lt;strong&gt;seccomp + AppArmor&lt;/strong&gt; is the highest-ROI pair.&lt;/p&gt;</description></item><item><title>Day 4: seccomp BPF Filter (filter mode deep dive)</title><link>https://ethanzyf.com/blog/day4-seccomp-filter/</link><pubDate>Thu, 14 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day4-seccomp-filter/</guid><description>&lt;p&gt;A deep dive into seccomp filter mode: the BPF data layout, why pointer args can&amp;rsquo;t be dereferenced (TOCTOU &lt;em&gt;and&lt;/em&gt; atomic context), the cBPF instruction skeleton, the multi-ABI bypasses every filter must defend against, and the eight &lt;code&gt;SECCOMP_RET_*&lt;/code&gt; actions that power modern container security — including the &lt;code&gt;USER_NOTIF&lt;/code&gt; + fd-injection pattern that runc/crun use.&lt;/p&gt;</description></item><item><title>Day 3: seccomp Basics + Strict Mode</title><link>https://ethanzyf.com/blog/day3-seccomp-strict/</link><pubDate>Wed, 13 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day3-seccomp-strict/</guid><description>&lt;p&gt;How &lt;code&gt;seccomp&lt;/code&gt; intercepts syscalls at the kernel entry, what &lt;code&gt;SECCOMP_MODE_STRICT&lt;/code&gt; actually allows (and the &lt;code&gt;_exit()&lt;/code&gt; trap that fools nearly everyone), plus the design philosophy that filter mode inherits: monotonic, irrevocable security state.&lt;/p&gt;</description></item><item><title>Day 2: strace + Common Syscalls in Practice</title><link>https://ethanzyf.com/blog/day2-strace/</link><pubDate>Tue, 12 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day2-strace/</guid><description>&lt;p&gt;A practical guide to &lt;code&gt;strace&lt;/code&gt;: flag cheat sheet, how to read program startup as three distinct layers (ld.so → libc init → main), annotated syscalls, and the gotchas you actually hit (fd reuse races, EINTR, short writes, locale noise).&lt;/p&gt;</description></item><item><title>Day 1: Linux Syscall Internals</title><link>https://ethanzyf.com/blog/day1-syscalls/</link><pubDate>Mon, 11 May 2026 00:30:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day1-syscalls/</guid><description>&lt;p&gt;A deep dive into how Linux system calls actually work on x86_64: the ABI, the &lt;code&gt;syscall&lt;/code&gt; instruction&amp;rsquo;s hardware side effects, the full user→kernel path, and a categorized cheat sheet of the syscalls worth knowing.&lt;/p&gt;</description></item></channel></rss>