Page MenuHomeFreeBSD

Use the newer EINTEGRITY error when authentication fails.
ClosedPublic

Authored by jhb on Mar 20 2020, 12:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 1:49 PM
Unknown Object (File)
Wed, Dec 4, 8:50 AM
Unknown Object (File)
Wed, Dec 4, 8:50 AM
Unknown Object (File)
Wed, Dec 4, 8:50 AM
Unknown Object (File)
Wed, Dec 4, 8:30 AM
Unknown Object (File)
Tue, Nov 26, 8:51 PM
Unknown Object (File)
Nov 23 2024, 9:51 AM
Unknown Object (File)
Nov 19 2024, 7:32 PM
Subscribers

Details

Summary

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.

Test Plan
  • I made this change as part of the larger OCF rework patch, but think it is useful to split out as an independent change. I tested it while testing the OCF rework patches with GELI.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Mar 20 2020, 12:42 AM

This is a good example of a place that where EINTEGRITY is intended to be used.
At the moment mount(2) is the only system call that lists EINTEGRITY as a possible error. If your change is going to cause EINTEGRITY to be returned to other system calls (like read(2) or wirite(2)) then you should add it to their list of possible error returns.