I am trying to write a simple application that can read msr registers, and am running this application from userspace.
I have loaded the msr module and given read p
You can see vfs_read:
ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
{
ret = rw_verify_area(READ, file, pos, count);
if (ret >= 0) {
...
if (file->f_op->read) // your driver read .
ret = file->f_op->read(file, buf, count, pos);
else
ret = do_sync_read(file, buf, count, pos);
....
}
// here, if the ret is 13. your error will be occur.
return ret;
}