Date: Tue, 17 Nov 2009 16:50:57 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r199408 - stable/8/lib/libkvm Message-ID: <200911171650.nAHGovf1023176@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Nov 17 16:50:57 2009 New Revision: 199408 URL: http://svn.freebsd.org/changeset/base/199408 Log: MFC 198986: 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. Modified: stable/8/lib/libkvm/kvm_i386.c Directory Properties: stable/8/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/kvm_i386.c ============================================================================== --- stable/8/lib/libkvm/kvm_i386.c Tue Nov 17 16:43:02 2009 (r199407) +++ stable/8/lib/libkvm/kvm_i386.c Tue Nov 17 16:50:57 2009 (r199408) @@ -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?200911171650.nAHGovf1023176>