* How to dealwith mmap for a filesystem filter driver?
@ 2019-02-16 8:16 kipade
0 siblings, 0 replies; only message in thread
From: kipade @ 2019-02-16 8:16 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 571 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 1075 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-16 8:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16 8:16 How to dealwith mmap for a filesystem filter driver? kipade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).