From owner-freebsd-hackers@FreeBSD.ORG Thu May 14 16:06:28 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA7C106566C; Thu, 14 May 2009 16:06:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 71D598FC16; Thu, 14 May 2009 16:06:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0BC9446B5C; Thu, 14 May 2009 12:06:28 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id D214C8A026; Thu, 14 May 2009 12:06:26 -0400 (EDT) From: John Baldwin To: freebsd-alpha@freebsd.org Date: Thu, 14 May 2009 08:07:35 -0400 User-Agent: KMail/1.9.7 References: <86tz3o4lb9.fsf@ds4.des.no> In-Reply-To: <86tz3o4lb9.fsf@ds4.des.no> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200905140807.35680.jhb@freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 14 May 2009 12:06:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= , hackers@freebsd.org Subject: Re: PTE modified bit emulation trap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 16:06:29 -0000 On Wednesday 13 May 2009 7:47:38 pm Dag-Erling Sm=C3=B8rgrav wrote: > Coverity complains about the lack of error checking in the following > code in sys/kern/kern_sysctl.c, around line 1390: >=20 > /* > * Touch all the wired pages to avoid PTE modified > * bit emulation traps on Alpha while holding locks > * in the sysctl handler. > */ > for (i =3D (wiredlen + PAGE_SIZE - 1) / PAGE_SIZE, > cp =3D req->oldptr; i > 0; i--, cp +=3D PAGE_SIZE) { > copyin(cp, &dummy, 1); > copyout(&dummy, cp, 1); > } >=20 > Since Alpha is dead, can we remove this, or is it still needed for other > platforms? I would check MIPS as it might have similar PTE bits as well (FOR, FOW) (ma= ny=20 Alpha things are similar to MIPS). I don't have my See MIPS Run handy or I= =20 would check it myself. It might be better to replace the loop with a=20 vm_fault(..., VM_FAULT_DIRTY) though if that would have the same effect. =2D-=20 John Baldwin