title: Kernel module get data from user space
body: <p>What is the proper way of sending some data to a loaded and running kernel module, without using netlink and without using features that may not be in place (e.g. debugfs)?</p>
  
  <p>I'd like to see a clean and safe way of doing this which should work on most kernels (or preferably all modern ones), or at best an approximation of that.</p>
  
  <p>The user who wants to send data to the module is the root user, the amount of data is probably under 64 kiB and consists of a series of strings.</p>
  
  <p>I've already looked into trying to read files from the module, which is not only highly frowned upon for various reasons but also hard to do.
  I've looked at netlink, which socket() tells me on my kernel is not supported.
  I've looked at debugfs, which is not supported either on my kernel.</p>
  
  <p>Obviously I could use a different kernel but as I mentioned I'd like a proper way of doing this. If someone could show me a simple example of a module that will just do a printk() of a string sent from user space that would be great.</p>