How to dealwith mmap for a filesystem filter driver?

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

 



Hello all,
I created a filter driver for the vfs, for some special file read, I want to replace its
data got from the disk and return to the new data to user space, eg. decryption.
my hooked read entry like this:
int my_hooked_read(struct file* filp, char* buffer, size_t count, loff_t* pos)
{
    int ret = orig_read(filp, buffer, count, pos);
    if(ret > 0)
    {
        //do something
    }
    return ret;
}
the code works file for normal read, but take no sense for read via mmap operations.
so, I want to know what should I do to resolve such issue?
Thanks.


 



 

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://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