Commit Graph

49901 Commits

Author SHA1 Message Date
Daniel C. Sobral
8f9e434f46 altoffset() always returned whenever it recursed, because at the end
of the processing of the recursion, "scan" would be pointing to O_CH
(or O_QUEST), which would then be interpreted as being the end character
for altoffset().

We avoid this by properly increasing scan before leaving the switch.

Without this, something like (a?b?)?cc would result in a g->moffset of
1 instead of 2.

I added a case to the soon-to-be-imported regex(3) test code to catch
this error.
2000-07-09 17:45:30 +00:00
Daniel C. Sobral
b6c1a56180 Since g->moffset points to the _maximum_ offset at which the must
string may be found (from the beginning of the pattern), the point
at which must is found minus that offset may actually point to some
place before the start of the text.

In that case, make start = start.

Alternatively, this could be tested for in the preceding if, but it
did not occur to me. :-)

Caught by: regex(3) test code
2000-07-09 17:36:53 +00:00
Mark Murray
f700468d0a The World Order has changed. We no longer need separate "secure"
collections for crypto code; these are merged into cvs-all and
src-all.
OKed by:	jdp
2000-07-09 16:03:53 +00:00
Mark Murray
43975bd56c Make sure that tasks (running out of taskqueue_swi at splsofttq)
are not interfered with by the harvester.
2000-07-09 16:00:31 +00:00
Alexander Langer
d0a28baf34 Add missing "a" in "Soft updates is technique".
PR:		19770
Submitted by:	Udo Erdelhoff <ue@nathan.ruhr.de>
2000-07-09 15:44:02 +00:00
Daniel C. Sobral
517bffca1b Add some casts here and there. 2000-07-09 15:12:28 +00:00
Poul-Henning Kamp
832505d0c9 Turn malloc options "AJ" on by default.
These will be turned off again as we approach 5.0-RELEASE.

If you benchmark things, make sure to
	ln -sf j /etc/malloc.conf
to see "true" performance.
2000-07-09 13:10:18 +00:00
Jun-ichiro itojun Hagino
b474779f46 be more cautious about tcp option length field. drop bogus ones earlier.
not sure if there is a real threat or not, but it seems that there's
possibility for overrun/underrun (like non-NOP option with optlen > cnt).
2000-07-09 13:01:59 +00:00
MIHIRA Sanpei Yoshiro
e63b255aa6 add Shining PMIDE-ASC CDROM
PR:	19236
2000-07-09 12:51:05 +00:00
Alexander Langer
d61e6649d5 Since this file is doc now, reorganize its structure.
Currently, many drivers support more than one bus of ISA, EISA, MCA,
PCI.

Before this commit, we had, for example, some SCSI devices listed more
than once, iirc, some up to three times (ISA/EISA, MCA, PCI).

Since now the "device" line is common for all of them and they only
differ for the hints stuff, I did the following:

First, list Busses: (E)ISA, MCA, PCI and explain, that only ISA
needs the hints stuff.

Move NIC/SCSI stuff, which were the only split sections, behind these
stuff.  Describe all drivers only one time and list all supported
chips.

List all device (+ hints for ISA, if possible).

I've also added few additional supported chips to some drivers, xl for
example and some SCSI drivers.

Also, softupdates is no longer disabled by default, so the comment should
not say, it's not enabled by default due to license issues.

Approved by:	asmodai

To come:	include PAO devices (imp volunteered for help)
2000-07-09 12:34:53 +00:00
Mark Murray
11197ed12c Small style change; make function names less likely to clash with
existing names. "null" is too common a string; use "null_".
2000-07-09 12:29:24 +00:00
Mark Murray
a909184e9d Add entropy-harvesting calls.
/dev/random now has new-and-improved entropy!
2000-07-09 12:26:38 +00:00
Mark Murray
585ebe2b41 Yarrow tweaks; separate the fast and slow reseed tasks so that they don't
stomp on each other; provide constant names (as enums) for the harvester
to use (makes it more self-documenting).
2000-07-09 11:52:12 +00:00
Mark Murray
769afb047c Fix bug with a vraiable that needs to be per-process, not static;
fix formatting of long macros.

Pointed out by:	bde
2000-07-09 11:49:07 +00:00
Jun-ichiro itojun Hagino
595b8a1cdd repair IPV6_JOIN_GROUP to IPv6 all multi.
From: ume
2000-07-09 11:17:17 +00:00
Dag-Erling Smørgrav
ec850e74c0 Don't segfault if given an invalid URL (doh!)
Submitted by:		green
2000-07-09 10:14:22 +00:00
Jun-ichiro itojun Hagino
ec20fe00cc reject empty scopeid. use strtoul() for checking all-numericness of
portname.  explicitly reject empty numeric portname.
sync with kame.  based on comments from itohy@netbsd.org
2000-07-09 06:10:01 +00:00
Andrey A. Chernov
39b31d1322 Fix assembler error messages - there is no \n allowed in __COPYRIGHT macro 2000-07-09 05:22:51 +00:00
Jun-ichiro itojun Hagino
1364bf4a47 use advanced API (-DADVAPI).
From: tkatayam@pi.titech.ac.jp (KATAYAMA, Takeo)
2000-07-09 03:07:48 +00:00
Wilfredo Sanchez
023944f435 Use __RCSID() 2000-07-09 02:54:54 +00:00
Matt Jacob
6e95418137 Thanks for Andrew Gallatin pointing out that freeing contigmalloc'd
items via free is bad.
2000-07-09 00:18:21 +00:00
Wilfredo Sanchez
480a6f5ceb Use __RCSID() 2000-07-09 00:08:47 +00:00
Wilfredo Sanchez
1ae30690d2 Initialize variable 2000-07-09 00:05:09 +00:00
Matt Jacob
9215675bc3 Use %p to print a pointer. 2000-07-08 23:24:08 +00:00
Wilko Bulte
96bdb85ebd Add some info on SCSI for PC164.
Submitted by: naddy@unix-ag.uni-kl.de
2000-07-08 19:49:47 +00:00
Daniel Harris
9559d2b084 First appeared in 2.9BSD, not 3.0.
PR:		19263
Submitted by:	NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
Obtained from:	Open|NetBSD
2000-07-08 18:17:12 +00:00
Daniel Harris
00f1e9626b Typo: "is unreliably by default" to "is unreliable by default".
PR:		19411
Submitted by:	Benno Rice <benno@netizen.com.au>
2000-07-08 14:12:34 +00:00
Daniel C. Sobral
6d902efe43 Since we have modified charjump to be CHAR_MIN-based, we have to
correct the offset when we free it.

Caught by: phkmalloc
2000-07-08 09:45:17 +00:00
Dag-Erling Smørgrav
0b474bc608 Clarify the meaning of -m and -n (thanks to bde). 2000-07-08 09:34:53 +00:00
Dag-Erling Smørgrav
bb11a878ea Straighten out the behvaiour of -m and -n (thanks to bde).
Check that stderr, not stdout, is a tty (thanks to green).
2000-07-08 09:34:33 +00:00
Dag-Erling Smørgrav
51e3d46ec0 Don't assume the remote address in a 227 reply is enclosed in parentheses. 2000-07-08 09:27:47 +00:00
Peter Wemm
c87a63c10f Initial kenv(1) hack for dumping the kernel environment. This can be
used to extract modified boot hints to make loader(8)-time changes
"sticky".  It tries to use \ style quoting so that it can be used directly
with foo.conf files.  It can also extract specific variables.
2000-07-08 08:33:40 +00:00
Dag-Erling Smørgrav
4c060eb855 Forced commit to note that I meant authorization, not authentication. 2000-07-08 08:12:54 +00:00
Dag-Erling Smørgrav
4d029f13b4 Fix basic authentication, and add proxy authentication.
Submitted by:	se
2000-07-08 08:08:58 +00:00
Poul-Henning Kamp
5de7f65fc9 We don't do blockdevices any more.
XXX: should use /dev/MAKEDEV
2000-07-08 07:46:01 +00:00
Matt Jacob
64ed91d595 Update SCSI device section, per Peter Wemm. I still
think the commented entries in GENERIC are the
right thing to do.
2000-07-08 07:44:01 +00:00
Matt Jacob
62d132e3ab Oops- remove the '0' appended to targbh. 2000-07-08 07:05:40 +00:00
Matt Jacob
a4846ce28f Add in the commented out SCSI device entries of
#device         ses             # SCSI Environmental Services (and SAF-TE)
#device         targ            # SCSI Target Mode Code
#device         targbh          # SCSI Target Mode Blackhole Device
#define         pt              # SCSI Processor Target Device

so that people know that they are there.
2000-07-08 07:05:06 +00:00
Matt Jacob
94ad21f31a Add in the commented out SCSI device entries of
#device         ses             # SCSI Environmental Services (and SAF-TE)
#device         targ            # SCSI Target Mode Code
#device         targbh0         # SCSI Target Mode Blackhole Device
#define         pt              # SCSI Processor Target Device

so that people know that they are there.
2000-07-08 07:02:58 +00:00
Hajimu UMEMOTO
1c60903414 Make telnet -s work. It is corresponding to EAI_NONAME -> EAI_NODATA
change (getaddrinfo.c rev 1.12).
2000-07-08 05:22:00 +00:00
Will Andrews
f8c9c11c5c Fix the exit code for the case where nentries == 0; if a PID doesn't exist,
ps(1) should not be returning a success code (0), it should return an
error code (1).  This was fixed on OpenBSD over 3 years ago.

PR:		19069
Submitted by:	Jim Sloan <odinn@atlantabiker.net>
Reviewed by:	rwatson
2000-07-08 05:13:10 +00:00
John Polstra
59a821dae2 Change the dllockinit() interface from "experimental" to
"deprecated" and warn that it will disappear eventually.
2000-07-08 04:17:28 +00:00
John Polstra
630df077ab Solve the dynamic linker's problems with multithreaded programs once
and for all (I hope).  Packages such as wine, JDK, and linuxthreads
should no longer have any problems with re-entering the dynamic
linker.

This commit replaces the locking used in the dynamic linker with a
new spinlock-based reader/writer lock implementation.  Brian
Fundakowski Feldman <green> argued for this from the very beginning,
but it took me a long time to come around to his point of view.
Spinlocks are the only kinds of locks that work with all thread
packages.  But on uniprocessor systems they can be inefficient,
because while a contender for the lock is spinning the holder of the
lock cannot make any progress toward releasing it.  To alleviate
this disadvantage I have borrowed a trick from Sleepycat's Berkeley
DB implementation.  When spinning for a lock, the requester does a
nanosleep() call for 1 usec. each time around the loop.  This will
generally yield the CPU to other threads, allowing the lock holder
to finish its business and release the lock.  I chose 1 usec. as the
minimum sleep which would with reasonable certainty not be rounded
down to 0.

The formerly machine-independent file "lockdflt.c" has been moved
into the architecture-specific subdirectories by repository copy.
It now contains the machine-dependent spinlocking code.  For the
spinlocks I used the very nifty "simple, non-scalable reader-preference
lock" which I found at

  <http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html>

on all CPUs except the 80386 (the specific CPU model, not the
architecture).  The 80386 CPU doesn't support the necessary "cmpxchg"
instruction, so on that CPU a simple exclusive test-and-set lock
is used instead.  80386 CPUs are detected at initialization time by
trying to execute "cmpxchg" and catching the resulting SIGILL
signal.

To reduce contention for the locks, I have revamped a couple of
key data structures, permitting all common operations to be done
under non-exclusive (reader) locking.  The only operations that
require exclusive locking now are the rare intrusive operations
such as dlopen() and dlclose().

The dllockinit() interface is now deprecated.  It still exists,
but only as a do-nothing stub.  I plan to remove it as soon as is
reasonably possible.  (From the very beginning it was clearly
labeled as experimental and subject to change.)  As far as I know,
only the linuxthreads port uses dllockinit().  This interface turned
out to have several problems.  As one example, when the dynamic
linker called a client-supplied locking function, that function
sometimes needed lazy binding, causing re-entry into the dynamic
linker and a big looping mess.  And in any case, it turned out to be
too burdensome to require threads packages to register themselves
with the dynamic linker.
2000-07-08 04:10:38 +00:00
John Polstra
517191eede When installing the dynamic linker, save the previous version in
"ld-elf.so.1.old".  The dynamic linker is a critical component of
the system, and it is difficult to recover if it is damaged and
there isn't a working backup available.  For instance, parts of
the toolchain such as the assembler are dynamically linked, making
it impossible to build a new dynamic linker if the installed one
doesn't work.
2000-07-08 03:27:54 +00:00
Kirk McKusick
cc3962a9cd Delete README as it is now obsolete. Relevant information is in
README.softupdates.
2000-07-08 02:32:49 +00:00
Kirk McKusick
876578906d Update to reflect current status. 2000-07-08 02:31:21 +00:00
Andrew Gallatin
19a6b3fea6 use contigfree() rather than free() to free memory allocated with
contigmalloc().

reviewed by: wpaul
2000-07-08 00:14:12 +00:00
Brian Feldman
7ceba2d755 Remove two micro-pessimizations I made. Bruce is teaching me well :)
KTRPOINT(p, KTR_GENIO) is more uncommon than error == 0, so it should
be first in the && statement.
2000-07-07 22:11:37 +00:00
Brian Feldman
9d1cfdce2a Change that &@!$# UIO_READ to be UIO_WRITE. I tested the ktrace stuff,
but somehow... pass the pointy hat, again!
2000-07-07 21:52:15 +00:00
Hajimu UMEMOTO
eea0015e6d One more EAI_NONAME -> EAI_NODATA issue. 2000-07-07 21:05:55 +00:00