Skip to content

Remove possibility of silent errors in vmem::TableOps #1128

@ludfjig

Description

@ludfjig

#1093 introduced

struct GuestPageTableBuffer {
    buffer: std::cell::RefCell<Vec<u8>>,
}.

To avoid UB in the into_bytes implementation, this buffer made Vec<u8> instead of Vec<u64>. However this forced read_entry to possibly error silently using unwrap_or(0).

We should remove the possibility of error occurring silently, either by panicking, or by rewriting into_bytes to avoid UB using Vec<u64>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions