Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 1998 06:06:19 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        peter@taronga.com (Peter da Silva)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: A really hoopy idea for variant symlinks.
Message-ID:  <199807070606.XAA01460@usr06.primenet.com>
In-Reply-To: <199807061148.GAA17254@bonkers.taronga.com> from "Peter da Silva" at Jul 6, 98 06:48:44 am

next in thread | previous in thread | raw e-mail | index | archive | help
> In article <199807060652.XAA22028@usr02.primenet.com>,
> Terry Lambert  <tlambert@primenet.com> wrote:
> >It's a bit "plan9"-ish, depending on kernel enforcement of parsing
> >semantics; I'd try to avoid that...
> 
> Mind elaborating on that?

No problem...

The enforcement depends on the procfs (kernel code) parsing and enforcing
against "absurd" values.

I would prefer to put the vast majority of the enforcement in the libc,
and limit the range of "absurd" to be "anything beginning with a ``#''
character".

The idea of "null terminated name/value pairs as 8 bit clean strings"
resolves all of the namespace and X/PG3 - X/PG4 multibyte byte stuffing
crap that you would otherwise have to deal with, presumably in the
kernel.

Less work in the kernel means a smaller kernel.

I'm a bit annoyed at the current sysctl mechanism because it is not
data driven off a pageable data segment in the kernel files data
section, but at least that's resolvable (via ELF) in some future
release, assuming the deed ever happens (or FreeBSD gets off the pot).

John Dyson was a big fan of not having parsing in the kernel.  FreeBSD
has a number of places where that occurs (the aforementioned sysctl,
the mount options parsing, the NFS mounts -- basically, everywhere,
other than namei(), where copyinstr() is used to copy a NUL terminated
string into the kernel.

Linux resolves this (inadequately for NFS, of course, and with race
condition for SMP and kernel preemption because of prevalidation of
a mutable address space, and with a big old memory leak in the failure
case, which I fixed for them and submitted back via the indominatable
Matt Day 8-)) by having a single method of copying in strings that is
*very* specific for FS paths *only*.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807070606.XAA01460>