From: Dmitry V. L. <ld...@al...> - 2011-01-19 22:45:13
|
On Thu, Jan 20, 2011 at 03:16:49AM +0500, Марк Коренберг wrote: [...] > There are more syscalls that never fail. For example, getpid, getppid, > gettid, getpagesize > It should be checked, but maybe all syscalls returning pid_t ? pid_t values returned by getpid et al must be positive integers, otherwise kill(-pid,sig) would not work. As result, there is no room for potential collision as in getuid case. > There are some VERY strange places in kernel. see getpriority / setpriority > syscall about return value and errno setpriority return code semantics is the same as in most of syscalls. According to the comment in kernel/sys.c:getpriority, that syscall also should not return negative values in case of an error. So, I see no problem here. > Also, it is desirable to add flag MAY_FAIL to destinguish between syscalls > that may fail and syscalls for which we do not have information. From strace point of view, looks like we need special treatment only for those syscalls that may return non-error negative values. -- ldv |