Page MenuHomeFreeBSD

i386: Use atomic 64bit load to read PDE value from PAE pagetables in pmap_kextract().
ClosedPublic

Authored by kib on Jan 2 2019, 1:17 PM.
Tags
None
Referenced Files
F106165281: D18714.id52478.diff
Thu, Dec 26, 11:23 AM
F106134210: D18714.diff
Wed, Dec 25, 11:23 PM
Unknown Object (File)
Mon, Dec 16, 3:34 AM
Unknown Object (File)
Fri, Dec 6, 5:34 PM
Unknown Object (File)
Sat, Nov 30, 1:15 AM
Unknown Object (File)
Fri, Nov 29, 3:55 AM
Unknown Object (File)
Thu, Nov 28, 3:23 AM
Unknown Object (File)
Nov 25 2024, 8:06 AM
Subscribers

Details

Summary

pmap_kextract() can race with promotion/demotion on the kernel page table, in which case current non-atomic 64bit read would see torn value, breaking pmap_kextract(). pmap_kextract() would correctly handle either promoted or demoted PDE, but not the mix where one word is from a different state.

It requires PAE and > 4G memory to reproduce. We observed this in real loads, both for intensive use of malloc()/free() where vtoslab() returned invalid pointer to the slab, and with the use of busdma_bounce, where incorrect page was bounced.

In collaboration with: pho

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable