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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Aug 2008 23:47:01 -0400
From:	Theodore Tso <tytso@....edu>
To:	Daniel Phillips <phillips@...nq.net>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: Dot and dotdot need to be physically present?

On Wed, Aug 13, 2008 at 04:36:59PM -0700, Daniel Phillips wrote:
> 
> Many years ago we had a discussion about whether or not the . and ..
> directory entries had to be physically present in htree, and I remember
> the conclusion was that they had to be, but I forget the argument and
> lost track of the email thread.  I think the VFS will happily supply
> the . and .. entries to getdents on its own.  So what was the issue?
> Something about telldir?

. and .. are needed for backwards compatibility.  If you aren't going
to do backwards compatibility, then you might as well not bother
putting the btree in the directory nodes.  Just use physically block
numbers directly.

The other reason why '..' is useful is that it helps to knit the
fliesystem back together in case of corruption.  (For example, e2fsck
uses the '..' so we can display full pathnames which is very helpful
to system administrators.)

The '.' pointer is slightly less useful, but it is helpful as an
additional sanity check.

If I were doing things all over in a completely incompatible way, I'd
probably put at the beginning of the first directory block (a) a magic
number, (b) the current inode number (as a sanity check), (c) the
parent inode number (i.e., '..'), and (d) a pointer to a physical
block which is the root of the index tree. 

      	       	   	       	     	   - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ