From owner-freebsd-hackers Mon Jul 6 23:06:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA03082 for freebsd-hackers-outgoing; Mon, 6 Jul 1998 23:06:39 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp01.primenet.com (daemon@smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA03058 for ; Mon, 6 Jul 1998 23:06:31 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id XAA09755; Mon, 6 Jul 1998 23:06:29 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp01.primenet.com, id smtpd009745; Mon Jul 6 23:06:27 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id XAA01460; Mon, 6 Jul 1998 23:06:26 -0700 (MST) From: Terry Lambert Message-Id: <199807070606.XAA01460@usr06.primenet.com> Subject: Re: A really hoopy idea for variant symlinks. To: peter@taronga.com (Peter da Silva) Date: Tue, 7 Jul 1998 06:06:19 +0000 (GMT) Cc: hackers@FreeBSD.ORG In-Reply-To: <199807061148.GAA17254@bonkers.taronga.com> from "Peter da Silva" at Jul 6, 98 06:48:44 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > In article <199807060652.XAA22028@usr02.primenet.com>, > Terry Lambert 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