Hi All,

I need to do some calculation of file contents inside LSM hook.

This LSM hook is in a process context, so I hope I can do I/O.
( I put might_sleep() inside hook to confirm I can sleep)

I use kernel_read() to read  file in chunks of 4K size.
On several files, like libc, libm,  I got -EINTR error.

I  tried to insert mdelay() or yield() before repeating  kernel_read but still 
on every read attempt I got -EINTR.
According to timestamp of printk, mdelay or yield() do not have any affect, 
next read happens 2-3 nsecs later.

This error happens on libc, libm, ld-linux on 4.4 and 4.13 kernels.
It did not happen on other libraries.

What might be the solution for this problem ?
ThnX,
Lev 




_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to