lib: detect ARM64 32-bit compat mode as 64-bit kernel

ARM64 (aarch64) identifies itself in 32-bit compatibility mode as armv8l
or armv8b depending on endianness. Detect these modes as a 64-bit
kernel.

This fixes the following issues on ARM64:
 - mmapstress03 segfaults in 32-bit compat mode due to a larger than expected
   address space
 - cve-2016-4997 which was a vulnerability in a 32-bit compat syscall, but the
   test does not correctly identify 32-bit compat and wouldn't run
 - vma03 which only runs on 32-bit arches, it would incorrectly be run
   on arm64 32-bit mode and fail

Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Bug: 30689411
Test: run vts-kernel -m VtsKernelLtp
Change-Id: I3fb5ab67ee72c9ef01c82c1f112ad3b0b5d5494a
1 file changed