Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/x86/x86



Module Name:    src
Committed By:   maxv
Date:           Sat Jun  1 08:12:26 UTC 2019

Modified Files:
        src/sys/arch/x86/x86: pmap.c

Log Message:
Fix two bugs in pmap_write_protect():

 * The mask should be ~PAGE_MASK, not PTE_FRAME. PTE_FRAME eliminates the
   higher bits, and that's not wanted.
 * The computation of tva is incorrect: if the VA is in kernel space we
   must take the canonical hole into account, and here we were not.

We've had these bugs basically forever. It meant that uvm_km_protect()
would never flush the correct VA, and a stale TLB entry would persist.

Fixes PR/54257. Since I added PCID support we execute invpcid in invlpg(),
and invpcid triggers a #GP if the address is non canonical, contrary to
invlpg. The wrong computation of the VA during a modload happened to hit
the canonical hole.


To generate a diff of this commit:
cvs rdiff -u -r1.333 -r1.334 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index