x86/boot: Save fields explicitly, zero out everything else
Recent gcc compilers (gcc 9.1) generate warnings about an out of bounds
memset, if the memset goes accross several fields of a struct. This
generated a couple of warnings on x86_64 builds in sanitize_boot_params().
Fix this by explicitly saving the fields in struct boot_params
that are intended to be preserved, and zeroing all the rest.
[ tglx: Tagged for stable as it breaks the warning free build there as well ]
Suggested-by: Thomas Gleixner <firstname.lastname@example.org>
Suggested-by: H. Peter Anvin <email@example.com>
Signed-off-by: John Hubbard <firstname.lastname@example.org>
Signed-off-by: Thomas Gleixner <email@example.com>
1 file changed