swtpm
swtpm copied to clipboard
Reenable fsync() on state file and directory
Reenable fsync() on state file and directory. This depends on availability of packages of libtpms with the required fix.
TODO:
- [ ] Profile the fsync()'s to see how 'bad' they are
fsync(2)
s are generally painful on real HDDs, tolerable on SSDs, and unnoticeable on tmpfs
.
For swtpm the pain will depend on what applications do. NV and PCR operations need fsync(2)
, but most key object operations don't. So actual pain will vary by application.
PCR operations like extending and reading shouldn't require it but due to an issue with the clock it ended up doing writes. NV writes for sure will require it.
Ah, right, PCR operations shouldn't require it. Clock operations shouldn't either, since restarting the swtpm should increment the resetCount
.