linux/arch/x86
Tony Luck 7ccddc4613 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: d8ecca4043 ("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
2020-06-11 15:19:17 +02:00
..
boot mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
configs
crypto There are a lot of objtool changes in this cycle, all across the map: 2020-06-01 13:13:00 -07:00
entry x86/entry: Unbreak __irqentry_text_start/end magic 2020-06-11 15:15:29 +02:00
events mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
hyperv x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC 2020-06-11 15:15:15 +02:00
ia32 Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2020-06-04 14:07:08 -07:00
include x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned 2020-06-11 15:19:17 +02:00
kernel x86/mce/dev-mcelog: Fix -Wstringop-truncation warning about strncpy() 2020-06-11 15:19:17 +02:00
kvm x86/entry: Optimize local_db_save() for virt 2020-06-11 15:15:22 +02:00
lib X86 timer specific updates: 2020-06-03 10:18:09 -07:00
math-emu
mm x86/entry: Unbreak __irqentry_text_start/end magic 2020-06-11 15:15:29 +02:00
net
oprofile
pci Merge branch 'pci/virtualization' 2020-06-04 12:59:13 -05:00
platform x86/entry: Convert various system vectors 2020-06-11 15:15:14 +02:00
power mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
purgatory
ras
realmode mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
tools
um mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
video
xen xen: Move xen_setup_callback_vector() definition to include/xen/hvm.h 2020-06-11 15:15:19 +02:00
.gitignore
Kbuild
Kconfig x86/entry: Use idtentry for interrupts 2020-06-11 15:15:12 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug x86: mm: use ARCH_HAS_DEBUG_WX instead of arch defined 2020-06-03 20:09:50 -07:00
Makefile
Makefile.um
Makefile_32.cpu