Closed ttg-public closed 3 years ago
This is actually more needed than we were thinking as the official toolkit for v7 obviously doesn't contain private procfs headers. Well then...
Implemented in https://github.com/RedPill-TTG/redpill-lkm/commit/0839dadba1f5ef40a35972c9e201b1d4eada9b5c
Thank you @jumkey!
So the kern_path
was a small trap - it works while testing but not when loaded on boot. When RP is loaded too early (i.e. before /proc
is mounted) the lookup will fail. We added an alternative method - "mounting" the /proc
in kernel and getting the dentry from VFS directly (completely bypassing any user-space side-effects).
https://github.com/RedPill-TTG/redpill-lkm/commit/9b65d3ec1da8bae68a34df539eaa39696f967c99
See https://github.com/RedPill-TTG/redpill-lkm/commit/8eea128f229ad7df1e17aa140bcc04e67673056c
@jumkey made a great suggestion here - we think it may work wonderfully and doesn't compromise the functionality.