Subject: Re: kern/35675 (magiclinks implementation broken)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 04/05/2007 15:10:02
The following reply was made to PR kern/35675; it has been noted by GNATS.

From: christos@zoulas.com (Christos Zoulas)
To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Cc: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
	netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, xtraeme@netbsd.org,
	juan@xtrarom.org, core@netbsd.org
Subject: Re: kern/35675 (magiclinks implementation broken)
Date: Thu, 5 Apr 2007 11:08:57 -0400

 On Apr 5, 12:53pm, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
 -- Subject: Re: kern/35675 (magiclinks implementation broken)
 
 | > | can you explain why realpath should be a system call?
 | > 
 | > Because it is quite pointless to do string gymnastics in userland
 | > where the kernel has all the code to do this. Our code has been
 | > historically broken:
 | > 
 | > - we had bugs where we forgot to NUL terminate
 | 
 | such mistakes can happen in kernel as well.
 | and their implications can be much worse in kernel.
 
 Yes, but the code is there; we don't need to change it.
 
 | > - it does not handle magiclinks (your PR 30664)
 | 
 | they are newer than realpath.
 
 yes, but it is still broken.
 
 | > I am looking for something like solaris' resolvepath(2) which can be
 | > used to implement the rest of realpath(3) in userland.
 | 
 | it isn't necessary to solve these PRs, right?
 
 I think that it is a lot easier to handle magiclinks in one place
 (kernel since this is where we resolve them now) as opposed to
 either introduce a new system call that resolves them, or copy the
 code to userland.
 
 christos