when system boot up, I insmod a module, during the module initializing, I want to get a password from keyboard. There are two ways to solve the problem: call a user mode program to get password from keyboard, or read key directly from keyboard in kernel mode. The first method has return value EPERM, for no permission to execute the user mode program. I also tried the second method, read scancode from keyboard in raw mode, but has confronted some IRQ conflict. Maybe the perfect method is reading char buffer from tty or console, but I donot know how to read the correct buffer or where is such a buffer.
Any kind responce is welcome!