From be9a5c355c819ac0f2aca1f8c30dc75164e10322 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Wed, 2 May 2018 18:36:20 -0400 Subject: 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 Signed-off-by: Tom Caputi Closes #7474 --- include/sys/zio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sys/zio.h') diff --git a/include/sys/zio.h b/include/sys/zio.h index dc6841d83..25c12fbcc 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -640,6 +640,8 @@ extern int zio_inject_list_next(int *id, char *name, size_t buflen, struct zinject_record *record); extern int zio_clear_fault(int id); extern void zio_handle_panic_injection(spa_t *spa, char *tag, uint64_t type); +extern int zio_handle_decrypt_injection(spa_t *spa, const zbookmark_phys_t *zb, + uint64_t type, int error); extern int zio_handle_fault_injection(zio_t *zio, int error); extern int zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error); extern int zio_handle_device_injections(vdev_t *vd, zio_t *zio, int err1, -- cgit v1.2.3