Page MenuHomeFreeBSD

arm: pad minidump page table
Needs ReviewPublic

Authored by mchoo on Wed, Sep 16, 3:01 AM.
Tags
None
Referenced Files
F173363758: D59716.diff
Fri, Sep 25, 11:30 AM
F173353003: D59716.diff
Fri, Sep 25, 9:51 AM
Unknown Object (File)
Fri, Sep 25, 5:58 AM
Unknown Object (File)
Fri, Sep 25, 4:16 AM
Unknown Object (File)
Thu, Sep 24, 7:56 PM
Unknown Object (File)
Thu, Sep 24, 2:54 PM
Unknown Object (File)
Thu, Sep 24, 4:43 AM
Unknown Object (File)
Wed, Sep 23, 11:52 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