diff options
author | Kees Cook <keescook@chromium.org> | 2022-09-20 05:45:14 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2022-09-26 21:01:32 +0300 |
commit | 3e1730842f142add55dc658929221521a9ea62b6 (patch) | |
tree | 4fc481e2b880ab5dc14a8480b1578b2d58501a83 /include/linux/fortify-string.h | |
parent | 1b64daf413acd86c2c13f5443f6b4ef3690c8061 (diff) | |
download | linux-3e1730842f142add55dc658929221521a9ea62b6.tar.xz |
x86/entry: Work around Clang __bdos() bug
Clang produces a false positive when building with CONFIG_FORTIFY_SOURCE=y
and CONFIG_UBSAN_BOUNDS=y when operating on an array with a dynamic
offset. Work around this by using a direct assignment of an empty
instance. Avoids this warning:
../include/linux/fortify-string.h:309:4: warning: call to __write_overflow_field declared with 'warn
ing' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wat
tribute-warning]
__write_overflow_field(p_size_field, size);
^
which was isolated to the memset() call in xen_load_idt().
Note that this looks very much like another bug that was worked around:
https://github.com/ClangBuiltLinux/linux/issues/1592
Cc: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: xen-devel@lists.xenproject.org
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/lkml/41527d69-e8ab-3f86-ff37-6b298c01d5bc@oracle.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'include/linux/fortify-string.h')
0 files changed, 0 insertions, 0 deletions