Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel. Submitted by: Dorr H. Clark dclark of engr.scu.edu MFC after: 1 week
This commit is contained in:
parent
1f02c0f7a9
commit
50c3239e85
@ -295,9 +295,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t *pa)
|
||||
#define PG_FRAME4M (~PAGE4M_MASK)
|
||||
pde_pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
|
||||
s = _kvm_pa2off(kd, pde_pa, &ofs);
|
||||
if (s < sizeof pde) {
|
||||
_kvm_syserr(kd, kd->program,
|
||||
"_kvm_vatop: pde_pa not found");
|
||||
if (s == 0) {
|
||||
_kvm_err(kd, kd->program,
|
||||
"_kvm_vatop: 4MB page address not in dump");
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs;
|
||||
@ -391,9 +391,9 @@ _kvm_vatop_pae(kvm_t *kd, u_long va, off_t *pa)
|
||||
#define PG_FRAME2M (~PAGE2M_MASK)
|
||||
pde_pa = ((u_long)pde & PG_FRAME2M) + (va & PAGE2M_MASK);
|
||||
s = _kvm_pa2off(kd, pde_pa, &ofs);
|
||||
if (s < sizeof pde) {
|
||||
_kvm_syserr(kd, kd->program,
|
||||
"_kvm_vatop_pae: pde_pa not found");
|
||||
if (s == 0) {
|
||||
_kvm_err(kd, kd->program,
|
||||
"_kvm_vatop: 2MB page address not in dump");
|
||||
goto invalid;
|
||||
}
|
||||
*pa = ofs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user