https://github.com/torvalds/linux
Revision a90118c445cc7f07781de26a9684d4ec58bfcfd1 authored by John Hubbard on 31 July 2019, 05:46:27 UTC, committed by Thomas Gleixner on 16 August 2019, 12:20:00 UTC
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

1 parent 5ed1c83
History
Tip revision: a90118c445cc7f07781de26a9684d4ec58bfcfd1 authored by John Hubbard on 31 July 2019, 05:46:27 UTC
x86/boot: Save fields explicitly, zero out everything else
Tip revision: a90118c
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.7 KB
.mailmap -rw-r--r-- 12.2 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.1 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 510.3 KB
Makefile -rw-r--r-- 59.7 KB
README -rw-r--r-- 727 bytes

README

back to top