touch command throws EFAULT
Narasimha1997 opened this issue · 1 comments
So, I was just trying out the kernel with busy box by following the guidelines provided in README file.
When I execute the command touch hello.txt from any directory I get the following error :
touch : hello.txt : Bad Address
In other words, it throws EFAULT error.
Maybe there is a bug in one of the system calls invoked by touch command.
Update:
After analyzing the source code, I could see that there is an issue with the parameters passed to sys_utimes system-call.
The second parameter u_times array which is of type timeval is NULL because of which copy_from_user is returning -1, so EFAULT is thrown.
Hi Narasimha,
thanks for reporting this issue.
I didn't notice in the documentation that utimes() must support a NULL times param.
The amount of corner cases like that is huge.
Anyway, I just merged a patch fixing it and now touch works as expected.
Vlad