Some people have complained because libsanitizer for AArch64 no longer builds when using "old" kernel headers.
Indeed, the kernel was modified here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34c65c4
In practice, I've noticed that the change appeared in linux-3.15.3,
but users have reported using 3.10 and 3.14 stable ones on aarch64
machines.
I want to fix this, and I have a patch ready, but it does not seem to
follow the libsanitizer conventions:
in sanitizer_platform_limits_posix.h, we currently have:
#if defined(powerpc) || defined(aarch64) || defined(mips)
typedef unsigned int __sanitizer___kernel_old_uid_t; typedef unsigned int __sanitizer___kernel_old_gid_t;
#else
typedef unsigned short __sanitizer___kernel_old_uid_t; typedef unsigned short __sanitizer___kernel_old_gid_t;
#endif
Why not simply have an unconditional
#if SANITIZER_LINUX
#include <linux/posix_types.h>
#endif
typedef kernel_old_uid_t sanitizer___kernel_old_uid_t;
typedef kernel_old_gid_t sanitizer___kernel_old_gid_t;
(I don't know what the corresponding FREEBSD code would be though).
Sorry if the question is obvious, but why are many types/sizes
hardcodes in sanitizer_platform_limits_posix.h rather than inherited?
Thanks,
Christophe.