Page MenuHomeFreeBSD

arm: pad minidump page table
Needs ReviewPublic

Authored by mchoo on Wed, Sep 16, 3:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 21, 1:47 PM
Unknown Object (File)
Mon, Sep 21, 3:08 AM
Unknown Object (File)
Sun, Sep 20, 11:15 AM
Unknown Object (File)
Sat, Sep 19, 10:13 PM
Unknown Object (File)
Sat, Sep 19, 8:10 PM
Unknown Object (File)
Thu, Sep 17, 11:01 PM
Unknown Object (File)
Thu, Sep 17, 7:56 PM
Unknown Object (File)
Wed, Sep 16, 10:02 PM
Subscribers

Details

Reviewers
jhb
andrew
Summary

libkvm locates the sparse page array after the page-rounded PTE table
size, but the ARM minidump writer emitted only the unrounded size. When
the table size was not page-aligned, libkvm therefore read every dumped
physical page at the wrong offset.

The mismatch was introduced when libkvm began rounding ptesize. It has
affected ARM minidumps since ffdeef323449 ("libkvm: Improve physical
address lookup scaling."). It is exposed when the dumped KVA span is not
a multiple of 4 MiB.

Zero-pad the final PTE page and include the padding in the dump size.

Fixes: ffdeef323449 ("libkvm: Improve physical address lookup scaling.")
MFC after: 2 weeks
MFC to: stable/14, stable/15
Sponsored by: FreeBSD Foundation

Test Plan

Tested on armv7 QEMU

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 76962
Build 73845: arc lint + arc unit