]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for decryption faults in zinject
authorTom Caputi <tcaputi@datto.com>
Wed, 2 May 2018 22:36:20 +0000 (18:36 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 May 2018 22:36:20 +0000 (15:36 -0700)
commitbe9a5c355c819ac0f2aca1f8c30dc75164e10322
treede57c7d931764c3abfc94422c14311b12f83c5e3
parent9464b9591ea5cd61a4d6ef8e29c4597b48d16a77
Add support for decryption faults in zinject

This patch adds the ability for zinject to trigger decryption
and authentication faults in the ZIO and ARC layers. This
functionality is exposed via the new "decrypt" error type, which
may be provided for "data" object types.

This patch also refactors some of the core encryption / decryption
functions so that they have consistent prototypes, handle errors
consistently, and do not have unused arguments.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7474
15 files changed:
cmd/zinject/zinject.c
include/sys/arc_impl.h
include/sys/dsl_crypt.h
include/sys/zfs_ioctl.h
include/sys/zio.h
include/sys/zio_crypt.h
man/man8/zinject.8
module/zfs/arc.c
module/zfs/dsl_crypt.c
module/zfs/zio.c
module/zfs/zio_crypt.c
module/zfs/zio_inject.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/fault/Makefile.am
tests/zfs-tests/tests/functional/fault/decrypt_fault.ksh [new file with mode: 0755]