Subject: Re: kern/35675 (magiclinks implementation broken)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 04/05/2007 11:08:57
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