lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180526171206.GP30522@ZenIV.linux.org.uk>
Date:   Sat, 26 May 2018 18:12:06 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Lei Chen <losemyheaven@...il.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Why does d_splice_alias need to check IS_ROOT?

On Sun, May 27, 2018 at 12:33:40AM +0800, Lei Chen wrote:
> Hello list,
> 
> I'm insteresting in how hard link and denry lookup work and their
> implementation.
> 
> I know that this interface tries to connect an inode to a dentry, but
> why does it need
> to check whether the inode alias IS_ROOT if the inode represents a directory?
> And the code process in different way according to check result.  What
> occasions
> are they used for?

If it's disconnected (and not an ancestor of the place where we want it),
we can just move it in place, no questions asked.  If it is *NOT*
disconnected, the only thing we can do is to detach it from where it
is and move it over.  Which takes a lot more care wrt locking.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ