From owner-freebsd-current@FreeBSD.ORG Thu Dec 28 14:50:14 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C3A416A403; Thu, 28 Dec 2006 14:50:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id C3E9D13C474; Thu, 28 Dec 2006 14:50:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 479EC46E4C; Thu, 28 Dec 2006 09:50:13 -0500 (EST) Date: Thu, 28 Dec 2006 14:50:13 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrey Chernov In-Reply-To: <20061228141235.GA92268@nagual.pp.ru> Message-ID: <20061228144606.N86685@fledge.watson.org> References: <20061216055903.GA2712@nagual.pp.ru> <20061216111656.GA7501@nagual.pp.ru> <20061216112117.P72986@fledge.watson.org> <20061216114426.GA7735@nagual.pp.ru> <20061216120746.E72986@fledge.watson.org> <20061216125136.GA1094@nagual.pp.ru> <20061216125419.J72986@fledge.watson.org> <20061217153914.GA30048@nagual.pp.ru> <20061221233855.GA95581@nagual.pp.ru> <20061222204908.C65423@fledge.watson.org> <20061228141235.GA92268@nagual.pp.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org Subject: Re: sysv_ipc.c broken in v1.30 (was Re: sysvshm appearse broken in -current) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 14:50:14 -0000 On Thu, 28 Dec 2006, Andrey Chernov wrote: > On Fri, Dec 22, 2006 at 08:51:05PM +0000, Robert Watson wrote: >> I return from Oxford. If you want, you can try removing the ipcperm() call >> from shmget_existing() and restore the sysv_ipc.c change and see how that >> works for you? > > Yes, it works, all t-shm tests passed. I believe this check is: (1) Gratuitous. Applications do not expect it to occur, the specs (in as much as they exist) don't expect it to happen, etc. Likewise, this is simply a name space lookup that doesn't affect actual right to access the underlying object (unlike, say, a file pathname). (2) Incorrect. Unlike all other calls to the check routine, it doesn't pass in the specific rights being requested, it passes in a mode mask. There are some cases where the flag mask is masked with 0700 and then pass it in, and it could be that making the same change here does the right thing. Both of these suggest removing the check, but I want to do a bit more reading before I do that, and run some tests on other platforms to confirm my reading. Robert N M Watson Computer Laboratory University of Cambridge