Bruce Evans [Tue, 16 Dec 1997 17:37:23 +0000 (17:37 +0000)]
Fixed DPADD.
Don't override the (correct) default for SRCS or MAN1.
Replaced bogus Lite1 (?) Id by $Id$. The key server files were
mis-imported so it is hard to tell where they came from, but at
least in Lite2 they don't have useful Makefiles, and I rewrote
most of the Makefile.
Bruce Evans [Tue, 16 Dec 1997 16:36:43 +0000 (16:36 +0000)]
Fixed DPADD. ${LIBGCC} must be added explicitly since the default
linkage rule is overridden. The -L option must be in ${DPADD} so that
`make checkdpadd' works. Actually use ${DPADD}.
FIxed missing dependencies for doscmd. Use ${LIBCRT0} instead of a
hard-coded path in the rule for doscmd.
Added comments about the kludges used to build 2 binaries and 2 data
files in one directory. It shouldn't be done this way. The dependencies
on sources took extra work to get right, and the dependencies on objects
are still broken (one set is missing and the other has the wrong libs).
Fixed some style bugs while I'm here:
- don't override the (correct) default for MAN1.
- use `beforeinstall', not `afterinstall' to install auxiliary files.
`afterinstall' is for fixing messes made by `install'.
David Greenman [Tue, 16 Dec 1997 15:40:29 +0000 (15:40 +0000)]
Fix bug where a struct buf was free()'d back to the system malloc pool.
Quite amazing that the system runs at all with this bug. Also present in
2.2.5. The bug appears to have come in with changes in rev 1.53.
KATO Takenori [Tue, 16 Dec 1997 10:22:49 +0000 (10:22 +0000)]
Don't use PG_N if EPSON PC-486HX/HG/HA (PC-9801 compatible) are
detected. These machine cannot make L2 cache write-through by PG_N,
and only I/O access (undocumented) can do that. If PG_N is used,
system hangs.
Brian Somers [Mon, 15 Dec 1997 20:21:15 +0000 (20:21 +0000)]
Do 2 passes when "delete all"ing. The first pass removes
all RTF_WASCLONED routes, and the second removes the
others. This avoids the situation where we've added an
RTF_CLONING route (such as ``default''), created some
clones, then deleted the CLONING route before the
WASCLONED route(s). Without the two passes, we get
errno (not rtm_errno) set to ESRCH when deleting the
WASCLONED route, despite the deletion succeeding !
Also:
Enhance the route operation failure diagnostics.
Make portability #ifdefs a bit more generic.
Garrett Wollman [Mon, 15 Dec 1997 03:09:59 +0000 (03:09 +0000)]
Add support for poll(2) on files. vop_nopoll() now returns POLLNVAL
if one of the new poll types is requested; hopefully this will not break
any existing code. (This is done so that programs have a dependable
way of determining whether a filesystem supports the extended poll types
or not.)
The new poll types added are:
POLLWRITE - file contents may have been modified
POLLNLINK - file was linked, unlinked, or renamed
POLLATTRIB - file's attributes may have been changed
POLLEXTEND - file was extended
Note that the internal operation of poll() means that it is impossible
for two processes to reliably poll for the same event (this could
be fixed but may not be worth it), so it is not possible to rewrite
`tail -f' to use poll at this time.
Tor Egge [Mon, 15 Dec 1997 02:18:35 +0000 (02:18 +0000)]
Add support for low resolution SMP kernel profiling.
- A nonprofiling version of s_lock (called s_lock_np) is used
by mcount.
- When profiling is active, more registers are clobbered in
seemingly simple assembly routines. This means that some
callers needed to save/restore extra registers.
- The stack pointer must have space for a 'fake' return address
in idle, to avoid stack underflow.
John Birrell [Mon, 15 Dec 1997 02:12:42 +0000 (02:12 +0000)]
Fix recursion problem which occurs when a signal is received during
a malloc. The signal handler creates a thread which requires a malloc...
For now, the only thing to do is to block signals. When we move user
pthreads to use the kernel threads, mutexes will be implemented in kernel
space and then malloc can revert.
John Polstra [Sun, 14 Dec 1997 19:36:24 +0000 (19:36 +0000)]
Make gzipped dynamically linked executables work again. There was
an old bug here that failed to copy the a.out header into memory
properly. It didn't matter until changes were made recently to
the dynamic linker.
Mike Smith [Sun, 14 Dec 1997 03:17:54 +0000 (03:17 +0000)]
As described by the submitter:
- emulate Linux IP_HDRINCL behaviour in sendto(): byte order fixed
Note that we do an extra getsockopt() on every sendto()
to check if the option is set because we don't keep state
in the emulator code. Is there a better way to implement
this?
- correct a bug (value of "name" not passed) with
getsockopt()
Mike Smith [Sun, 14 Dec 1997 03:15:21 +0000 (03:15 +0000)]
As described by the submitter:
... fix a bug with orecvfrom() or recvfrom() called with
the MSG_COMPAT flag on kernels compiled with the COMPAT_43 option.
The symptom is that the fromaddr is not correctly returned.
John Dyson [Sun, 14 Dec 1997 02:11:23 +0000 (02:11 +0000)]
After one of my analysis passes to evaluate methods for SMP TLB mgmt, I
noticed some major enhancements available for UP situations. The number
of UP TLB flushes is decreased much more than significantly with these
changes. Since a TLB flush appears to cost minimally approx 80 cycles,
this is a "nice" enhancement, equiv to eliminating between 40 and 160
instructions per TLB flush.
Changes include making sure that kernel threads all use the same PTD,
and eliminate unneeded PTD switches at context switch time.
Bruce Evans [Sat, 13 Dec 1997 13:49:59 +0000 (13:49 +0000)]
Fixed EOF handing.
1. SS_CANTRCVMORE was initially set on the wrong socket, so reads
when there has never been a writer on the socket did not return 0.
Note that such reads are only possible if the fifo was opened in
(O_RDONLY | O_NONBLOCK) mode.
2. SS_CANTSENDMORE was initially set on the wrong socket, but this
was harmless because the wrong socket is never sent from and there
is no need to set the flag initially on the right socket (since open
in (O_WRONLY | O_NONBLOCK) mode fails if there is no reader...).
3. SS_CANTRCVMORE was cleared when read() returns. This broke the
case where read() returns 0 - subsequent reads are supposed to
return 0 until a writer appears. There is no need to clear the
flag when read() returns, since it is cleared correctly when a
writer appears.
Bruce Evans [Sat, 13 Dec 1997 12:58:09 +0000 (12:58 +0000)]
Restored fifo_pathconf() from rev.1.32. vop_stdpathconf() is too
general to be of much use. Using it here weakened the _PC_MAX_CANON,
_PC_MAX_INPUT and _PC_VDISABLE cases.
fifo_pathconf() is not quite correct either. _PC_CHOWN_RESTRICTED
and _PC_LINK_MAX should be handled by the host file system. For
directories, the host file system should let us handle _PC_PIPE_BUF.
Bruce Evans [Sat, 13 Dec 1997 12:30:34 +0000 (12:30 +0000)]
Restored ufs_pathconf() from rev.1.61. vop_stdpathconf() is too
general to be of much use. Using it here broke the _PC_NAME_MAX,
_PC_NO_TRUNC and _PC_PATH_MAX cases, and weakened the _PC_MAX_CANON,
_PC_MAX_INPUT and _PC_VDISABLE cases.
Wolfgang Helbig [Sat, 13 Dec 1997 11:51:16 +0000 (11:51 +0000)]
Delete "typedef ... date" (see style(9)).
In the man page Use ".Pp" instead of blank lines, adopt English
and stress that the Julian->Gregorian switch took place at
different dates in different countries.
Suggested by: Garrett.
Mike Smith [Sat, 13 Dec 1997 09:57:48 +0000 (09:57 +0000)]
This framework builds the 'minigzip' sample program supplied with
libz. It is a non-GPL-polluted minimal implementation of the 'gzip'
command, yielding a 12k executable (vs ~100k for gzip).
Sean Eric Fagan [Sat, 13 Dec 1997 03:13:49 +0000 (03:13 +0000)]
Change the ioctls for procfs around a bit; in particular, whever possible,
change from
ioctl(fd, PIOC<foo>, &i);
to
ioctl(fd, PIOC<foo>, i);
This is going from the _IOW to _IO ioctl macro. The kernel, procctl, and
truss must be in synch for it all to work (not doing so will get errors about
inappropriate ioctl's, fortunately). Hopefully I didn't forget anything :).
Brian Somers [Sat, 13 Dec 1997 02:37:33 +0000 (02:37 +0000)]
Allow random IP number allocation to peer.
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).
Up the version number (1.5 -> 1.6).
Cosmetic:
Log unexpected CCP packets in the CCP log rather than the ERROR log.
Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
than the ERROR log.
Log failed route additions and deletions with WARN, not TCPIP.
Log the option id and length for unrecognised IPCP options.
Change some .Sq to .Ar in the man page.
Bruce Evans [Fri, 12 Dec 1997 17:58:31 +0000 (17:58 +0000)]
MF22 (oops, I committed it to the wrong tree yesterday).
Changed lots of %ld's in format strings back to %d. %ld was right
when daddr_t was long, but Lite2 changed daddr_t to int32_t which
is implemented as `int' on i386's.
Peter Wemm [Fri, 12 Dec 1997 14:08:50 +0000 (14:08 +0000)]
I've been using these tweaks to enable the sound driver to talk to the
(mutant) Crystal CSS4236 chip on the Intel PR440FX SMP motherboard.
XXX this uses some rather ugly PnP bootstrap code that is *NOT* compatable
with 'controller pnp0' or *ANY* other PnP devices. If you use some other
PnP devices, enabling css0 will burn your house down. :-] The
"simplified" PnP init sequence directly blats your config(8) settings onto
the chip. I'm pretty sure 'css0' will conflict with 'mss0', this whole
area desperately needs a cleanup.
I have been using the following with some success on the PR440FX:
controller snd0
device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
device opl0 at isa? port 0x388
device mpu0 at isa? port 0x330 irq 10 vector mpuintr
John Dyson [Fri, 12 Dec 1997 04:00:59 +0000 (04:00 +0000)]
We have had support for running the kernel daemons as threads for
quite a while, but forgot to do so. For now, this code supports
most daemons running as kernel threads in UP kernels, and as
full processes in SMP. We will soon be able to run them as
threads in SMP, but not yet.
Sean Eric Fagan [Fri, 12 Dec 1997 03:33:43 +0000 (03:33 +0000)]
Fix a problem with procfs_exit() that resulted in missing some procfs
nodes; this also apparantly caused a panic in some circumstances.
Also, since procfs_exit() is getting rid of the nodes when a process
exits, don't bother checking for the process' existance in procfs_inactive().