Skip to content
  • Miklos Szeredi's avatar
    ecryptfs: use vfs_get_link() · 6c988f57
    Miklos Szeredi authored
    Here again we are copying form one buffer to another, while jumping through
    hoops to make kernel memory look like userspace memory.
    
    For no good reason, since vfs_get_link() provides exactly what is needed.
    
    As a bonus, now the security hook for readlink is also called on the
    underlying inode.
    
    Note: this can be called from link-following context.  But this is okay:
    
     - not in RCU mode
    
     - commit e54ad7f1
    
     ("proc: prevent stacking filesystems on top")
    
     - ecryptfs is *reading* the underlying symlink not following it, so the
       right security hook is being called
    
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    Cc: Tyler Hicks <tyhicks@canonical.com>
    6c988f57