Skip to content

Instantly share code, notes, and snippets.

View cbpudding's full-sized avatar

Alexander Hill cbpudding

  • Maine
View GitHub Profile
@PancakeTAS
PancakeTAS / README.md
Last active November 11, 2025 18:05
A GNU-less Sysroot: Compiling LLVM to run with musl, libc++ and compiler-rt

This gist shows how to get a fully working LLVM build that runs in a separate sysroot, completely free of any GNU tools. I achieved this by substituting glibc with musl, libstdc++ with libc++ and gcc-libs with compiler-rt. I can't say anything about the stability of this system (as far as I know libc++ is far from finished), but it was fun to get here.

Let's get started. For this, I'll assume you have a fully working LLVM compiler (clang) as well as LLVM linker (lld) on your system. I myself am on Artix Linux currently, and I'm running clang-19.1.7-2 and llvm-19.1.7-2.

First, let's grab all the resources we need:

@marcan
marcan / m1cat.c
Last active October 26, 2023 15:42
m1cat: a PoC for the M1RACLES covert channel vulnerability in the Apple M1
/*
* m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program implements a covert channel that can be used to transmit data
* between two processes when run on the Apple Silicon "M1" CPUs.
*
* The channel is slightly lossy due to (presumably) the scheduler sometimes
* scheduling us on the wrong CPU cluster, so this PoC sends every byte twice
* together with some metadata/framing bits, which is usually good enough.
* A better approach would be to use proper FEC or something like that.