Skip to content

Unsound axiom found for mmio #660

Description

@hiroki-chen
/// ostd/specs/mm/frame/meta_owners.rs#L67-L72
pub broadcast axiom fn axiom_mmio_usage_iff_mmio_paddr(slot: MetaSlotOwner)
    ensures
        (#[trigger] slot.usage == PageUsage::MMIO) <==> is_mmio_paddr(
            meta_to_frame(slot.slot_vaddr),
        ),
;
slot.usage == MMIO
          ↓ axiom_mmio_usage_iff_mmio_paddr
  is_mmio_paddr(pa)

  Frame::from_unused(pa, ...)
          ↓ REF_COUNT_UNUSED
  slot.usage = Frame
          ↓ axiom
  !is_mmio_paddr(pa)

So if you construct a page following the above path then you obtain is_mmio_paddr(pa) &&!is_mmio_paddr(pa) ==> false and via ex falso quodlibet we can prove anything!!!

@rikosellic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions