]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fuse: scramble lock owner ID
authorMiklos Szeredi <miklos@szeredi.hu>
Sun, 25 Jun 2006 12:48:55 +0000 (05:48 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:20 +0000 (10:01 -0700)
commit53ab3b8ebbb38dd62f6ab35fc46e4bfa18bb5170
tree860044f1b2c0c6189143b1c9daf263bd8ff5e5e0
parentffd2537bcbb14316ec898ef19274005af9708a14
[PATCH] fuse: scramble lock owner ID

VFS uses current->files pointer as lock owner ID, and it wouldn't be
prudent to expose this value to userspace.  So scramble it with XTEA using
a per connection random key, known only to the kernel.  Only one direction
needs to be implemented, since the ID is never sent in the reverse
direction.

The XTEA algorithm is implemented inline since it's simple enough to do so,
and this adds less complexity than if the crypto API were used.

Thanks to Jesper Juhl for the idea.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/fuse/inode.c