svn commit: r359263 - head/sys/geom/eli

John Baldwin jhb at FreeBSD.org
Mon Mar 23 21:26:34 UTC 2020


Author: jhb
Date: Mon Mar 23 21:26:32 2020
New Revision: 359263
URL: https://svnweb.freebsd.org/changeset/base/359263

Log:
  Use the newer EINTEGRITY error when authentication fails.
  
  GELI used to fail with EINVAL when a read request spanned a disk
  sector whose contents did not match the sector's authentication tag.
  The recently-added EINTEGRITY more closely matches to the error in
  this case.
  
  Reviewed by:	cem, mckusick
  MFC after:	2 weeks
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D24131

Modified:
  head/sys/geom/eli/g_eli_integrity.c

Modified: head/sys/geom/eli/g_eli_integrity.c
==============================================================================
--- head/sys/geom/eli/g_eli_integrity.c	Mon Mar 23 21:21:38 2020	(r359262)
+++ head/sys/geom/eli/g_eli_integrity.c	Mon Mar 23 21:26:32 2020	(r359263)
@@ -232,7 +232,7 @@ g_eli_auth_read_done(struct cryptop *crp)
 	bp->bio_driver2 = NULL;
 	if (bp->bio_error != 0) {
 		if (bp->bio_error == -1)
-			bp->bio_error = EINVAL;
+			bp->bio_error = EINTEGRITY;
 		else {
 			G_ELI_LOGREQ(0, bp,
 			    "Crypto READ request failed (error=%d).",


More information about the svn-src-all mailing list