Commit Graph

84239 Commits

Author SHA1 Message Date
Jake Burkholder
fabf7ce58c Removed unused pmap_qenter_flags. 2002-12-21 10:04:14 +00:00
Jake Burkholder
fe1998ec51 Make the atomic arithmetic functions return the old value, since they're
all implemented with cas anyway.
2002-12-21 08:53:26 +00:00
Rob Braun
5fb691beab Reduce libc.so's memory footprint by lazily allocating memory used internally
by basename() and dirname().
Reviewed by: eric
2002-12-21 07:12:35 +00:00
Tim J. Robbins
2226ce021a Import newer versions of div() and ldiv() from NetBSD which handle
the -fpcc-struct-return calling convention properly instead of
returning garbage. This may break backwards compatibility with some old
binaries that were compiled when -fno-pcc-struct-return was the default.
2002-12-21 05:11:39 +00:00
David E. O'Brien
cf47cae1f5 -mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.
2002-12-21 02:03:31 +00:00
Marcel Moolenaar
551d79e177 Fix multiple registration of the elf_legacy_coredump sysctl variable.
The duplication is caused by the fact that imgact_elf.c is included
by both imgact_elf32.c and imgact_elf64.c and both are compiled by
default on ia64. Consequently, we have two seperate copies of the
elf_legacy_coredump variable due to them being declared static, and
two entries for the same sysctl in the linker set, both referencing
the unique copy of the elf_legacy_coredump variable. Since the second
sysctl cannot be registered, one of the elf_legacy_coredump variables
can not be tuned (if ordering still holds, it's the ELF64 related one).

The only solution is to create two different sysctl variables, just
like the elf<32|64>_trace sysctl variables. This unfortunately is an
(user) interface change, but unavoidable. Thus, on ELF32 platforms
the sysctl variable is called elf32_legacy_coredump and on ELF64
platforms it is called elf64_legacy_coredump. Platforms that have
both ELF formats have both sysctl variables.

These variables should probably be retired sooner rather than later.
2002-12-21 01:15:39 +00:00
Tim J. Robbins
aed62c0980 Remove unimplemented System V options from the getopt() option string. 2002-12-21 00:38:14 +00:00
Matthew Dillon
10e6b321d0 Revamp the way rc.diskless1 creates and populates memory filesystems. Make
the whole thing generic.  That is, /conf/base, /conf/default,
/conf/${ipba}, and /conf/${ip} are all handled the same way.

Introduce an NFS remounting feature via the /conf/base/<dir>/diskless_remount
so you can avoid dup'ing system directories in /conf (described in rc file).

Introduce a memory filesystem sizing feature via the /conf/base/<dir>/md_size
file that allows you to override the default memory filesystem size.

Introduce a file containing relative paths to remove for each memory filesystem
directory as /conf/base/<dirname>.remove.

Make the cpio feature more generic (applies to any filesystem) (aka
/conf/base/<dirname>.cpio.gz).

Allow any root directories to be created as a memory filesystem via the
/conf/*/* mechanism.

Replace the copyright notice with a reference to the COPYRIGHT file and
do other cleanups.

(documentation and man page updates to follow).

MFC after:	3 days
2002-12-21 00:30:08 +00:00
Sam Leffler
00f21882a0 replace the special-purpose rate-limiting code with the general facility
just added; this tries to maintain the same behaviour vis a vis printing
the rate-limiting messages but need tweaking
2002-12-21 00:08:20 +00:00
Sam Leffler
69f05a0761 define HAVE_PPSRATECHECK now that we have this stuff in the kernel
(probably belongs elsewhere; add it this way for now so the system
will build)
2002-12-20 23:57:22 +00:00
Sam Leffler
91974ce10b add generic rate limiting support from netbsd; ratelimit is purely time based,
ppsratecheck is for controlling packets/second

Obtained from:	netbsd
2002-12-20 23:54:47 +00:00
Jake Burkholder
9830739b64 Add page queue locking around functions that call vm_page_flag_set. This
fixes a failed assertion early in boot on sparc64.

Reported by:	Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
2002-12-20 21:47:21 +00:00
Alan Cox
2952e1fb58 Extend the scope of the page queues lock in vm_pgmoveco(). 2002-12-20 21:18:29 +00:00
Alan Cox
671e427ce9 Increase the scope of the kmem_object locking in kmem_malloc(). 2002-12-20 18:59:23 +00:00
Matthew Dillon
cc7bab9032 Modify the fake cylinders calculation so it is >= the size of the device,
not < the size of the device.  This avoids geom complaints.

Fix a serious bug in the handling of the RS_NO_CLEAR_UA quirk.  When we
go and insert the test-unit-ready command the umass_cam_quirk_cb() function
sets the status as if the READ_CAPACITY command suceeded when, in fact, it
did not.  This leads to the CAM layer trying to use garbage in the return
buffer and panicing the system (or doing other bad things).

Add a quirk entry for MSYSTEMS DISK-ON-KEY, which is sold under the Sony
brand as a solid state disk-on-key usb device.  This device requires
several quirks to work properly.

Note that the disk-on-key device will not work properly until CAM also
gets a quirk entry for it, which has been submitted to the CAM maintainer,
and you may have to temporarily uncomment the DELAY() as well.  -current
does not properly wait for devices to power up so you may also have
to temporarily uncomment the DELAY(300000) to make your device work.
A solution must be found to that issue.

MFC after:	3 days
X-MFC note:	the quirk support must MFCd before this patch can be
2002-12-20 18:56:55 +00:00
Matthew Dillon
698df1f738 Fix two bugs in the DMA chaining code for OHCI. The first bug is that
the dataphysend calculation could only possibly work if the virtual buffer
is also physically contiguous.  Calculate dataphysend by calculating the
ending virtual address first, then converting to a physical address.

The second bug applies only to NetBSD and OpenBSD and involves the curlen
calculation in the two-contiguous-physical-pages case (which we don't support).

Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic
if len goes negative (meaning we lost the physical page translation
representing the end of the buffer).

IMHO the dataphysend is still bokered since it might be misrepresented
by shared userland page mappings.  The whole section needs to be rewritten
to use the virtual address range.

MFC after:	3 days
2002-12-20 18:47:39 +00:00
Maxime Henrion
894db7b01f Don't forget to destroy the mutex if an error occurs
in the jail() system call.

Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2002-12-20 14:32:20 +00:00
Ruslan Ermilov
b94a2c38ca mdoc(7) police: Fixed language. 2002-12-20 12:41:26 +00:00
Søren Schmidt
01ed335875 Fxi support for the Promise SuperTrak 100, the PCI id was wrong. 2002-12-20 12:15:38 +00:00
Jeffrey Hsu
9a39fc9d73 Eliminate a goto.
Fix some line breaks.
2002-12-20 11:24:02 +00:00
Jeffrey Hsu
12e552d69f Swap the order of a free and a use of an ifaddr structure. 2002-12-20 11:21:07 +00:00
Jeffrey Hsu
540e8b7e31 Unravel a nested conditional.
Remove an unneeded local variable.
2002-12-20 11:16:52 +00:00
Tim J. Robbins
4aca04ee5c Document the fact that the printf() family of functions return negative
values (EOF in our case) on error, and some of the possible errno values
in an Errors section.

PR:		39257
2002-12-20 08:28:10 +00:00
Tim J. Robbins
5a7405be50 C99 standardised the vscanf() family of functions, update Standards
section to reflect this.
2002-12-20 07:46:01 +00:00
Warner Losh
1e315c9022 Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded.  This doesn't cost us anything.

Submitted by: bde
2002-12-20 05:49:40 +00:00
Mike Barcroft
68cd9bedfb Stylistic changes:
o Fix an English error (comma splice) and poorly worded sentence.
o Fix KNF ordering of variables (pointers come before arithmetic types).
o Restore hand-optimization of sizeof()-1, instead of strlen().
o Remove unneeded local variables in strerror_r().

Test by:	strerror regression test
Requested by:	bde
Reviewed by:	bde
2002-12-20 05:26:10 +00:00
Alan Cox
4b420d501f Add a mutex to struct vm_object. Initialize and destroy that mutex
at appropriate times.  For the moment, the mutex is only used on
the kmem_object.
2002-12-20 05:10:32 +00:00
Tom Rhodes
3b15250c04 Remove obsolete information about 'conflicts' 2002-12-20 04:56:52 +00:00
Jake Burkholder
83110b06f8 Fix breakage from earlier inadvertant changes. 2002-12-20 04:32:10 +00:00
Tom Rhodes
9e655d620b Move the NOTES section to DESCRIPTION. And correct some documentation while
I'm here.

PR:		43756
Submitted by:	Gary W. Swearingen <swear@attbi.com>
2002-12-20 01:17:18 +00:00
Tom Rhodes
bd8dfc819e Document what really occurs when we obtain an error.
PR:		43357
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-12-20 01:01:24 +00:00
Jeffrey Hsu
f320a1bfd2 Expand scope of TCP protocol lock to cover syncache data structures. 2002-12-20 00:24:19 +00:00
Chris Costello
075b064f04 Include a cross-reference to maclabel(7) for policies that use MAC labels.
MFC Candidate.

Sponsored by:	DARPA, Network Associates Labs
2002-12-20 00:17:10 +00:00
Jordan K. Hubbard
d667ae9537 Correct path to /usr/sbin/sysinstall for HEAD since that's where it lives now. 2002-12-20 00:10:37 +00:00
Chris Costello
6f489bd9f6 o Change "accesses" to "access" (sounds better)
o Correct the range of compartments (1..256 instead of 0..255)
o Use the correct name for "Network Associates Laboratories"

MFC Candidate.

Sponsored by:	DARPA, Network Associates Laboratories
Reviewed by:	Adam Migus <adam@migus.org>
2002-12-19 23:47:59 +00:00
Matthew Dillon
914d31686b The zalloc pool's size calculation breaks if sbrk() does not return
contiguous chunks of memory.  It happens to do so in the bootstrap
code, but not necessarily in other places.
MFC after:	7 days
2002-12-19 23:23:20 +00:00
Bosko Milekic
86fea6be59 o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} and
the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}.
o Fix a bpf_compat issue where malloc() was defined to just call
  bpf_alloc() and pass the 'canwait' flag(s) along.  It's been changed
  to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT
  flag (and only one of those two).

Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
2002-12-19 22:58:27 +00:00
Tom Rhodes
9dbbb2829e Fix some grammar nits. Mainly the use of a' or an' where the opposite
is required.

PR:		33559
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2002-12-19 22:56:20 +00:00
Ceri Davies
9d99e59872 Grammatical fixup: s/be the -1/be -1/
MFC after: 1 day
2002-12-19 21:48:43 +00:00
Alan Cox
cf3e6e4837 Remove the hash_rand field from struct vm_object. As of revision 1.215 of
vm/vm_page.c, it is unused.
2002-12-19 20:01:22 +00:00
Jake Burkholder
7c6c018c0c Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
Tom Rhodes
6b9ba891c0 Remove reference to a non-existant manual page && add a cross-reference to
ulpt(4)
2002-12-19 19:00:51 +00:00
Tom Rhodes
2c5aad3607 Tweak the grammar in the device.hints(5) manual page.
PR:		45893
Submitted by:	Chris Pepper <pepper@rockefeller.edu> (Original Version)
2002-12-19 18:26:26 +00:00
Poul-Henning Kamp
cea573842c Don't forget our topology lock in the MBREXT case. 2002-12-19 12:01:19 +00:00
Ruslan Ermilov
8d436e783f Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001.

Reviewed by:	deischen
2002-12-19 11:39:20 +00:00
Tim J. Robbins
c0dd63a8a8 Add back the Standards section claiming conformance to 1003.1-2001 and
C99 now that all known standards-related bugs have been fixed.
2002-12-19 10:24:52 +00:00
Tim J. Robbins
37d2356335 Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().
2002-12-19 09:53:26 +00:00
Tim J. Robbins
a207a8e3f1 Use strerror_r() to format the error message so that strerror()'s static
buffer does not get clobbered.

ISO/IEC 9899:1999 7.21.6.2 3:
"The implementation shall behave as if no library function calls the
strerror function."
2002-12-19 09:50:10 +00:00
Tim J. Robbins
a932a3f4b5 Add a test program for perror() that demonstrates two bugs in the
current implementation.
2002-12-19 09:46:10 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00