Protect against long IDs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 0 repliesNew
- v13 patches 8 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vmstate_register_with_alias_id: Take an Error **hw/ hw/ include/ +2 more | +10 | 0 replies | |
| 2/3 | migration: Check for ID lengthinclude/ migration/ | +18 | 0 replies | |
| 3/3 | vmstate registration: check return valueshw/ | +6 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Juan Quintela |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/3] Protect against long IDs
From: "Dr. David Alan Gilbert" <[email protected]>
QEMU currently asserts if you try and create a PCI device on the end of a very long chain, because the ID string exceeds the maximum length, and ends up aliasing.
Fail with a clean error in this common case; there's lots of other places that call the various registration functions that now check for this error; I've only made sure the common qdev path fails cleanly.
With these patches it fails with the slightly cleaner:
qemu-system-x86_64: -device x3130-upstream,id=pci.52,bus=pci.51,addr=0x0: Path too long for VMState (0000:00:0f.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0:00.0)
I don't think in real uses we'll end up with paths this long, so I'm not intending to fix the paths to be dynamic lengths unless we find a really good case where it happens.
This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=1342434
Dave
v2
Fix some indents on the last patch
Dr. David Alan Gilbert (3):
vmstate_register_with_alias_id: Take an Error **
migration: Check for ID length
vmstate registration: check return values
hw/core/qdev.c | 9 ++++++--- hw/intc/apic_common.c | 2 +- include/migration/vmstate.h | 7 +++++-- migration/savevm.c | 24 ++++++++++++++++++------ stubs/vmstate.c | 3 ++- 5 files changed, 32 insertions(+), 13 deletions(-)
Signature · 1 line
2.9.3