1

I want to know how printk passes the data from the kernel space to the user space. I have heard of relayfs, which provides that the efficient and unified file-system to transfer huge data from the kernel space to user space, whether printk also uses relayfs or it has its own implementation??

pradeepchhetri
  • 2,899
  • 6
  • 28
  • 50

1 Answers1

4

printk does not pass data to user space. It only writes into the kernel ring buffer. Programs like dmesg bring it outside.

See the documentation for klogctl(2) (man 2 klogctl) for reading the kernel ring buffer.

wallyk
  • 56,922
  • 16
  • 83
  • 148