Question: Step 1 : create an entry in proc file system named myproc when the kernel module is loaded; this entry myproc will be deleted when
Step : create an entry in proc file system named myproc when the kernel module is loaded; this entry myproc will be deleted when the kernel mode is deleted. You can use $ ls proc to check whether it is existed. Hint: proccreate and removeprocentry are needed. Step : implement readproc and writeproc function to readwrite the proc file entry in Step You need to add codes for allocating memory in initmodule and releasing the memory in cleanupmodule for the proc file entry. Hint: copytouser is needed for the read and copyfromuser is needed for write. To test your results, load the kernel module and there should be a new entry created under proc Use cat and echo to verify and change the content of the new entry.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
