KVM: selftests: guest_memfd close() fix and hardening
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: selftests: Cast guest_memfd fd to a signed int when checking for >= 0tools/ | +1 | 2 replies | |
| 2/2 | KVM: selftests: Add and use kvm_free_fd() to harden against fd goofstools/ tools/ | +17 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Ackerley Tng | Bibo Mao |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] KVM: selftests: guest_memfd close() fix and hardening
Fix a bug where freeing a VM attempts to close an invalid guest_memfd instance due to checking if a u32 value is non-negative. Then harden closing of fds in kvm_util by invalidating fds after they are closed, e.g. so that freeing an fd multiple times will fail instead of silently closing the wrong file.
Sean Christopherson (2):
KVM: selftests: Cast guest_memfd fd to a signed int when checking for
Quoted 1 line
= 0
KVM: selftests: Add and use kvm_free_fd() to harden against fd goofs
.../selftests/kvm/include/kvm_syscalls.h | 6 +++++ tools/testing/selftests/kvm/lib/kvm_util.c | 25 +++++++++---------- 2 files changed, 18 insertions(+), 13 deletions(-)
base-commit: 66939c1603bd5579e63278f9dc72cba5b79da9b5
Signature · 1 line
2.54.0.794.g4f17f83d09-goog