Theere were multiple trivial errors in the handling of buffers, such as putting an extra "&" to get the address and not copying the read data back to user.