From: Brad Boyer Subject: Re: PROBLEM: hfsplus filesystem allows opendir() on plain files Date: Fri, 5 Dec 2008 23:21:22 -0800 Message-ID: <20081206072122.GC13807@cynthia.pants.nu> References: <493553C0.2090407@frey.co.nz> <20081202222111.GA2738@cynthia.pants.nu> <20081205093948.GA15714@infradead.org> <20081206063226.GB13807@cynthia.pants.nu> <20081206064739.GN28946@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Damian Stewart , linux-fsdevel@vger.kernel.org To: Al Viro Return-path: Received: from [76.245.85.235] ([76.245.85.235]:42066 "EHLO cynthia.pants.nu" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750960AbYLFHVc (ORCPT ); Sat, 6 Dec 2008 02:21:32 -0500 Content-Disposition: inline In-Reply-To: <20081206064739.GN28946@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Dec 06, 2008 at 06:47:39AM +0000, Al Viro wrote: > You know what... I thought that HFS+ did not support links; looking at > the source, it appears that hardlinks *are* supported and that brings > all the deadlocks into the game, same as we had in reiser4 case. Apple added hard links with osx. Back when I wrote hfsplus originally, there wasn't any such thing on HFS+ either. The support for the hack that added the appearance of hard links was added after I stopped maintaining the code. It's really just a matter of hiding the real file in a special place and putting stubs with special settings where all the links appear in the namespace. In all truth both HFS and HFS+ are inherently incompatible with the very concept of a hard link or having a file still exist after removal. It's just a horrible hack that makes it look like it works. > Which is to say, this stuff *must* go. In case of HFS it's obnoxious, > but not immediately letal. In case of HFS+ it's an instant DoS. Feel free. I disavowed any responsibility for this code years ago. And before anyone thinks of complaining, I'll point out that I wasn't the one that submitted hfsplus for inclusion in the kernel either. Brad Boyer flar@allandria.com