Article 58VK6 Doubt with Kernel module

Doubt with Kernel module

by
webquinty
from LinuxQuestions.org on (#58VK6)
Hello everybody,

This doubt is relative to how to create a Kernel module.
Years ago, I started with Kernel modules in my job using kernel 2.6.24.7.
It was hard to develop it, but finally I did it.

Later I use de same driver ( source code ) with kernel version 3.19 and it was necessary to modify some variables a functions, but nothing else.

Now, I am trying to port the same driver and its source code with kernel 5.4.61 without sucess. After read several webpages and PDFs, I just realized that tere are some changes in the new kernel.
One of them is the following:
-> The user-space buffer in user virtual address space.
-> The kernel-space buffer in kernel virtual address space.

So, in the new kernel ( I don't know from which version this feature has been implemented ) it is not allowed to use data created in user space inside the kernel and it is mandatory to use the copy_(from|to)_user functions to copy data from user space to kernel space and vice versa.

Is that so and there is no way to change it?
What is the meaning of this change? For security?

I hope I have explained myself clearly

Thank you in advancelatest?d=yIl2AUoC8zA latest?i=2jALfD-XRb0:QCm5Qzh-xDU:F7zBnMy latest?i=2jALfD-XRb0:QCm5Qzh-xDU:V_sGLiP latest?d=qj6IDK7rITs latest?i=2jALfD-XRb0:QCm5Qzh-xDU:gIN9vFw2jALfD-XRb0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments