<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ethan-ZYF</title><link>https://ethanzyf.com/</link><description>Recent content 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/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>Week2 Day 4: K8s security — AppArmor</title><link>https://ethanzyf.com/blog/week2-day4-apparmor/</link><pubDate>Thu, 21 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day4-apparmor/</guid><description>&lt;p&gt;AppArmor as the path-based complement to seccomp&amp;rsquo;s syscall-based filtering — and a hands-on lesson in why that complement is harder to deploy. This post covers how K8s wraps AppArmor (&lt;code&gt;securityContext.appArmorProfile&lt;/code&gt;, symmetric with seccomp&amp;rsquo;s three types), why an AppArmor profile is heavier than a seccomp one (it must be pre-loaded into the node&amp;rsquo;s kernel via &lt;code&gt;apparmor_parser&lt;/code&gt;, not just dropped as a file), why &lt;code&gt;deny /data/** w&lt;/code&gt; blocks every syscall that writes there (closing the hole where &lt;code&gt;touch&lt;/code&gt; bypassed yesterday&amp;rsquo;s mkdir block), and the day&amp;rsquo;s most valuable lesson: &lt;strong&gt;the experiment couldn&amp;rsquo;t run at all&lt;/strong&gt; because a Mac/Docker-Desktop kind node has no AppArmor LSM in its kernel — a firsthand encounter with the fail-open trap and the portability problem of AppArmor-based mitigations.&lt;/p&gt;</description></item><item><title>Week2 Day 3: K8s security — seccomp</title><link>https://ethanzyf.com/blog/week2-day3-seccomp/</link><pubDate>Wed, 20 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day3-seccomp/</guid><description>&lt;p&gt;Where Week 1 and Week 2 meet: K8s seccomp is the &lt;em&gt;same&lt;/em&gt; kernel seccomp from Week 1, except runc installs the BPF filter for you instead of your application. This post traces the full kubelet → containerd → runc chain (and what runc actually does — namespaces, cgroups, NNP, caps, seccomp, AppArmor, then exec), the three profile types (Unconfined / RuntimeDefault / Localhost), why the profile JSON is just the declarative form of the cBPF you&amp;rsquo;d hand-write, why &lt;code&gt;SCMP_ACT_ERRNO&lt;/code&gt; lets the process survive while &lt;code&gt;mkdir&lt;/code&gt; returns EPERM, and the crucial limitation: seccomp blocks &lt;em&gt;syscalls&lt;/em&gt;, not &lt;em&gt;intent&lt;/em&gt; — block &lt;code&gt;mkdir&lt;/code&gt; and &lt;code&gt;touch&lt;/code&gt; (which uses &lt;code&gt;openat&lt;/code&gt;) still creates files. Plus &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/status&lt;/code&gt; as the ground-truth proof a filter is loaded.&lt;/p&gt;</description></item><item><title>Week2 Day 2: K8s security — NetworkPolicy + Secrets</title><link>https://ethanzyf.com/blog/week2-day2-networkpolicy-secrets/</link><pubDate>Tue, 19 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day2-networkpolicy-secrets/</guid><description>&lt;p&gt;Hands-on with the network and secret-data layers of Kubernetes security: why the default flat network is a lateral-movement risk, the deeply counterintuitive &amp;ldquo;selective activation&amp;rdquo; model of NetworkPolicy (one allow rule silently flips a pod to default-deny), why Ingress and Egress are independent dimensions (and why locking egress breaks DNS), the YAML trap where a single &lt;code&gt;-&lt;/code&gt; flips AND into OR, why NetworkPolicy needs a CNI that actually enforces it (kindnet doesn&amp;rsquo;t — another fail-open), and the truth about Secrets: they&amp;rsquo;re base64, not encrypted — RBAC is what protects them — plus the atomic-symlink-swap trick that powers volume-mounted secret rotation.&lt;/p&gt;</description></item><item><title>Week2 Day 1: K8s security — Pod Security Standards + RBAC</title><link>https://ethanzyf.com/blog/week2-day1-k8s-psa-rbac/</link><pubDate>Mon, 18 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day1-k8s-psa-rbac/</guid><description>&lt;p&gt;A first hands-on pass at Kubernetes-native security: how Pod Security Admission (PSA) actually attaches to namespaces via labels (and silently fails-open when the label is misspelled), why &lt;code&gt;runAsNonRoot: true&lt;/code&gt; is necessary but not sufficient (the image&amp;rsquo;s &lt;code&gt;USER&lt;/code&gt; still has to be non-root), the four-field minimum a pod needs to clear the &lt;code&gt;restricted&lt;/code&gt; profile, and the full RBAC mental model — &lt;code&gt;Role&lt;/code&gt;/&lt;code&gt;ClusterRole&lt;/code&gt; × &lt;code&gt;RoleBinding&lt;/code&gt;/&lt;code&gt;ClusterRoleBinding&lt;/code&gt; as &lt;strong&gt;two independent dimensions&lt;/strong&gt; that produce four combinations (one of which K8s rejects outright), why RBAC evaluation is &lt;strong&gt;union, not override&lt;/strong&gt;, and the asymmetry that makes RBAC fail-closed while PSA fails open.&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><item><title>About</title><link>https://ethanzyf.com/about/</link><pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate><guid>https://ethanzyf.com/about/</guid><description>&lt;p&gt;I&amp;rsquo;m Yifan (Ethan) Zhao, a software engineer interested in distributed systems,
databases, and infrastructure. I&amp;rsquo;m currently pursuing my &lt;strong&gt;Master of Science
in Software Engineering&lt;/strong&gt; at &lt;strong&gt;Carnegie Mellon University&lt;/strong&gt;, based in
Mountain View, CA. This summer (May–August 2026) I&amp;rsquo;ll be joining &lt;strong&gt;Stripe&lt;/strong&gt;
in South San Francisco as a &lt;strong&gt;Software Engineering Intern on the Security
team&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="education"&gt;
 Education
 &lt;a class="heading-link" href="#education"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;I earned my B.S. in Computer Science (Specialist) with a Minor in Mathematics
from the &lt;strong&gt;University of Toronto&lt;/strong&gt; (2020–2025), graduating with a 3.93/4.0 GPA
and four years on the Dean&amp;rsquo;s List. I represented the school at ICPC, taking
12th place at the 2024 regional contest. I&amp;rsquo;m now at &lt;strong&gt;Carnegie Mellon University&lt;/strong&gt;
for my M.S. in Software Engineering (2025–2026).&lt;/p&gt;</description></item><item><title>Resume</title><link>https://ethanzyf.com/resume/</link><pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate><guid>https://ethanzyf.com/resume/</guid><description>&lt;p&gt;&lt;a href="https://ethanzyf.com/Yifan-Zhao-Resume.pdf" &gt;&lt;strong&gt;Download PDF&lt;/strong&gt;&lt;/a&gt; · &lt;a href="mailto:yifanzhao@cmu.edu" &gt;Email&lt;/a&gt; ·
&lt;a href="https://www.linkedin.com/in/yifan-ethan-zhao" class="external-link" target="_blank" rel="noopener"&gt;LinkedIn&lt;/a&gt; ·
&lt;a href="https://github.com/Ethan-ZYF" class="external-link" target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt; · Sunnyvale, CA&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="education"&gt;
 Education
 &lt;a class="heading-link" href="#education"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Carnegie Mellon University&lt;/strong&gt; — &lt;em&gt;M.S. in Software Engineering&lt;/em&gt;
&lt;em&gt;August 2025 – December 2026, Mountain View, CA&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;University of Toronto&lt;/strong&gt; — &lt;em&gt;B.S. in Computer Science (Specialist), Minor in Mathematics&lt;/em&gt;
&lt;em&gt;September 2020 – June 2025, Toronto, ON&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPA: &lt;strong&gt;3.93 / 4.0&lt;/strong&gt;, Dean&amp;rsquo;s List (4 years)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://icpc.global/ICPCID/ZBPLI70V7WSI" class="external-link" target="_blank" rel="noopener"&gt;2024 ICPC Regional Bronze Medalist (12th place)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Core coursework: Data Structures &amp;amp; Algorithms (99%), Operating Systems,
Computer Networks, Database Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="skills"&gt;
 Skills
 &lt;a class="heading-link" href="#skills"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Languages&lt;/strong&gt; — C, C++, Go, Python, Java, JavaScript, TypeScript, PL/SQL,
Shell, HTML/CSS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Frameworks &amp;amp; Libraries&lt;/strong&gt; — React, Django, STL, Eigen, Pandas, PyTorch, MLX,
libcurl, gRPC, REST API, RAG&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Databases &amp;amp; Storage&lt;/strong&gt; — PostgreSQL, MySQL, Hive, Redis, LevelDB, RocksDB,
MongoDB, BadgerDB&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tools &amp;amp; Platforms&lt;/strong&gt; — Docker, Git, CI/CD, GDB, GoogleTest, TPC-C,
Kubernetes, Linux, AWS, Azure&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="professional-experience"&gt;
 Professional Experience
 &lt;a class="heading-link" href="#professional-experience"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;h3 id="stripe--software-engineering-intern-security"&gt;
 Stripe — &lt;em&gt;Software Engineering Intern, Security&lt;/em&gt;
 &lt;a class="heading-link" href="#stripe--software-engineering-intern-security"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;May 2026 – August 2026, South San Francisco, CA&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Projects</title><link>https://ethanzyf.com/projects/</link><pubDate>Thu, 07 May 2026 00:00:00 +0000</pubDate><guid>https://ethanzyf.com/projects/</guid><description>&lt;p&gt;A selection of things I&amp;rsquo;ve built. Full content coming soon.&lt;/p&gt;
&lt;h2 id="project-name"&gt;
 Project Name
 &lt;a class="heading-link" href="#project-name"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Short description of the project, the problem it solves, and the tech stack.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Go, Rust, Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href="https://github.com/Ethan-ZYF" class="external-link" target="_blank" rel="noopener"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Bigtable</title><link>https://ethanzyf.com/blog/bigtable/</link><pubDate>Sun, 02 Nov 2025 22:00:12 -0800</pubDate><guid>https://ethanzyf.com/blog/bigtable/</guid><description>&lt;p&gt;Bigtable: A distributed storage system for structured data
​&lt;/p&gt;</description></item></channel></rss>