Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.unix.wizards Subject: Re: copyin Message-ID: <5769@mimsy.UUCP> Date: Thu, 12-Mar-87 03:52:13 EST Article-I.D.: mimsy.5769 Posted: Thu Mar 12 03:52:13 1987 Date-Received: Fri, 13-Mar-87 04:41:43 EST References: <4838@brl-adm.ARPA> <157@twg-ap.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 22 Summary: uchar is old (and gone from 4.3BSD) In article <157@twg-ap.UUCP> narayan@twg-ap.UUCP (Narayan Mohanram) writes: >... if you go to some other machine where it is not possible to >distinguish between kernel space and user space, ... you may crash >and burn. Right. >You really need to to do a uchar(I think) not a copy in to load the >string in (after setting u.u_xxx). No: namei used to call uchar to read from user I or D space, one byte at a time. One would set u.u_segflg according to the source space (user instruction, user data, or system), and namei and a few other routines would call uchar or schar. I am not old enough to be familiar with just which routines were done which way in which kernels, but in 4.3, the routine to copy strings in is `copyinstr'. Incidentally, the 4.3 copy routines have been adapted to 2.10BSD, speeding it considerably. A function call per character for every name lookup is just a bit too much overhead. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!mimsy!chris ARPA/CSNet: chris@mimsy.umd.edu