How the Kernel handles globals

I was going through verifier.c and found a peculiar global variable struct btf *btf_vmlinux . It is handled across the code by putting a mutex on it&rsquo;s writes. Although I knew how the kernel&rsquo;s ELF structure is handled, I still had no proper sense of how close it was to normal ELF structures and that the vmlinux found in /boot is literally just an ELF that is fully valid. Asking LLMs…