Hi Kevin,
Thanks for the comments on this patch and others in the series. I will address them in v2. I just had a few things to clarify on the following comments.
$(OUTPUT)/vdso_test_gettimeofday: parse_vdso.c vdso_test_gettimeofday.c $(OUTPUT)/vdso_test_getcpu: parse_vdso.c vdso_test_getcpu.c $(OUTPUT)/vdso_test_abi: parse_vdso.c vdso_test_abi.c diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h index cdfed403ba13..90082a60a2b1 100644 --- a/tools/testing/selftests/vDSO/vdso_config.h +++ b/tools/testing/selftests/vDSO/vdso_config.h
I'm confused, vdso_test_gettimeofday.c doesn't seem to be including this file?
That's strange, especially given that the disassembly of the built test shows a call to getauxptr(). Nevertheless, I'll explicitly include vdso_config.h in the tests that use this get_sysinfo_ehdr()
+#define get_sysinfo_ehdr() (getauxptr(AT_SYSINFO_EHDR))
Using inline functions is generally preferred over macros, if possible, which seems to be the case here. Something like:
static inline uintptr_t get_sysinfo_ehdr(void)
Makes sense, however wouldn't we use just inline rather than static inline as this function will be used across different .c files?
Thanks once again, Aditya