C code to get physical address from user space through mmap, without any kernel crash(if you are patient enough and read the rest of the readme :).
See the credits.
I just wrapped out things together to demonstrate. Guys in this stackoverflow question actually explained everything well.