Source-Changes-HG archive

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

[src/trunk]: src/lib/libkvm Mask out always zero bits off pg->phys_addr.



details:   https://anonhg.NetBSD.org/src/rev/c40b158cb544
branches:  trunk
changeset: 967477:c40b158cb544
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Dec 10 18:13:07 2019 +0000

description:
Mask out always zero bits off pg->phys_addr.

diffstat:

 lib/libkvm/kvm_proc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8c0b4c523417 -r c40b158cb544 lib/libkvm/kvm_proc.c
--- a/lib/libkvm/kvm_proc.c     Tue Dec 10 18:08:32 2019 +0000
+++ b/lib/libkvm/kvm_proc.c     Tue Dec 10 18:13:07 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kvm_proc.c,v 1.92 2016/04/04 22:14:38 christos Exp $   */
+/*     $NetBSD: kvm_proc.c,v 1.93 2019/12/10 18:13:07 ad Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
 #else
-__RCSID("$NetBSD: kvm_proc.c,v 1.92 2016/04/04 22:14:38 christos Exp $");
+__RCSID("$NetBSD: kvm_proc.c,v 1.93 2019/12/10 18:13:07 ad Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -260,7 +260,7 @@
                        return (NULL);
 
                if (_kvm_pread(kd, kd->pmfd, kd->swapspc, (size_t)kd->nbpg,
-                   (off_t)pg.phys_addr) != kd->nbpg)
+                   (off_t)pg.phys_addr & -kd->nbpg) != kd->nbpg)
                        return (NULL);
        } else {
                if (kd->swfd < 0 ||



Home | Main Index | Thread Index | Old Index