Page MenuHomeFreeBSD

Use the newer EINTEGRITY error when authentication fails.

Authored by jhb on Fri, Mar 20, 12:39 AM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb created this revision.Fri, Mar 20, 12:39 AM
cem accepted this revision.Fri, Mar 20, 12:42 AM


This revision is now accepted and ready to land.Fri, Mar 20, 12:42 AM
mckusick accepted this revision.Fri, Mar 20, 11:18 PM

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.

This revision was automatically updated to reflect the committed changes.