[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/54257 CVS commit: src/sys/arch/x86/x86
The following reply was made to PR port-amd64/54257; it has been noted by GNATS.
From: "Maxime Villard" <maxv%netbsd.org@localhost>
Subject: PR/54257 CVS commit: src/sys/arch/x86/x86
Date: Sat, 1 Jun 2019 08:12:26 +0000
Module Name: src
Committed By: maxv
Date: Sat Jun 1 08:12:26 UTC 2019
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.
Main Index |
Thread Index |