Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 2020 17:22:12 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r367336 - stable/12/sys/geom/eli
Message-ID:  <202011041722.0A4HMC0a035490@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Nov  4 17:22:12 2020
New Revision: 367336
URL: https://svnweb.freebsd.org/changeset/base/367336

Log:
  MFC 359263: 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.

Modified:
  stable/12/sys/geom/eli/g_eli_integrity.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/geom/eli/g_eli_integrity.c
==============================================================================
--- stable/12/sys/geom/eli/g_eli_integrity.c	Wed Nov  4 16:42:20 2020	(r367335)
+++ stable/12/sys/geom/eli/g_eli_integrity.c	Wed Nov  4 17:22:12 2020	(r367336)
@@ -231,7 +231,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).",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011041722.0A4HMC0a035490>