From owner-soc-status@FreeBSD.ORG Sun May 30 19:18:51 2010 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5579106564A for ; Sun, 30 May 2010 19:18:51 +0000 (UTC) (envelope-from gpf.kira@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5EFCE8FC14 for ; Sun, 30 May 2010 19:18:50 +0000 (UTC) Received: by wyf19 with SMTP id 19so173387wyf.13 for ; Sun, 30 May 2010 12:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=W+5CfdTSZASc59snu8cqltSBa6CbJKPbdirQlMqQYDE=; b=XnVn4qsiUxdaxlHpRZHxY1p78sMi9DCjo7aYrTFSniOMis/w7KsrG8oulFOjaEjdlZ WJpktz5tJGivilCDaLo2Gx4HbIg9RQCRjmdua/xI8EhsNgiXThSQFAyYZSvYXnD+lSWV BiTNXNTjCQEFE9FGYae0XYHqMi1TR/CmDXTQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=teGEDJPhCRFYI24EGtHVsaY09u0d17fBRqTCk89DknGardry/prOdU8PoDKgsEilDT 5FvHAV78v8UfuPPzhh5/IN32wDOD0cb/FJKC3FggLPEstxcX/o1TyNbTQajrtkZiUzn7 ZuZwJh0VeRD/NUWvLtJJPnpHtKizrKUr9jIec= MIME-Version: 1.0 Received: by 10.227.157.142 with SMTP id b14mr3288143wbx.183.1275245329749; Sun, 30 May 2010 11:48:49 -0700 (PDT) Received: by 10.216.1.145 with HTTP; Sun, 30 May 2010 11:48:49 -0700 (PDT) Date: Sun, 30 May 2010 21:48:49 +0300 Message-ID: From: Efstratios Karatzas To: soc-status@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: weekly update #1 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2010 19:18:51 -0000 - audit support for current NFS implementation in sys/nfs* is complete. (Complete at least till I get some feedback and change how things work.) We are now auditing all of the RPCs and keeping track of the following information (more or less) - type of RPC - date/time of event - credentials of the user who issued the RPC. - ip address + port that the rpc came from, otherwise the credentials don't make much sense. - attributes of the file that was the target of the rpc and some various flags - full path for the file in question - recreating 'a' working path from a vnode is done using two KPIs: the old vn_fullpath() KPI that uses the name cache and vn_fullpath_nocache() that does not. vn_fullpath_nocache() was coded for this project and resides in sys/kern/vfs_cache.c The hardest part of finding a working path for a file from a vnode is finding a parent directory with the file as a child. This is done by using VOP_GETPARENT() that was coded to solve this problem. In case of directories, we just VOP_VPTOCNP() our way up the filesystem. - VOP_GETPARENT: If the fs is UFS, a parent directory inode number is stored inside the file handle that is used to reference that file in NFS. This was done by altering VOP_VPTOFH(). In ZFS this is not required, as the parent directory znode number is kept by the filesystem itself. This VOP is also able to search the entiry filesystem to find a parent directory for a file, if a parent hint does not cut it. Exhaustive search for UFS kernel panics for the time beign due to some locks that are held. Besides that, the VOP, as well as the new KPI work just fine as far as I can tell. - added a new VFS op, VFS_FHHINT that retrieves the parent directory ino_t "hint" from the file handle. In retrospect, perhaps I should have altered VFS_FHTOVP and have the hint returned via a new argument. - added a new argument, 'c', to praudit so that user credentials (usid, gpid) will not be matched against local user credentials. They are instead printed in "raw numeric form". - Last but not least, all coded is tested with UFS & ZFS. For any new VOPs of VFS that I add, I also add default implementations and make sure that they are called when a different fs is exported via NFS, so that we won't kernel panic or anything. Hope I'm not forgetting anything. Note: This is not actually the weekly update because community bonding period(=?) was used for coding. Note2: I have skipped over a lot of details, please refer to the p4 comments or the code itself for more info. -- Efstratios "GPF" Karatzas