From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Subject: Re: [AppArmor 37/41] AppArmor: Main Part Date: Fri, 13 Apr 2007 10:48:17 +0200 Message-ID: <200704131048.17846.agruen@suse.de> References: <20070412090809.917795000@suse.de> <20070412090848.752885000@suse.de> <20070412113723.2ec7e4f0@the-village.bc.nu> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: jjohansen@suse.de, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, chrisw@sous-sol.org To: Alan Cox Return-path: In-Reply-To: <20070412113723.2ec7e4f0@the-village.bc.nu> Content-Disposition: inline Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thursday 12 April 2007 12:37, Alan Cox wrote: > > + if (PTR_ERR(sa->name) == -ENOENT && (check & AA_CHECK_FD)) > > + denied_mask = 0; > > Now there is an interesting question. Is PTR_ERR() safe for kernel > pointers on all platforms or just for user ones ? It's used for kernel pointers all over the place and mmap also mixes user addresses with -Exxx, so it's definitely supposed to work. I'm not sure how exactly the topmost page is kept from getting mapped. Andreas