From a2c2ed1bd4c3dc6d52b6058b9c74245cad2ae331 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Sat, 31 Mar 2018 14:12:51 -0400 Subject: Decryption error handling improvements Currently, the decryption and block authentication code in the ZIO / ARC layers is a bit inconsistent with regards to the ereports that are produces and the error codes that are passed to calling functions. This patch ensures that all of these errors (which begin as ECKSUM) are converted to EIO before they leave the ZIO or ARC layer and that ereports are correctly generated on each decryption / authentication failure. In addition, this patch fixes a bug in zio_decrypt() where ECKSUM never gets written to zio->io_error. Reviewed by: Matt Ahrens Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7372 --- include/sys/arc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sys/arc.h') diff --git a/include/sys/arc.h b/include/sys/arc.h index de280362d..9d6bab505 100644 --- a/include/sys/arc.h +++ b/include/sys/arc.h @@ -237,7 +237,7 @@ boolean_t arc_is_unauthenticated(arc_buf_t *buf); enum zio_compress arc_get_compression(arc_buf_t *buf); void arc_get_raw_params(arc_buf_t *buf, boolean_t *byteorder, uint8_t *salt, uint8_t *iv, uint8_t *mac); -int arc_untransform(arc_buf_t *buf, spa_t *spa, uint64_t dsobj, +int arc_untransform(arc_buf_t *buf, spa_t *spa, const zbookmark_phys_t *zb, boolean_t in_place); void arc_convert_to_raw(arc_buf_t *buf, uint64_t dsobj, boolean_t byteorder, dmu_object_type_t ot, const uint8_t *salt, const uint8_t *iv, -- cgit v1.2.3