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 <tglx@linutronix.de> Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190731054627.5627-2-jhubbard@nvidia.com
parent
5ed1c835
-
mentioned in commit 7846f58f
-
mentioned in commit f1b779f7
-
mentioned in commit 20622d55
-
mentioned in commit d9556011
-
mentioned in commit f7d157f3
-
mentioned in commit 6659665f
-
mentioned in commit f1c2546f
-
mentioned in commit 41664b97
-
mentioned in commit 24a5ed67
-
mentioned in commit 4e478cb2
-
mentioned in commit e183249c
-
mentioned in commit 29d9a0b5
-
mentioned in commit 7342208d
-
mentioned in commit ee271ead
-
mentioned in commit 317a66e2
-
mentioned in commit 7f32c5f5
-
mentioned in commit f8bfa2fd
Please register or sign in to comment