This commit handles negative offset passed to sendfile syscall by returning -EINVAL. Negative offsets maybe valid for some special files like /dev/(k)mem and /proc/<pid>/mem which can have large file offsets. But in graphene, these files are not emulated so it will be safe to return -EINVAL for negative offsets.
Description of the changes
This commit handles negative offset passed to sendfile syscall by returning
-EINVAL
. Negative offsets maybe valid for some special files like/dev/(k)mem
and/proc/<pid>/mem
which can have large file offsets. But in graphene, these files are not emulated so it will be safe to return-EINVAL
for negative offsets.Also, this patch enables 2
sendfile
ltp tests.Signed-off-by: Vijay Dhanraj vijay.dhanraj@intel.com
Fixes #2364
How to test this PR?
Please run ltp-sgx tests.
This change is