[OpenAFS-devel] Google Summer of Code Student Introduction

David Howells dhowells@redhat.com
Tue, 22 Apr 2008 16:20:13 +0100


Harald Barth <haba@kth.se> wrote:

> Take the arla kernel module, call it kAFS and most of your tasks are
> allready done. Yes, the code is dual licensed.

I looked at Arla and noticed a few things:

 (1) Filesystem design is about compromises, and I don't agree with all the
     ones Arla have used.  Arla, for instance, is mostly implemented in
     userspace.

 (2) There was a bad deadlock problem when I looked in 2001, which may have
     been fixed in the intervening seven years, in which the kernel and
     userspace could deadlock against each other.  Unfortunately, I don't
     recall the details.

 (3) I don't like direct patching of the syscall table.  However, Linux should
     provide pioctl properly.

 (4) This is very bad:

	#ifdef CONFIG_SECURITY
	...
	static int
	nnpfs_set_pag_sec(void)
	{
	    static nnpfs_pag_t pagnum = NNPFS_PAG_LLIM;

	    if (pagnum == NNPFS_PAG_ULIM)
		return -ENOMEM;
	    /* pagnum = NNPFS_PAG_LLIM; */

 >>>	    current->security = PAG2SEC(pagnum);
	    pagnum++;
	    return 0;
	}

     You cannot do that!

     Keyrings are there for a good reason.

David