[libvirt] [PATCH 0/5] security: Deal with stale XATTRs

Michal Privoznik mprivozn at redhat.com
Wed Aug 14 14:33:18 UTC 2019


There are some ways users can end up in stale XATTRs. One is sudden
power loss, the other is stopping libvirt whilst some domains are
running and then rebooting the host. And I believe users will find other
creative ways to shut down domains without qemuProcessStop() being
called. When that happens our XATTRs will be left behind and not reflect
the real state of things (e.g. refcounter). To resolve this, record a
timestamp within XATTRs too so that host reboots can be detected.

Michal Prívozník (5):
  virUUIDFormat: s/VIR_UUID_RAW_LEN/VIR_UUID_BUFLEN/ in comment
  security_util: Use more VIR_AUTOFREE()
  security_util: Document virSecurityMoveRememberedLabel
  util: Introduce virhostuptime
  security_util: Remove stale XATTRs

 src/libvirt_private.syms     |   4 +
 src/security/security_util.c | 293 +++++++++++++++++++++++++++++------
 src/util/Makefile.inc.am     |   2 +
 src/util/virhostuptime.c     |  61 ++++++++
 src/util/virhostuptime.h     |  27 ++++
 src/util/viruuid.c           |   2 +-
 tests/qemusecuritymock.c     |  12 ++
 7 files changed, 353 insertions(+), 48 deletions(-)
 create mode 100644 src/util/virhostuptime.c
 create mode 100644 src/util/virhostuptime.h

-- 
2.21.0




More information about the libvir-list mailing list