RAS updates from Borislav Petkov:

  * Unmap a whole guest page if an MCE is encountered in it to avoid
    follow-on MCEs leading to the guest crashing, by Tony Luck.

    This change collided with the entry changes and the merge resolution
    would have been rather unpleasant. To avoid that the entry branch was
    merged in before applying this. The resulting code did not change
    over the rebase.

  * AMD MCE error thresholding machinery cleanup and hotplug sanitization, by
    Thomas Gleixner.

  * Change the MCE notifiers to denote whether they have handled the error
    and not break the chain early by returning NOTIFY_STOP, thus giving the
    opportunity for the later handlers in the chain to see it. By Tony Luck.

  * Add AMD family 0x17, models 0x60-6f support, by Alexander Monakov.

  * Last but not least, the usual round of fixes and improvements.
x86/mce/dev-mcelog: Fix -Wstringop-truncation warning about strncpy()

The kbuild test robot reported this warning:

  arch/x86/kernel/cpu/mce/dev-mcelog.c: In function 'dev_mcelog_init_device':
  arch/x86/kernel/cpu/mce/dev-mcelog.c:346:2: warning: 'strncpy' output \
    truncated before terminating nul copying 12 bytes from a string of the \
    same length [-Wstringop-truncation]

This is accurate, but I don't care that the trailing NUL character isn't
copied. The string being copied is just a magic number signature so that
crash dump tools can be sure they are decoding the right blob of memory.

Use memcpy() instead of strncpy().

Fixes: d8ecca4043f2 ("x86/mce/dev-mcelog: Dynamically allocate space for machine check records")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200527182808.27737-1-tony.luck@intel.com



1 file changed