From code comments, what I understood (most likely in an incorrect way) is:
- Use Metal shader code to make process page table accessible to shaders via page protection layer bug exploited using return oriented programming (ROP)
- Use Metal shader code to acquire read/write access to physical memory
- Use Metal shaders to access the kernel page table
- Deals with ASLR to find the kernel base address
- Obtains process user credentials data structure via the process data structure (from the kernel memory)
- Sets uid and gid to 0 (root) to the user credentials data structure, giving root privileges to the user