I know that as a general note files should not be read from kernelspace.
However I am interested in looking for keywords in certain files using a BPF program.
Ideally I would like the BPF program to be able to be attached to a Kprobe and when the event triggers I would like it to say read a file and count the instances that a keyword appears within the file.
Can anyone tell me if it is possible to read in a file like this, and perhaps offer some guidance as to how I might go about this.
Thanks, Sam