bhargav-j47/Usurper ? reverse-engineered prompt
Reverse engineered prompt
Build me this simple Linux kernel module project that demonstrates how a custom proc entry can change the current process credentials to root when a specific phrase is written to it.
I want it to compile with a Makefile, load as a .ko module, create a /proc/usurper file, log when the module is loaded and unloaded, and let me test it from a normal user shell after it has been inserted. Keep it small and easy to follow, since this is just for learning Linux kernel internals like proc_fs, credentials, and process handling.
Please make sure it works cleanly on a recent Linux system with kernel headers installed, and include any small setup or verification steps I need. If something about current kernel APIs has changed, look up the latest docs online and adjust the code accordingly.
Are you gonna build this?
make sure you review the code using coderabbit