<div dir="ltr">In module code:<div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><i>unsigned char buf[20];</i></blockquote><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><i>struct file *device;</i></div>
</blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><i>device = filp_open(...);</i></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><i>device->f_op->read(device,buf,20,&device->f_pos);</i></div>
</blockquote>In signature(interface) of <i>read()</i> of <i>struct file</i>, <i>buf</i> should came from user-space. I fed my buffer, and I get correct data from that, Is that correct? Shouldn't I provide a user-space buffer to that ?</div>
</div></div>