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

Michal Privoznik posted 5 patches 4 years, 8 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1565790969.git.mprivozn@redhat.com
There is a newer version of this series
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
[libvirt] [PATCH 0/5] security: Deal with stale XATTRs
Posted by Michal Privoznik 4 years, 8 months ago
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list