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).",
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"