x *K OK KOK x x KKK Number 10 Qetober 1976 Fase 1 x x * x x * x * * x x * * x kK XK * x x KK KK x kK *K KKK * * * x * * x x x * LEER EE SERRE SEAS TASER, DRARERS EVER TR ERTS EMTRN * * NOTICE * * * x This document may contain informetion covered x * or mere lie Sy» corurightsy and x x ~diselosure asreem Cireuwlatioan of x x this document is restricted to holders of a * x license for the UNIX software sustem from * x Western Electric, Such License halders may x x x x * x x * x x * * * * * rerraduce this dacument for uses in conformi- ty with the UNIX license All other circulation or rerreduction is: Frohibited, SAO OOOO OOO OOOO ORO OOOO RO OOK SECURITY FATCH fo patch ta the "su" command should be installed as saon ag ras— lations. The bud it fixes allows an unerivilesed user ta be- ser under rare circumstances. . j The folloawi Ole at ell ins come surer-. ed s2/¢ /bad gota errars + TLustal led 9-NOU-76 ee -e -0 82/suee “te ehmad 06711. a-.out my @eoub /bin/su SOFTWARE DISTRIBUTION A second distribution from Chicado Circle will be rremared during Navember, Those with items to submit should am immediately. Those who wish the distribution shawld send magnetic tares immediately. John Lions’ roint abaut the difficulty and exeense of shiering tares over~ seas is well taken. While there may some Problems vis-a-vis Bell with resrect to their softwarer the are nt does mot preclude our having software distributian ¢ setellites ove ase According we invite offers from an installation in Gr i, ta as @ center for rore and Israel and from a instal on oim Aus" lia toa service that continent. The centers would re- sus bie Si ions from within their seheres of influencer submit a single tare ta Chicasad at @ sinsle tare in return, Tares should he sent to Mike O’Brien at the mailing list address. Letters to Hel Ferentz. THE UNIVERSITY OF NEW SOUTH WALES ‘ ’ 4 7.0. 8OX 1 + KENSINGTON © NW. © AUSTRALIA + 2009 TELEGRAPH: UNITECH, SYONEY ~ , TELEPHONE 663 0951 : b> Department of Computer Science fan, 2805 ne PLEASE Quort FACULTEIT DER WISKUNDE EN NATUURWETENSCHAPPEN Toemooiveld, Nimegea oie Telephone 080-55 88 33 KATHOLIEKE UNIVERSITEIT Telex 48228 winat nl I7th September, 1976. NIJMEGEN Department THE NEYHERLANDS 7 Computer Graphics Professor Melvin Ferentz, Professor Melvin Ferentz. Brooklyn College of Cuny, x BROOKLYN. NY1L210 Physics Department, U.S.A. Brooklyn College of CUNY. Brooklyn, NY 11210. October 1, 1976. Dear Professor Ferentz, On August 27th a group of more than 30 persons gathered at the University of New South Wales for our first local Users meeting. David Morrison reported on the initial experience of the University of Newcastle with UNIX. They are currently heavily committed to using Basic Under RSTS on a PDP 11/45, and it was the quality of UNIX Basic which principally colored their reactinn. They will undoubtedly be happier after trying the Harvard Software which was described to the meeting hy Peter Ivanov. Ian Johnstone spent some time discussing the security of UNIX. At the School of Electrical Engineering at the University of New South Wales the PNP If is run as an open shop staffed by casual, volunteer student operators. It is almost inpossible to set up file access permissions in such a way that routine operations can be carried out safely (e.g. killing re- -calcitrant programs before shut-down) without leaving a loop-hole for the self-aggrandisemeut of users to super-users. A numher of other modifications have been found necessary: groups have been disabled and "cron", for example, as a willing accomplice in crime, has been banished. However as long as the system consule is accessible the most determined users cannot be preventa! from patching the "suser™ toutine directly. Sectring the code for this routine into ROM would be a step in the right direction. A UNSW implementation of Pascal "S" by John O'Neill, a final year undergraduate, was discussed and the meeting diverted on fort a short while onto the subject of "Pascal" in general. Most participants felt that the meeting was a suceess and another meeting has been planned for February 18th, 1977. It was agreed that there is a real need for cooperation between UNIX users in view of the unconventional nature of UNIX support. Particular concern was expressed regarding the co~-perative acquisition of software frum overseas. Because of the distances involved this presents some difficulties and expense and it would certainly be more convenient for us if one local UNIX licensee, having acquired some item of software could distribute it to other local licensees (subject of course to completion of any required non- disclosure agreements production of DEC licenses, etc.}. We have already attempted to raise this matter with Western Electric but so far have received no resnonse. : Yours sincerely, John Lions P.S. The Australian Computer Society ran UNIX an advertisement under the heading epposite! + 10-2 Beware of icheck -s (or change it). Dear Professor Ferentz, I have been vaguely wondering for a while why everything I wrote seemed so much slower than the commands that came with the Unix system (version 6). Now I know why. Icheck -s will rearrange the freelist of a file system in the order of ascending block numbers, where mkfs initializes the freelist with consecutive entries 3 blocks apart on an RKedisk, or 4 blocks on an RP. After I dumped the system and restored it onto a fresh file system I felt much happier. I have also replaced the routine makefree() in icheck.c with the code reproduced below, which I borrowed from mkfs.c. Note that the change described in Unix Newsletter number 8 (August 1976) has been taken into account. Also note that this icheck -s produces an optimized lay-out for an RF disk, which the original mkfs does not. Ourwadoes of course. . A stumbled upon this discrepancy between mkfs and icheck while doing some measurements to find out what an optimal lay-out of the disk might be. I found myself reinventing the wheel. The measurements were the following. I made an executable file of 24 blocks (and one indirect block), and put it in various ways on one cylinder of an RK disk, with the indirect block in an adjacent cylinder. Exactly the same lay-outs were tried out on the RF disk (with 24 block “cylinders” instead of 8 blocks). I then timed read commands of the whole file at once, as well as exec~s on the file. For both devices the optimum is at a distance of 2 between consec- ve file blocks. With both tests running at the same tine, a distanee of 3 blocks on both devices gave the best results, so Made 4 3000275 those were the numbers I took. . makefree (file) I don't know why the Unix system as it is distributed doesn't char «file; have a special lay-out for the RF disk. At our installation, we ‘reqister char *i, #1: ft have put the /tmp files on the RF disk, which appears to be a good “amnpey ECS Chat wu, #0F i jaan char #high, low: idea, We have to keep the file system on the second RK drive inter- static char adrf[ 109], flaqf 100); changeable, and our RF disk has only one platter, which makes it for{ 1+ file: Os 44) a bit inconvenient’ te put the root directory there. if¢ 4701 see *y. The only relevant measurements for this sort of questions evscer Cul ‘ are of course those obtained from heavy standard loads, or bench n marks simulating such a load. We don't have either. Furthermore, Mees the situation might be altogether different with different or more case 'pt: controllers, or for example with a 60 cycle RF disk, which runs - 20% faster than ours. If anyone has any further ideas or other bi experimental results, I will be very anxious to learn of them. i reak Sincerely yours, qaiciits 3 = } iff n> 199) a = 109; ; Cyeng Rot ci Se Oa a OF, z ‘ flaafiy = 0: q= (George Rolf) for( i Ge Sons AS: wf 33 while( flaafdj}) P= 4D Eng adrfil= 4 Elaafile+; 4 = (ita tns 1 ‘ shlock.s_nfte2 = shiock.s_ninod2 = shlock.s_flock sblock.s_ilock shloct.s_faod = 9 high = sblock. fot{ i = high; lrem(9,iti,n)3 ic-) f if( i < low) break; fraehl (ils } for(s; i >= low # n-t; i S- a) = for( 7 = 9: 7 < 03 4+) in routina check): ae {i-adr{ ahi change makefree{); to makefree (file); forts i wena : burite(1, Ssblock); clos2(fil; freebl{i) : synctt; dat i: 2 retura; { } if ((bmavf (1>>45)407777) & (1<<(14017) )) ==0) frea(iy; 1 Fea, Southern Iflinois University at Carbondale . Carbondale, Illinois 62901 Department of Computer Science October 18, 1976 Professor Melvin Ferentz Physics Department Brooklyn College of CUNY Brooklyn, New York 11210 Dear Prof. Ferentz, Our department has been receiving the UNIX News since this Spring (issue #5 was the first onc we received}. What we have found mest useful are the patches to the software which have been printed. In this light we would like to know if it would be possible to get any back issues that we missed. Any of them would be appreciated. Our dspartment owns a CAL DATA 135 which is emulating a PDP 11/40 on which we are running UNIX. In gencral, UNIX bas ran well on our ‘setup (excluding finding a missing wire on the MMU), but there are a couple of things which | felt were worth mentioning. The first has to do with what happens when the user's stack- pointer is odd (that Is not even, as opposed to unusual), What happens is the CPU goes through the stack error routine (specili- cally, red-stack limit) upon a buss-error, which clears the kernel stack-pointer (even though it was a user-mode error). This locks UNIX into a very tight loop (about 8 instructions long) which is retrap- ping on every attempt to stack something. I cured this by adding the code onthe next page to m40.s. I haven't been able to determine if thia happens on DEC CPUs also, but an easy check would be to ae $1,-6p) ito ok and see if it loops. . 4 [ow (7% ath 10-4 Professor Melvin Ferentz October 18, 1976 - page 2 we The second problem is unlque to CAL DATA systems with the micro-programming option. Accidently executing op-codes 7-17 (octal) causes all sorts of wonderous things to happen, since these are the spare op-codes {including EFM). The easy (?) cure is to load the appropriate ACM locations with a branch to the illegal instruction trap routine and enable it to replace the second page of control memory. A second alternative is to load routines to do common tasks, such as csav and cret, and modify the c-compiler to use those op-codes. One of our people (Carl Ebeling) has been working on this idea so if anybody wants to try it we could send you what be has done so far. Thank you. Sincerely, b. Lay Ray Kohring PS If anybody needs a systems programmer familiar with UNIX starting January 77, please write immediately. Note: This patch tests the stack pointer (kernel) to see if it is zero. If it is, it resets it to the top of the user block (where it probably should be) and copies the ps-pe from 0 to the correct stack locations. If it really is a kernel? Stack error, there will still be a panic. ed m40.s /trap:/ + a é tst sp / 4s the stack pointer zero? bne lf / no, we're still safe clr = 177774 / stack limit register, the ps / was put here by accident mov $142000,sp / restore the sp mov 2,-(sp / restack ps moy 0,-(sp / restack pe elzfele / reset cc's to show buss-error moy ps,-4(sp) / redo properly THE PENNSYLVANIA STATE UNIVERSITY WHITMORE LABORATORY UNIVERSITY PARK, PENNSYLVANIA 16802 College of Science - October 14, 1976 Arca Code B14 ‘Computer Science Department 865-9505 Professor Melvin Ferentz Physics Department Brooklyn College of CUNY Brooklyn, NY 11210 Dear Professor Ferentz: I_ was directed to you by the UNIX documentation as a contact point for the UNIX user's group. If that is no loger appropriate, please forward this letter to whomever now fills that role. The Computer Science Deparment here at Penn State recently acquired a PDP-11/34 and the UNIX system, and we are interested in hearing of and/or participating in the activities of the UNIX user's group. Our system consists of an 11/34 (which includes memory management but no stack limit ception), 96Kb core, a dual-drive RE11, RX11 floppy disk, and an 8-line DZ11 mm. This is a one-cabinet configuration which prices out (after haggling) at around $36K (circa June 1976). We are currently mmning only two typewriters (console and one DLI11) and are in the process of constructing drivers for the RX and DZ. We soon expect to be mmming 6-8 users, and to expand core to 12&. We also have a 120 1/m Potter printer which we hope to interface to the Dz. I should mention that UNIX (specifically rk wuix) will not boot directly on the 11/34; there are minor p ning differences he- tween the 11/40 and the 11/34, nome of h seen to surface when the system rums. However, the 11/34 comes standard with a blank front panel - an on/off switch, but no switch register. This drives the system into an infinite bus timeout trep loop when it tries to print the 'mem=' message. We were able to overcom this by laboriously hand-patching the systen, a process which I will be happy to coach any new user on; I have attached a copy of the procedure to this letter for your files. We have not, to date, had any other problems with incompatabilities, but I will so inform you if they arise, First, you can register us in the UNIX user's group. The contact f Ge: Professor Melvin Ferentz October 14, 1976 Page 2 point is Facilities Chairman Computer Science Department 303 Whitrore Lab, : The Pennsylvania State University University Park, PA 16802 Tel: 814-865-9505 Second, you can put us in contact with any other users who have constructed/are constructing drivers for the RX or DZ. te would be happy to share ideas and/or software; if we are the first and only developers for either device we will be happy to contribute any software we develop when it becomes available. Please inform me of any format restrictios or distribution clearing houses. For your information, I have already informed Ken Thompson at BIL of the switch register problem; I'm not sure what steps he will pa Thank you for your assistance; I look forward to your corres- Sincerely yours, Edward C, Horvath Assistant Professor EQH:dlp Attachment 0 cevow%o see Bringing up UNIX (specifically rkunix) on the PDP-11/34. This document is for users who wish to run UNIX (6th Ed.) on the standard 11/34 - i.e., with the standard front panel. If you have a switch register, the procedure described in ‘setting up UNIX' should work just fine. In any case, this document is a supplement to ‘setting up UNIX’. First, generate the binary code RKO5 pack. We cannot vouch for the proce- dures in 'setting up UNIX’ for doing this from magtape, as we received the system already on RKOS’s. Next, ynu have to locate the first block of ‘rkunix' on the pack. 'rkunix' is a son of ‘root’, which is the root of the directory tree. (See File System (¥) in the UNIX Programmer's Manual). ‘rkunix' is described by inode 198 (base 10), which is the 6th inode of the 13th block of the inode list, which starts at byte 240 (base 8) of logical block 16 (base 8) of the RKOS pack (magic number 21). Note that “rkunix’ is a large file, so addr oO points not at the first block of ‘rkunix', but rather at the block of block pointers for 'rkunix'. On our dis- tribution pack, addr 0 is 2723 {base 8}. This converts to a ‘magic number’ for the RK11, namely 3703 (base 8), which may be deposited in the RKDA register to read the block of pointers. Again, on our distribution pack, the first pointer has value 2675 (base 8) which has magic number 3645 (base 8). If your pack disagrees in any way, calculate your own magic numbers! (Use the RKI] description of RKDA in the peripherals manual). By the ways for magic number xxxx, the following console emulator sequence reads the desired block into core locations 0:777. : 177406 177409 Q XXXX 177404 5 eroeoor Once you have the first block of rkunix loaded in this way, perform the All of the above nonsense can, of course, be obviated if you can beg or ™~ - 5 following sequence: etc. a couple of hours on a 40 or 45, or even get a ‘loaner' front panel from L 346 your friendly DEC repairman, or, best of all, already have a running UNIX system. 00 4 L 377406 In any case, to avoid further heartache, you'll want to recompile the system D 177400 90 ( ber for Ist block) to boot clean. In addition to the steps indicated in /usr/sys/run (watch out D xxxx (magic number for Ist bloc 2 L 177404 for ar!), you should: pew locatin asso] °° “4. Edt /ust/sys/param.h to change the value of SW to a17s '95 BEtuawe SC The above places a halt instruction in_the trap sequence, and writes the P : om We Uf sg, 2. Make sure /usr/sys/ken/prf.c and fusr/sys/ken/sys4.c get recompiled block back out. and replaced in /usr/sys/libt. / Steps thus far need only be done once; what follows is the new boct : P 4 % es The new system should come up clean (ours did!), sequence: 2 1. Type DK, advance the paper, and hit return. The system should respond Ned Horvath Computer Science with @. ee - Penn State 13 October 1976 2. Type 'rkunix' and hit return. The system will flutter a bit, then halt. 3. Hit the boot switch to bring in the emulator, and enter the following Sequences wk On aDP nfs L176 D 100900 L 326 D 5767 alse dunv/ dop.c L 12340 D 176 t L 41236 dav [bec 0176 : : Lo . $ - The above sequence modifies the system to Took at location 176 (base 8) for the contents of the switch register, Toads 176 with 100000 {for a single user system, L176 should be followed by D 173030), repairs the damage we did to the version on the pack, and finally restarts, The sequence described in "setting up UNIX! now applies. ave pe ae — i