[Bug sanitizer/78887] [7 Regression] Failure to build aarch64 allmodconfig Linux kernel 4.9
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 6 14:34:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78887
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dodji at gcc dot gnu.org,
| |dvyukov at gcc dot gnu.org,
| |kcc at gcc dot gnu.org
Component|tree-optimization |sanitizer
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, ok, I'd say this is a kernel bug.
scripts/mod/file2alias.c (handle_moddevtable) has:
/* All our symbols are of form
<prefix>__mod_<name>__<identifier>_device_table. */
name = strstr(symname, "__mod_");
so the __odr_asan.__mod_cpu__cpu_feature_match_SHA1_device_table symbol is also
recognized as a device table (which is wrong).
I bet
_GLOBAL__sub_D_65535_0___odr_asan.__mod_cpu__cpu_feature_match_SHA1_device_table
or
_GLOBAL__sub_D_65535_0___mod_cpu__cpu_feature_match_SHA1_device_table
could trigger it too. Dunno what is the rationale behind accepting <prefix>
there, perhaps accepting only empty prefix or _ prefix would be better.
On the gcc side, we could work around this by adding:
if (flag_sanitize & SANITIZE_KERNEL_ADDRESS)
return false;
to asan_needs_odr_indicator_p, that assumes the kernel never wants ODR
verification (as it is written in C, that might be very likely).
More information about the Gcc-bugs
mailing list