Should I pass user-space buffer pointer to read() of struct file implemented by `filp_open()`?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In module code:
unsigned char buf[20];
struct file *device;
device = filp_open(...);
device->f_op->read(device,buf,20,&device->f_pos);
In signature(interface) of read() of struct file, buf 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 ?
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux