linux_dsm_epyc7002/arch/powerpc
Christophe Leroy c959988118 powerpc/64: Fix strncpy() related build failures with GCC 8.1
GCC 8.1 warns about possible string truncation:

  arch/powerpc/kernel/nvram_64.c:1042:2: error: 'strncpy' specified
  bound 12 equals destination size [-Werror=stringop-truncation]
    strncpy(new_part->header.name, name, 12);

  arch/powerpc/platforms/ps3/repository.c:106:2: error: 'strncpy'
  output truncated before terminating nul copying 8 bytes from a
  string of the same length [-Werror=stringop-truncation]
    strncpy((char *)&n, text, 8);

Fix it by using memcpy(). To make that safe we need to ensure the
destination is pre-zeroed. Use kzalloc() in the nvram code and
initialise the u64 to zero in the ps3 code.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Use kzalloc() in the nvram code, flesh out change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-06-03 20:40:24 +10:00
..
boot Merge branch 'topic/kbuild' into next 2018-06-03 20:24:15 +10:00
configs powerpc/config: powernv_defconfig updates 2018-05-10 23:25:07 +10:00
crypto
include Merge branch 'topic/pkey' into next 2018-06-03 20:35:27 +10:00
kernel powerpc/64: Fix strncpy() related build failures with GCC 8.1 2018-06-03 20:40:24 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2018-05-15 22:28:19 +10:00
lib powerpc/altivec: Add missing prototypes for altivec 2018-05-25 12:04:38 +10:00
math-emu
mm Merge branch 'topic/ppc-kvm' into next 2018-06-03 20:23:54 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-05 11:29:24 -08:00
oprofile powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
perf powerpc/perf: Update raw-event code encoding comment for power8 2018-05-25 17:49:01 +10:00
platforms powerpc/64: Fix strncpy() related build failures with GCC 8.1 2018-06-03 20:40:24 +10:00
purgatory
sysdev powerpc/xive: prepare all hcalls to support long busy delays 2018-05-10 23:25:10 +10:00
tools powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS 2018-06-01 23:08:09 +10:00
xmon powerpc/xmon: Update paca fields dumped in xmon 2018-05-25 12:04:37 +10:00
Kconfig powerpc/livepatch: Implement reliable stack tracing for the consistency model 2018-05-10 23:25:12 +10:00
Kconfig.debug
Makefile powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS 2018-06-01 23:08:09 +10:00
Makefile.postlink