Project

General

Profile

Actions

Bug #13009

closed

mdb-bhyve mishandles memseg offsets

Added by Patrick Mooney about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
bhyve
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:
External Bug:

Description

The library shim over libvmmapi which mdb uses to debug bhyve instances (libvmm) is in charge of mapping in the various memory segments allocated to the instance in order for mdb to inspect and manipulate them. When this was originally implemented, memory segments were never mapped in from an offset (where the start of the mapping in the VM does not correspond to the start of the memseg). As of #12792, this changed for the bootrom segment, which has lead to several challeges for mdb-bhyve (see also: #13008). Since such mapping offsets can be (and are now) a reality, vmm_map should properly handle them.

Actions #1

Updated by Electric Monk about 3 years ago

  • Gerrit CR set to 827
Actions #2

Updated by Patrick Mooney about 3 years ago

With only the fix to #13008, reads to the bootrom segment would appear to be completely filled with zeroes, thanks to the offsets being incorrectly applied. With both this fix and the one to #13008, I'm able to attach to a bhyve instance with mdb and read from the bootrom (and other regions).

Actions #3

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit c3d209cab1511045e9bb1a521f1bd85995d4fd7e

commit  c3d209cab1511045e9bb1a521f1bd85995d4fd7e
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-08-10T22:55:03.000Z

    13008 bhyve devmem could match better
    13009 mdb-bhyve mishandles memseg offsets
    13010 bhyve should not exit when VM debugged
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF