]> git.proxmox.com Git - mirror_zfs.git/commit - man/man5/zpool-features.5
OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
authorTony Hutter <hutter2@llnl.gov>
Wed, 15 Jun 2016 22:47:05 +0000 (15:47 -0700)
committerTony Hutter <hutter2@llnl.gov>
Mon, 3 Oct 2016 21:51:15 +0000 (14:51 -0700)
commit3c67d83a8afb391f20bc53d36a0cebea6897b3e2
tree2b862986c83414c7359c00219b43ad47dd73f81e
parent62a65a654e15a1388bfb571727e69b46e7cc07ab
OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Ported by: Tony Hutter <hutter2@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/4185
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/45818ee

Porting Notes:
This code is ported on top of the Illumos Crypto Framework code:

    https://github.com/zfsonlinux/zfs/pull/4329/commits/b5e030c8dbb9cd393d313571dee4756fbba8c22d

The list of porting changes includes:

- Copied module/icp/include/sha2/sha2.h directly from illumos

- Removed from module/icp/algs/sha2/sha2.c:
#pragma inline(SHA256Init, SHA384Init, SHA512Init)

- Added 'ctx' to lib/libzfs/libzfs_sendrecv.c:zio_checksum_SHA256() since
  it now takes in an extra parameter.

- Added CTASSERT() to assert.h from for module/zfs/edonr_zfs.c

- Added skein & edonr to libicp/Makefile.am

- Added sha512.S.  It was generated from sha512-x86_64.pl in Illumos.

- Updated ztest.c with new fletcher_4_*() args; used NULL for new CTX argument.

- In icp/algs/edonr/edonr_byteorder.h, Removed the #if defined(__linux) section
  to not #include the non-existant endian.h.

- In skein_test.c, renane NULL to 0 in "no test vector" array entries to get
  around a compiler warning.

- Fixup test files:
- Rename <sys/varargs.h> -> <varargs.h>, <strings.h> -> <string.h>,
- Remove <note.h> and define NOTE() as NOP.
- Define u_longlong_t
- Rename "#!/usr/bin/ksh" -> "#!/bin/ksh -p"
- Rename NULL to 0 in "no test vector" array entries to get around a
  compiler warning.
- Remove "for isa in $($ISAINFO); do" stuff
- Add/update Makefiles
- Add some userspace headers like stdio.h/stdlib.h in places of
  sys/types.h.

- EXPORT_SYMBOL *_Init/*_Update/*_Final... routines in ICP modules.

- Update scripts/zfs2zol-patch.sed

- include <sys/sha2.h> in sha2_impl.h

- Add sha2.h to include/sys/Makefile.am

- Add skein and edonr dirs to icp Makefile

- Add new checksums to zpool_get.cfg

- Move checksum switch block from zfs_secpolicy_setprop() to
  zfs_check_settable()

- Fix -Wuninitialized error in edonr_byteorder.h on PPC

- Fix stack frame size errors on ARM32
   - Don't unroll loops in Skein on 32-bit to save stack space
   - Add memory barriers in sha2.c on 32-bit to save stack space

- Add filetest_001_pos.ksh checksum sanity test

- Add option to write psudorandom data in file_write utility
79 files changed:
Makefile.am
cmd/ztest/ztest.c
configure.ac
include/sys/Makefile.am
include/sys/crypto/icp.h
include/sys/dmu.h
include/sys/edonr.h [new file with mode: 0644]
include/sys/sha2.h [new file with mode: 0644]
include/sys/skein.h [new file with mode: 0644]
include/sys/spa.h
include/sys/spa_impl.h
include/sys/zio.h
include/sys/zio_checksum.h
include/zfeature_common.h
include/zfs_fletcher.h
lib/libicp/Makefile.am
lib/libspl/include/assert.h
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_sendrecv.c
lib/libzpool/Makefile.am
man/man5/zpool-features.5
man/man8/zfs.8
module/icp/Makefile.in
module/icp/algs/edonr/edonr.c [new file with mode: 0644]
module/icp/algs/edonr/edonr_byteorder.h [new file with mode: 0644]
module/icp/algs/sha2/sha2.c
module/icp/algs/skein/THIRDPARTYLICENSE [new file with mode: 0644]
module/icp/algs/skein/THIRDPARTYLICENSE.descrip [new file with mode: 0644]
module/icp/algs/skein/skein.c [new file with mode: 0644]
module/icp/algs/skein/skein_block.c [new file with mode: 0644]
module/icp/algs/skein/skein_impl.h [new file with mode: 0644]
module/icp/algs/skein/skein_iv.c [new file with mode: 0644]
module/icp/algs/skein/skein_port.h [new file with mode: 0644]
module/icp/asm-x86_64/sha2/sha256_impl.S
module/icp/asm-x86_64/sha2/sha512_impl.S [new file with mode: 0644]
module/icp/illumos-crypto.c
module/icp/include/sha2/sha2.h [deleted file]
module/icp/include/sha2/sha2_impl.h
module/icp/io/edonr_mod.c [new file with mode: 0644]
module/icp/io/sha2_mod.c
module/icp/io/skein_mod.c [new file with mode: 0644]
module/zcommon/zfs_fletcher.c
module/zcommon/zfs_prop.c
module/zfs/Makefile.in
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/ddt.c
module/zfs/dmu.c
module/zfs/dmu_send.c
module/zfs/dsl_dataset.c
module/zfs/edonr_zfs.c [new file with mode: 0644]
module/zfs/sha256.c
module/zfs/skein_zfs.c [new file with mode: 0644]
module/zfs/spa.c
module/zfs/spa_misc.c
module/zfs/vdev_raidz.c
module/zfs/zfeature_common.c
module/zfs/zfs_ioctl.c
module/zfs/zio.c
module/zfs/zio_checksum.c
scripts/zfs2zol-patch.sed
tests/runfiles/linux.run
tests/zfs-tests/cmd/file_write/file_write.c
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/include/properties.shlib
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/checksum/.gitignore [new file with mode: 0644]
tests/zfs-tests/tests/functional/checksum/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/checksum/cleanup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/edonr_test.c [new file with mode: 0644]
tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/run_edonr_test.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/run_sha2_test.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/run_skein_test.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/setup.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/checksum/sha2_test.c [new file with mode: 0644]
tests/zfs-tests/tests/functional/checksum/skein_test.c [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zfs_set/checksum_001_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg