Skip to content
  • Miklos Szeredi's avatar
    [PATCH] fuse: scramble lock owner ID · 9c8ef561
    Miklos Szeredi authored
    
    
    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: default avatarMiklos Szeredi <miklos@szeredi.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    9c8ef561