linux/arch/powerpc
Daniel Axtens ecdc5b12d7 crypto: powerpc - Fix initialisation of crc32c context
commit aa2be9b3d6 upstream.

Turning on crypto self-tests on a POWER8 shows:

    alg: hash: Test 1 failed for crc32c-vpmsum
    00000000: ff ff ff ff

Comparing the code with the Intel CRC32c implementation on which
ours is based shows that we are doing an init with 0, not ~0
as CRC32c requires.

This probably wasn't caught because btrfs does its own weird
open-coded initialisation.

Initialise our internal context to ~0 on init.

This makes the self-tests pass, and btrfs continues to work.

Fixes: 6dd7a82cc5 ("crypto: powerpc - Add POWER8 optimised crc32c")
Cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-03-22 12:43:40 +01:00
..
boot powerpc/boot: Request no dynamic linker for boot wrapper 2017-01-09 08:32:25 +01:00
configs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-10-11 20:07:56 +11:00
crypto crypto: powerpc - Fix initialisation of crc32c context 2017-03-22 12:43:40 +01:00
include powerpc/iommu: Stop using @current in mm_iommu_xxx 2017-03-22 12:43:37 +01:00
kernel powerpc/iommu: Pass mm_struct to init/cleanup helpers 2017-03-22 12:43:37 +01:00
kvm KVM: PPC: Book3S HV: Don't lose hardware R/C bit updates in H_PROTECT 2017-01-09 08:32:22 +01:00
lib powerpc: Emulation support for load/store instructions on LE 2017-03-18 19:14:30 +08:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y 2017-03-22 12:43:39 +01:00
net powerpc/bpf: Add support for bpf constant blinding 2016-10-04 20:33:20 +11:00
oprofile powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
perf powerpc/perf: Fix PM_BRU_CMPL event code for power9 2017-01-26 08:24:39 +01:00
platforms powerpc/powernv: Fix CPU hotplug to handle waking on HVI 2017-02-14 15:25:40 -08:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/xics: Work around limitations of OPAL XICS priority handling 2017-03-18 19:14:30 +08:00
xmon powerpc/xmon: Don't use ld on 32-bit 2016-09-13 17:37:02 +10:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2016-10-07 21:38:00 -07:00
Kconfig.debug powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init 2016-08-01 11:15:06 +10:00
Makefile arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig 2016-09-25 02:39:01 -05:00
relocs_check.sh powerpc/64: whitelist unresolved modversions CRCs 2016-09-22 14:46:31 +02:00