linux_kernel_hacking
linux_kernel_hacking copied to clipboard
3.5 hiding processes - logic bug while shifting
/* If hide_pid is contained in the first struct in the list, then we have to shift everything else up by it's size */
if ( current_dir == dirent_ker )
{
ret -= current_dir->d_reclen;
memmove(current_dir, (void *)current_dir + current_dir->d_reclen, ret);
continue;
}
If we try to hide first process - all linked list shifts, and kernel threads appear on bottom, while user - on top. Don't think that this is critical bug, but, just for notice :)