Fwd: Need Help regarding Reading and Writting to a file from kernel function file

Sahibzada Irfanullah irfan.gomalian at gmail.com
Tue Sep 24 03:10:07 EDT 2019


Dear Sir,
Hope you are doing well. Actually, I have one problem metioned in the
subject line. The problem is:  I am trying to write/read page faulted
physical addresses to a file in a kernel (v5.3-1) function, i.e.,
handle_ept_violation() which is present in vmx.c. I have followed this
<https://stackoverflow.com/questions/1184274/read-write-files-within-a-linux-kernel-module>,
it's working as a standalone kernel module when I load/unload this kernel
module, but when I try to use this code in the handle_ept_violation()
function, I can't able to open the file and get the error codes, i.e., -2,
-3, or -13. It's compiled successfully but generate the error at runtime. I
searched for error codes online but I didn't find any help.
Can anyone please provide me with any good guidlines, or links where I can
start and solve this problem in a fast way.
Thank you very much

-- 
Regards,

*Mr. Irfan Ullah*
PhD Candidate
Data and Knowledge Engineering(DKE) Lab
Department of Computer Science and Engineering
Kyung Hee University, South Korea.
 +82-010-591-51651 <+82%2010-3877-8867>
  sahibzada.iu at gmail.com
 sahibzada_irfanullah



-- 
Regards,

*Mr. Irfanullah*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20190924/52548fb8/attachment.html>


More information about the Kernelnewbies mailing list