Commit Graph

2040 Commits

Author SHA1 Message Date
Bruce Evans
2d2fb1bf6b The %eflags checking introduced in the previous commit was too zealous.
sigreturn() sometimes failed for ordinary returns from signal handlers.
Failures of ordinary returns "can't happen" and are badly handled.
"Temporary" fix: allow users to corrupt PSL_RF.  This is fairly
harmless.  A correct fix would involve saving the old %eflags (and
perhaps the old segment registers) where the user can't get at them.
1995-01-17 01:15:12 +00:00
Joerg Wunsch
988fa8efe3 Roll in my changes to make the cd9660 code understand the older
(original "High Sierra") CD format.  I've already implemented this for
1.1.5.1 (and posted to -hackers), but didn't get any response to it.
Perhaps i'm the only one who has such an old CD lying around...

Everything is done empirically, but i had three of them around (from
different vendors), so there's a high probability that i've got it
right. :)
1995-01-16 17:03:29 +00:00
Justin T. Gibbs
87cf6d44c7 Add $Ids. Use DMA for downloading SCBs to the sequencer. Implement SDTR,
WDTR, and message reject handlers so they don't need to exist in the
sequencer.  All three of these cases are not on the critical path, so it
makes little sense to use up precious sequencer ram for them.
1995-01-16 16:33:47 +00:00
Justin T. Gibbs
344e176820 Add $Id. Recognize motherboard aic7870 based controllers. 1995-01-16 16:31:57 +00:00
Justin T. Gibbs
f61afda9a4 Add $Id 1995-01-16 16:31:34 +00:00
Justin T. Gibbs
0d56403998 At $Ids to all files. Have the sequencer use DMA to tranfer its SCB
(SCSI control block) instead of having the host PIO it down.  Also
reimplement WDTR and SDTR optimization to remove code in the sequencer
and place the responsibility of knowing when to initiate SDTR or WDTR
on the kernel driver.  This vastly shortens the sequencer program yet
yeilds the same performance.
1995-01-16 16:31:21 +00:00
David Greenman
761dd66739 Attempt to close a hole using splhigh/splx. There still appears to be a
serious one in the same area that I don't have time to fix.
1995-01-15 09:35:58 +00:00
David Greenman
7082ec8aa5 Fixed some page table reference count problems; these changes may not be
complete, but should be closer to correct than before.
1995-01-15 09:06:23 +00:00
David Greenman
edfab85b1a Moved some splx's down a few lines in vm_page_insert and vm_page_remove
to make the locking a bit more clear - this change is currently a NOP
as the calls to those routines are already at splhigh().
1995-01-15 07:31:34 +00:00
Garrett Wollman
b60e6e6e9f Some fixes to device configuration, now that I've had a chance to do it
properly from the beginning:

	1) The `kern_devconf' struct should be a part of the driver's
	   `softc' structure (now it is).
	2) The `description' should say what the device actually is,
	   rather than just giving a model number (now it does).
	3) The device should be registered even if the probe fails, so
	   that it can be reconfigured later.
	4) For netifs, the device state should follow the IFF_UP flag.

Other network interfaces should follow this example.  (Please?)  Eventually
there should be a rundown routine doing the equivalent of setting IFF_UP
off, and perhaps more if warranted.
1995-01-15 00:18:17 +00:00
Bruce Evans
20415301cd Fix security holes in sigreturn(), ptrace() and procfs. sigreturn()
attempted to check for insecure and fatal eflags and segment
selectors, but missed many cases and got the IOPL check back to
front.  The other syscalls didn't check at all.

sys_process.c, machdep.c:
Only allow PT_WRITE_U to write to the registers (ordinary and FP).

psl.h, locore.s, machdep.c:
Eliminate PSL_MBZ, PSL_MBO and PSL_USERCLR.  We are not supposed
to assume anything about the reserved bits.  Use PSL_USERCHANGE
and PSL_KERNEL instead.  Rename PSL_USERSET to PSL_USER.

exception.s:
Define a private label for use by doreti when returning to user
mode fails.

machdep.c:
In syscalls, allow changing only the eflags that can be changed on
486's in user mode (no longer attempt to allow benign IOPL changes;
allow changing the nasty PSL_NT; don't allow changing the i586
bits).

Don't attempt to check all the cases involving invalid selectors
and %eip's.  Just check for privilege violations and let the invalid
things cause a trap.

procfs_machdep.c:
Call the ptrace register functions to do all the work for reading
and writing ordinary registers and for single stepping.

trap.c:
Ignore traps caused by PSL_NT being set.  Previously, users could
cause a fatal trap in user mode by setting PSL_NT and executing an
iret, and a fatal trap in kernel mode by setting PSL_NT and making
a syscall.  PSL_NT was cleared too late and not in enough modes to
fix the problem.

Make all traps in user mode (except T_NMI) nonfatal.

Recover from traps caused by attempting to load invalid user
registers in doreti by restarting the traps so that they appear to
occur in user mode.
---

Fix bogons that I noticed while fixing the above:

psl.h:
Fix some comments.

Uniformize idempotency ifdef.

exception.s, machdep.c:
Remove rsvd[0-14].  rsvd0 hasn't been reserved since the 486 came
out.  Replace rsvd0 by `align'.  rsvd[0-11] used wrong (magic
non-unique) trap numbers.  Replace rsvd[1-14] by rsvd.

locore.s:
Enable alignment check flag on 486's and 586's.

machdep.c:
Use a better type for kstack[].

Use TFREGP() to find the registers.

Reformat ptrace functions from SEF to something closer to KNF.

procfs_machdep.c:
The wrong pointer to the registers got fixed as a side effect.

Implement reading and writing of FP registers.

/proc/*/*regs now work (only) for processes that are in memory.

Clean up comments.

trap.c, trap.h:
Remove unused trap types.
1995-01-14 13:20:26 +00:00
Bruce Evans
3831ab07f8 Define some public labels for use by trap(). 1995-01-14 11:00:27 +00:00
Jordan K. Hubbard
9949564470 Remove bogus scd0 driver - I should have looked at LINT first, anyway. 1995-01-14 10:48:56 +00:00
Bruce Evans
3117fbd98e Enable define of CR0_AM to prepare for implementing alignment checking.
Uniformize idempotency ifdef.
1995-01-14 10:44:55 +00:00
Bruce Evans
c277f99332 Declare a real `struct fpreg' to prepare for implementing reading and
writing of FP regs for procfs.

Uniformize idempotency ifdef.
1995-01-14 10:41:41 +00:00
Bruce Evans
1e1a3d012d Remove reference to impossible trap type T_KDBTRAP. We don't support
watchpoints.

Uniformize idempotency ifdef.
1995-01-14 10:34:52 +00:00
Bruce Evans
9bf308efab Eliminate T_KDBTRAP, which will soon go away. It was only used for an
unreachable case label in kdb_trap().

Use the correct case labels in kdb_trap() so that normal ddb entry doesn't
print a message.

Change all printf's to db_printf's.  Now you can put a breakpoint at printf,
and ddb entry messages don't spam the syslog output.

Cosmetic:

Use ISPL() instead of magic numbers.

Don't compile the unused function kdb_kbd_trap().

Improve some asms.

Print the arg to Debugger().
1995-01-14 10:24:48 +00:00
Jordan K. Hubbard
d9584d768f Change DISTRIBUTION names. Also make bsd.doc.mk go to doc distribution,
not bin.  Hmmm.
1995-01-14 07:51:10 +00:00
David Greenman
92c385361b Add missing object_lock/unlock. 1995-01-14 04:58:53 +00:00
Jordan K. Hubbard
0dd1eea105 Put UCONSOLE back - I was wrong, it's still used in one last place.
Submitted by:	ollivier
1995-01-14 02:39:22 +00:00
Søren Schmidt
2a13b58b61 Oops, forgot one change when DDB is defined. 1995-01-13 17:13:13 +00:00
David Greenman
b9921222a2 Protect a qcollapse call with an object lock before calling. The locks
need to be moved into the qcollapse and rcollapse routines, but I don't
have time at the moment to make all the required changes...this will do
for now.
1995-01-13 13:30:24 +00:00
Andrey A. Chernov
b9937fcc84 Use (n - 1) in ESC [ xxx d and ESC [ xxx ` 1995-01-13 03:19:22 +00:00
Justin T. Gibbs
b6b99cabea Point dependancy to i386/scsi 1995-01-13 02:29:14 +00:00
Justin T. Gibbs
01ce9c8620 Point include to i386/scsi 1995-01-13 02:27:08 +00:00
Justin T. Gibbs
deefdf55f5 Generic support for the entire aic7x70 line of adaptors. No one else
came up with a directory place ment more me, so now we have i386/scsi.
1995-01-13 02:24:31 +00:00
Justin T. Gibbs
451ab98ff3 Add in aic7770.c (EISA/VL Adaptors) and aic7870.c (PCI adaptor) dependancies
for the ahc driver.
1995-01-13 02:23:27 +00:00
Justin T. Gibbs
20c5e65572 Full support for 294x and Wide devices. Fixed month old bug in the SCSI
sense retrieval code that messed up CDROM devices.  This code will also
responde correctly to SDTR and WDTR messages from devices that start a
negotiation sequence.
1995-01-13 02:22:11 +00:00
Andrey A. Chernov
9db2473d62 Back out cursor wrap (restore original thing)
Submitted by: Bill Paul
1995-01-12 20:14:28 +00:00
Joerg Wunsch
dac0f2dbc1 Argl!, finally found this bummer. The code testing for a write-
protected drive at open() time has been *totally bogus*!  The guy who
submitted it didn't understand all the implications of calling
set_motor(), and the `who' who included the patch into the tree did it
blindly...  Pleeeeze, don't commit code to this driver unless you are
really going to understand what it does!  This one caused me to pull
out even more hears, and those who know me do know that i ain't got
too many o'them. :-)
1995-01-12 19:20:28 +00:00
Jordan K. Hubbard
09c42f85eb 1. Remove UCONSOLE. This appears to be well and truly dead (unless it's
hiding someplace in /sys I can't find).
2. Remove NCONS.  Soren's latest changes make it a no-op.
1995-01-12 15:37:16 +00:00
Stefan Eßer
cde24835d3 Submitted by: Mikael Hybsch <micke@dynas.se>
Add support for NCR 53c815 PCI SCSI chip.
1995-01-12 14:01:13 +00:00
Ugen J.S. Antsilevich
564fbfe5c2 Checking new lkm structure.. 1995-01-12 13:57:51 +00:00
Ugen J.S. Antsilevich
4dd1662b4c Actual firewall change.
1) Firewall is not subdivided on forwarding / blocking chains
   anymore.Actually only one chain left-it was the blocking one.
2) LKM support.ip_fwdef.c is function pointers definition and
goes into kernel along with all INET stuff.
1995-01-12 13:06:32 +00:00
Ugen J.S. Antsilevich
c5d5269fa6 here ip_fw.c lived once..correct me if i am wrong but
i think it shopuld be in conf/files
1995-01-12 13:05:00 +00:00
Ugen J.S. Antsilevich
bd41022924 Firewall files & accounting added here.
ip_fwdef.c is support for ipfw lkm module
and should be compoiled always with 'options inet'.
1995-01-12 13:04:23 +00:00
Ugen J.S. Antsilevich
ad6e6b7d58 Firewall can be used as lkm module.To use it
firewall should *NOT* be compiled into kernel.
Then it can  be loaded.This is misc module but i'v
got no problemms with it,so shouldn't you i suppose..
BTW this is very stupid to have one module in CVS
for ALL lkm's...
1995-01-12 13:03:02 +00:00
Søren Schmidt
6378775666 First round in syscons update. Several new features has been added:
No kernel config options anymore besides keyboard language layout.
Virtual consoles are now dynamically allocated, no NCONS anymore.
Software cursor blinking/nonblinking.
Visual bell for laptops (don't beep at meetings :-).
Cursor/bell default type setable via config "flags" instead of as defines.
Cursor/bell type setable via ioctl's.
New video modes 80x30 80x60 for some laptops, and those with multisync monitors.
Scroll-lock history (length currently fixed at 100 lines).
Lots of cleanups, some only commented out for now (will goaway soon).
Support for new features in vidcontrol/kbdcontrol.
Updated manpages.
1995-01-12 11:47:05 +00:00
David Greenman
aedcdea1de Fixed mbuf lossage when level != IPPROTO_IP. Problem reported by Robert
Dobbs, hint from Charles Hannum, fix by me.
1995-01-12 10:53:25 +00:00
David Greenman
ec2bb6ade1 Increase maxfiles to NPROC*2. This makes the per-process open file limit
highly bogus, however, and this needs to be fixed.
1995-01-12 03:38:12 +00:00
David Greenman
8b4dd3c473 Improve my previous change to use the same tests as are used in qcollapse. 1995-01-11 20:19:20 +00:00
David Greenman
a748978457 Fixed a panic that Garrett reported to me...the OBJ_INTERNAL flag wasn't
being cleared in some cases for vnode backed objects; we now do this in
vnode_pager_alloc proper to guarantee it. Also be more careful in the
rcollapse code about messing with busy/bmapped pages.
1995-01-11 20:00:10 +00:00
Jordan K. Hubbard
6722294de8 Change GENERIC to SWAP_GENERIC for now. I need the GENERIC kernel to
build by default again!  When the furor subsides, maybe something better
can be done, but..
1995-01-11 17:51:26 +00:00
Joerg Wunsch
dc16046f96 Finally implement support for the `lsdev' program. The controller is
now marked busy as long as it's being in non-reset state, and the
drives are busy as long as at least one instance is open.

Also reformat everything to fit into 80 columns again.

Changed my mind wrt. error reporting for a write-protected drive and
an open() with write intent; ENXIO has been too weird, now return EIO.
Some portions of the code need to be rewritten to use tprintf()
instead of simple printf()'s, so the messages will also appear on the
session terminal, however.
1995-01-11 16:13:01 +00:00
David Greenman
c3d05da5e3 MFS doesn't bother to associate a struct mount with the vnode...so work
around this by not trying to cluster this type of I/O.

Submitted by:	John Dyson
1995-01-11 01:53:18 +00:00
David Greenman
f295740e4d Fix conversion to/from nfs v2 time in handling microseconds.
Submitted by:	rick@snowhite.cis.uoguelph.ca
1995-01-10 13:11:42 +00:00
David Greenman
740c65cfec Added two missing brelse() calls.
Submitted by:	rick@snowhite.cis.uoguelph.ca
1995-01-10 13:06:51 +00:00
Jordan K. Hubbard
ed4a82f717 Latest update from Serge Vakulenko <vak@cronyx.ru>
Submitted by:	vak
1995-01-10 11:41:28 +00:00
David Greenman
5943df8331 PG_FAKE is no longer used - so don't bother to clear it. 1995-01-10 09:20:34 +00:00
David Greenman
a776a317e9 Kill VM_PAGE_INIT macro as it is only used once and makes the code more
difficult to understand. Got rid of unused vm_page flags.
1995-01-10 09:19:52 +00:00