Is there function like sprintf() in Linux Kernel (like printf()->printk())?
sprintf()
printf()
printk()
sprintf() is unsafe because of buffer overflow. If you need to pass data from user space to kernel space, use instead copy_from_user(); it acts like copy_to_user() but in reverse direction.
copy_from_user()
copy_to_user()