From owner-freebsd-arch Wed Jul 17 4:30:56 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6CE7337B400 for ; Wed, 17 Jul 2002 04:30:52 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4DB243E3B for ; Wed, 17 Jul 2002 04:30:51 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g6HBUhwr029921; Wed, 17 Jul 2002 04:30:47 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200207171130.g6HBUhwr029921@gw.catspoiler.org> Date: Wed, 17 Jul 2002 04:30:43 -0700 (PDT) From: Don Lewis Subject: Re: wiring the sysctl output buffer To: bde@zeta.org.au Cc: arch@FreeBSD.ORG In-Reply-To: <200207170755.g6H7t1wr029257@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 17 Jul, Don Lewis wrote: > On 17 Jul, Bruce Evans wrote: >> I think no time should be spent changing interfaces for this. The >> following hack might work well: use the current code in sysctl_old_user() >> if req->oldlen is not huge. Otherwise, vslock() only the region being >> copied out to and vsunlock() it after the copy so that we don't have to >> keep track of what is vslock()ed. > > That doesn't fix sysctl_kern_function_list(), which grabs a lock and > then walks a linked list, calling SYSCTL_OUT() on each element. Two other places that we have the similar problems are tcp_pcblist() and udp_pcblist(). This code appears to have other problems as well, such as the possibility of looking at stale data on the free list ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message