Fix use of SECURE_ALL_BITS/SECURE_ALL_LOCKS.

Kernels 4.3+ define a new securebit (SECURE_NO_CAP_AMBIENT_RAISE),
so using the SECURE_ALL_BITS and SECURE_ALL_LOCKS masks from newer
kernel headers will return EPERM on older kernels. Detect this, and
retry with the right mask for older (2.6.26-4.2) kernels.

Also add a compile-time assert to make sure we identify these changes
sooner going forward.

Bug: 27632733

Change-Id: I6cf9c56fec222347575bd0d1147287aac6572e67
2 files changed