From owner-freebsd-hackers@FreeBSD.ORG Tue May 22 18:07:10 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3868A16A41F for ; Tue, 22 May 2007 18:07:10 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id E8C5E13C489 for ; Tue, 22 May 2007 18:07:09 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 5D465E7A3FA for ; Tue, 22 May 2007 18:07:06 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 62DAB7D3D; Tue, 22 May 2007 20:06:50 +0200 (CEST) Date: Tue, 22 May 2007 20:06:48 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20070522180647.GA11365@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <200705201831.38828.dmw@unete.cl> <20070521075757.GG4602@funkthat.com> <200705210948.36033.dmw@unete.cl> <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23B4A664-5916-47D3-8D42-282817F6CC70@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: kqueue implementation 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: Tue, 22 May 2007 18:07:10 -0000 On Tue, May 22, 2007 at 10:04:37AM -0700, Suleiman Souhlal wrote: > >I mean vnode events, in the manual page I see NOTE_WRITE, but I > >need NOTE_OPEN and NOTE_READ. Is there any chance to get these > >kind of events? > > They should be easy to add.. All you would need to do for NOTE_OPEN > would be to add a vop_open_post hook to VOP_OPEN that calls > VFS_KNOTE_LOCKED(..., NOTE_OPEN). Similarly for read. If this is done, it should be done very carefully. There are some non-trivial security implications by this, for example the process hiding can be at least partly circumvented by adding a open filter on rtld or libc.so. Joerg