Fix cling valid pointer check
Fix cling valid pointer check

Assuming that page_size is a power of 2, the calculation of the
base address of the page can be simplified and avoid a division.

According to POSIX, either MS_SYNC or MS_ASYNC must be specified
when calling msync(). Failure to include one of these flags will
cause msync() to fail on some systems.

When msync() returns -1, the pointer is only considered invalid
when errno is set to ENOMEM. In principle, the other possible
values for errno won't happen, but if they do, that should be
considered an error, hence the assert condition needed an update.
EBUSY shouldn't happen since we do not add MS_INVALIDATE to flags,
and EINVAL shouldn't happen because we always pass a multiple of
the page size to msync(). EFAULT is only used in Linux 2.4.18 and
earlier instead of ENOMEM.

root-mirror/cling,root-mirror/cling,root-mirror/cling,root-mirror/cling,karies/cling,karies/cling,root-mirror/cling,karies/cling,karies/cling,karies/cling,karies/cling,root-mirror/cling