RE: how to pass the content of a file to kernel driver

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

 



Hello, 

> I try to pass the content of file,1G, to kernel driver for operation
> and then return the result back to application.
> My questions are:
> 1. The only way I can use is copy_from_user? If so, does it have the
> size limitation?

Yes, you will have to use copy_from_user() because the address will be a
user space address. It does not have any size limitation, but yes, since
the memory it is trying to copy may be swapped out (and specially in
your case of 1G of data), it may be considerable amount of time before
this function will return. More over, since you said that you'll be
reading this data from a file, more delay in reading that from disk ...!

> 2. I don't want my application pending on the I/O and is there any
> smart way to let the application know when driver finishes its job?
> appreciate your help,

Signals? Haven't ever used them though...

Thanks,

Rajat

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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