Date: Fri, 6 Nov 2009 13:10:12 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198986 - head/lib/libkvm Message-ID: <200911061310.nA6DACnm017666@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Nov 6 13:10:12 2009 New Revision: 198986 URL: http://svn.freebsd.org/changeset/base/198986 Log: 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 Modified: head/lib/libkvm/kvm_i386.c Modified: head/lib/libkvm/kvm_i386.c ============================================================================== --- head/lib/libkvm/kvm_i386.c Fri Nov 6 12:52:51 2009 (r198985) +++ head/lib/libkvm/kvm_i386.c Fri Nov 6 13:10:12 2009 (r198986) @@ -295,9 +295,9 @@ _kvm_vatop(kvm_t *kd, u_long va, off_t * #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 #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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911061310.nA6DACnm017666>