How to read/write the file in the address space of the kernel?

Need to write a driver supports reading the file in ASCII format and write messages to it via a custom process: ioctl_set_msg(file_desc, msg). Supports removal of posts: ioctl_msg_delete.

Don't tell me how to open the file in the address space of the kernel and read/record messages in it, and send the ioctl? Here is an example www.crossplatform.ru/?q=node/342 but it all happens directly with the device instead of through the file.
June 10th 19 at 15:16
1 answer
June 10th 19 at 15:18
Could you tell me how to open a file in the address space of the kernel and read/record messages in it

sys_open, sys_read, sys_write. Search on the kernel sources you can find examples of usage.
Thank you - Kristopher38 commented on June 10th 19 at 15:21

Find more questions by tags Linux