]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoSo many people have asked me to describe my development environment that
dillon [Sun, 22 Dec 2002 02:07:05 +0000 (02:07 +0000)]
So many people have asked me to describe my development environment that
my fingers are getting tired.  Here is a new manual page, 'development',
which describes a very powerful, generic, exportable development environment
suitable to developers, sysops, admins, and anyone at all who is
maintaining more the one FreeBSD box.  I have used this type of environment
for many years and have had to make virtually no changes to it for all that
time.

MFC after: 3 days

21 years ago- Add a pmap pointer to struct md_page, and use this to find the pmap that
jake [Sat, 21 Dec 2002 22:43:19 +0000 (22:43 +0000)]
- Add a pmap pointer to struct md_page, and use this to find the pmap that
  a mapping belongs to by setting it in the vm_page_t structure that backs
  the tsb page that the tte for a mapping is in.  This allows the pmap that
  a mapping belongs to to be found without keeping a pointer to it in the
  tte itself.
- Remove the pmap pointer from struct tte and use the space to make the
  tte pv lists doubly linked (TAILQs), like on other architectures.  This
  makes entering or removing a mapping O(1) instead of O(n) where n is the
  number of pmaps a page is mapped by (including kernel_pmap).
- Use atomic ops for setting and clearing bits in the ttes, now that they
  return the old value and can be easily used for this purpose.
- Use __builtin_memset for zeroing ttes instead of bzero, so that gcc will
  inline it (4 inline stores using %g0 instead of a function call).
- Initially set the virtual colour for all the vm_page_ts to be equal to their
  physical colour.  This will be more useful once uma_small_alloc is
  implemented, but basically pages with virtual colour equal to phsyical
  colour are easier to handle at the pmap level because they can be safely
  accessed through cachable direct virtual to physical mappings with that
  colour, without fear of causing illegal dcache aliases.

In total these changes give a minor performance improvement, about 1%
reduction in system time during buildworld.

21 years agoBe nice. There are evidentally a number of different cards that
imp [Sat, 21 Dec 2002 22:37:54 +0000 (22:37 +0000)]
Be nice.  There are evidentally a number of different cards that
identify themselves as serial cards that it would be desirable to
attach a different driver than sio to.  Since we are claiming all
serial cards, this is not possible.  Instead, return -100 to indicate
that we're willing to take the card, but still allow other drivers to
attach.

Pointed out by: Maksim Yevmenkin

21 years agoMake newsyslog(8) print the correct date when the logs are turned over.
trhodes [Sat, 21 Dec 2002 22:27:26 +0000 (22:27 +0000)]
Make newsyslog(8) print the correct date when the logs are turned over.

PR: 46395
Submitted by: maxim
MFC: eventually

21 years agoReduce libc's memory footprint by lazily allocating memory used internally
bbraun [Sat, 21 Dec 2002 22:04:50 +0000 (22:04 +0000)]
Reduce libc's memory footprint by lazily allocating memory used internally
by setproctitle().

Reviewed by: jkh

21 years agodo not try to free a mountpoint that we did not allocate.
dillon [Sat, 21 Dec 2002 20:55:34 +0000 (20:55 +0000)]
do not try to free a mountpoint that we did not allocate.

X-MFC after: immediately

21 years agoIn syncache_timer(), don't attempt to lock the inpcb structure
pb [Sat, 21 Dec 2002 19:59:47 +0000 (19:59 +0000)]
In syncache_timer(), don't attempt to lock the inpcb structure
associated with the syncache entry: in case tcp_close() has been
called on the corresponding listening socket, the lock has been
destroyed as a side effect of in_pcbdetach(), causing a panic when
we attempt to lock on it.

Reviewed by: hsu

21 years agoThe previous commit contained a stupid mistake: ctxt->pam_[cp]sock was
des [Sat, 21 Dec 2002 15:09:58 +0000 (15:09 +0000)]
The previous commit contained a stupid mistake: ctxt->pam_[cp]sock was
initialized after the call to pthread_create() instead of before.  It just
happened to work with threads enabled because ctxt is shared, but of
course it doesn't work when we use a child process instead of threads.

21 years agoMark the INVALID keyword as being deprecated since the concept of
tjr [Sat, 21 Dec 2002 11:37:05 +0000 (11:37 +0000)]
Mark the INVALID keyword as being deprecated since the concept of
"invalid runes" is useless without the rest of the deprecated rune interface.

21 years agoMake pmap_qenter and pmap_qremove look more like the other pmaps.
jake [Sat, 21 Dec 2002 10:44:30 +0000 (10:44 +0000)]
Make pmap_qenter and pmap_qremove look more like the other pmaps.

21 years agoAdd the -P option which executes multiple copies of the specified utility
tjr [Sat, 21 Dec 2002 10:17:13 +0000 (10:17 +0000)]
Add the -P option which executes multiple copies of the specified utility
in parallel. Idea from GNU xargs.

21 years agoRemoved unused pmap_qenter_flags.
jake [Sat, 21 Dec 2002 10:04:14 +0000 (10:04 +0000)]
Removed unused pmap_qenter_flags.

21 years agoMake the atomic arithmetic functions return the old value, since they're
jake [Sat, 21 Dec 2002 08:53:26 +0000 (08:53 +0000)]
Make the atomic arithmetic functions return the old value, since they're
all implemented with cas anyway.

21 years agoReduce libc.so's memory footprint by lazily allocating memory used internally
bbraun [Sat, 21 Dec 2002 07:12:35 +0000 (07:12 +0000)]
Reduce libc.so's memory footprint by lazily allocating memory used internally
by basename() and dirname().
Reviewed by: eric

21 years agoImport newer versions of div() and ldiv() from NetBSD which handle
tjr [Sat, 21 Dec 2002 05:11:39 +0000 (05:11 +0000)]
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.

21 years ago-mno-align-long-strings can make things smaller, so lets use it in hopes
obrien [Sat, 21 Dec 2002 02:03:31 +0000 (02:03 +0000)]
-mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.

21 years agoFix multiple registration of the elf_legacy_coredump sysctl variable.
marcel [Sat, 21 Dec 2002 01:15:39 +0000 (01:15 +0000)]
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.

21 years agoRemove unimplemented System V options from the getopt() option string.
tjr [Sat, 21 Dec 2002 00:38:14 +0000 (00:38 +0000)]
Remove unimplemented System V options from the getopt() option string.

21 years agoRevamp the way rc.diskless1 creates and populates memory filesystems. Make
dillon [Sat, 21 Dec 2002 00:30:08 +0000 (00:30 +0000)]
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

21 years agoreplace the special-purpose rate-limiting code with the general facility
sam [Sat, 21 Dec 2002 00:08:20 +0000 (00:08 +0000)]
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

21 years agodefine HAVE_PPSRATECHECK now that we have this stuff in the kernel
sam [Fri, 20 Dec 2002 23:57:22 +0000 (23:57 +0000)]
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)

21 years agoadd generic rate limiting support from netbsd; ratelimit is purely time based,
sam [Fri, 20 Dec 2002 23:54:47 +0000 (23:54 +0000)]
add generic rate limiting support from netbsd; ratelimit is purely time based,
ppsratecheck is for controlling packets/second

Obtained from: netbsd

21 years agoAdd page queue locking around functions that call vm_page_flag_set. This
jake [Fri, 20 Dec 2002 21:47:21 +0000 (21:47 +0000)]
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>

21 years agoExtend the scope of the page queues lock in vm_pgmoveco().
alc [Fri, 20 Dec 2002 21:18:29 +0000 (21:18 +0000)]
Extend the scope of the page queues lock in vm_pgmoveco().

21 years agoIncrease the scope of the kmem_object locking in kmem_malloc().
alc [Fri, 20 Dec 2002 18:59:23 +0000 (18:59 +0000)]
Increase the scope of the kmem_object locking in kmem_malloc().

21 years agoModify the fake cylinders calculation so it is >= the size of the device,
dillon [Fri, 20 Dec 2002 18:56:55 +0000 (18:56 +0000)]
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

21 years agoFix two bugs in the DMA chaining code for OHCI. The first bug is that
dillon [Fri, 20 Dec 2002 18:47:39 +0000 (18:47 +0000)]
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

21 years agoDon't forget to destroy the mutex if an error occurs
mux [Fri, 20 Dec 2002 14:32:20 +0000 (14:32 +0000)]
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>

21 years agomdoc(7) police: Fixed language.
ru [Fri, 20 Dec 2002 12:41:26 +0000 (12:41 +0000)]
mdoc(7) police: Fixed language.

21 years agoFxi support for the Promise SuperTrak 100, the PCI id was wrong.
sos [Fri, 20 Dec 2002 12:15:38 +0000 (12:15 +0000)]
Fxi support for the Promise SuperTrak 100, the PCI id was wrong.

21 years agoEliminate a goto.
hsu [Fri, 20 Dec 2002 11:24:02 +0000 (11:24 +0000)]
Eliminate a goto.
Fix some line breaks.

21 years agoSwap the order of a free and a use of an ifaddr structure.
hsu [Fri, 20 Dec 2002 11:21:07 +0000 (11:21 +0000)]
Swap the order of a free and a use of an ifaddr structure.

21 years agoUnravel a nested conditional.
hsu [Fri, 20 Dec 2002 11:16:52 +0000 (11:16 +0000)]
Unravel a nested conditional.
Remove an unneeded local variable.

21 years agoDocument the fact that the printf() family of functions return negative
tjr [Fri, 20 Dec 2002 08:28:10 +0000 (08:28 +0000)]
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

21 years agoC99 standardised the vscanf() family of functions, update Standards
tjr [Fri, 20 Dec 2002 07:46:01 +0000 (07:46 +0000)]
C99 standardised the vscanf() family of functions, update Standards
section to reflect this.

21 years agoPut back the casts to unsigned. While no strictly necessary for its
imp [Fri, 20 Dec 2002 05:49:40 +0000 (05:49 +0000)]
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

21 years agoStylistic changes:
mike [Fri, 20 Dec 2002 05:26:10 +0000 (05:26 +0000)]
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

21 years agoAdd a mutex to struct vm_object. Initialize and destroy that mutex
alc [Fri, 20 Dec 2002 05:10:32 +0000 (05:10 +0000)]
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.

21 years agoRemove obsolete information about 'conflicts'
trhodes [Fri, 20 Dec 2002 04:56:52 +0000 (04:56 +0000)]
Remove obsolete information about 'conflicts'

21 years agoFix breakage from earlier inadvertant changes.
jake [Fri, 20 Dec 2002 04:32:10 +0000 (04:32 +0000)]
Fix breakage from earlier inadvertant changes.

21 years agoMove the NOTES section to DESCRIPTION. And correct some documentation while
trhodes [Fri, 20 Dec 2002 01:17:18 +0000 (01:17 +0000)]
Move the NOTES section to DESCRIPTION.  And correct some documentation while
I'm here.

PR: 43756
Submitted by: Gary W. Swearingen <swear@attbi.com>

21 years agoDocument what really occurs when we obtain an error.
trhodes [Fri, 20 Dec 2002 01:01:24 +0000 (01:01 +0000)]
Document what really occurs when we obtain an error.

PR: 43357
Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>

21 years agoExpand scope of TCP protocol lock to cover syncache data structures.
hsu [Fri, 20 Dec 2002 00:24:19 +0000 (00:24 +0000)]
Expand scope of TCP protocol lock to cover syncache data structures.

21 years agoInclude a cross-reference to maclabel(7) for policies that use MAC labels.
chris [Fri, 20 Dec 2002 00:17:10 +0000 (00:17 +0000)]
Include a cross-reference to maclabel(7) for policies that use MAC labels.

MFC Candidate.

Sponsored by: DARPA, Network Associates Labs

21 years agoCorrect path to /usr/sbin/sysinstall for HEAD since that's where it lives now.
jkh [Fri, 20 Dec 2002 00:10:37 +0000 (00:10 +0000)]
Correct path to /usr/sbin/sysinstall for HEAD since that's where it lives now.

21 years agoo Change "accesses" to "access" (sounds better)
chris [Thu, 19 Dec 2002 23:47:59 +0000 (23:47 +0000)]
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>

21 years agoThe zalloc pool's size calculation breaks if sbrk() does not return
dillon [Thu, 19 Dec 2002 23:23:20 +0000 (23:23 +0000)]
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

21 years agoo Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} and
bmilekic [Thu, 19 Dec 2002 22:58:27 +0000 (22:58 +0000)]
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++)

21 years agoFix some grammar nits. Mainly the use of `a' or `an' where the opposite
trhodes [Thu, 19 Dec 2002 22:56:20 +0000 (22:56 +0000)]
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>

21 years agoGrammatical fixup: s/be the -1/be -1/
ceri [Thu, 19 Dec 2002 21:48:43 +0000 (21:48 +0000)]
Grammatical fixup:  s/be the -1/be -1/

MFC after: 1 day

21 years agoRemove the hash_rand field from struct vm_object. As of revision 1.215 of
alc [Thu, 19 Dec 2002 20:01:22 +0000 (20:01 +0000)]
Remove the hash_rand field from struct vm_object.  As of revision 1.215 of
vm/vm_page.c, it is unused.

21 years agoRenamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.
jake [Thu, 19 Dec 2002 19:34:59 +0000 (19:34 +0000)]
Renamed the loader's zipfs to gzipfs.  zipfs.c was repo-copied to gzipfs.c.

21 years agoRemove reference to a non-existant manual page && add a cross-reference to
trhodes [Thu, 19 Dec 2002 19:00:51 +0000 (19:00 +0000)]
Remove reference to a non-existant manual page && add a cross-reference to
ulpt(4)

21 years agoTweak the grammar in the device.hints(5) manual page.
trhodes [Thu, 19 Dec 2002 18:26:26 +0000 (18:26 +0000)]
Tweak the grammar in the device.hints(5) manual page.

PR: 45893
Submitted by: Chris Pepper <pepper@rockefeller.edu> (Original Version)

21 years agoDon't forget our topology lock in the MBREXT case.
phk [Thu, 19 Dec 2002 12:01:19 +0000 (12:01 +0000)]
Don't forget our topology lock in the MBREXT case.

21 years agoMake accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
ru [Thu, 19 Dec 2002 11:39:20 +0000 (11:39 +0000)]
Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001.

Reviewed by: deischen

21 years agoAdd back the Standards section claiming conformance to 1003.1-2001 and
tjr [Thu, 19 Dec 2002 10:24:52 +0000 (10:24 +0000)]
Add back the Standards section claiming conformance to 1003.1-2001 and
C99 now that all known standards-related bugs have been fixed.

21 years agoWrite the message to stderr, not file descriptor 2, so that perror()
tjr [Thu, 19 Dec 2002 09:53:26 +0000 (09:53 +0000)]
Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().

21 years agoUse strerror_r() to format the error message so that strerror()'s static
tjr [Thu, 19 Dec 2002 09:50:10 +0000 (09:50 +0000)]
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."

21 years agoAdd a test program for perror() that demonstrates two bugs in the
tjr [Thu, 19 Dec 2002 09:46:10 +0000 (09:46 +0000)]
Add a test program for perror() that demonstrates two bugs in the
current implementation.

21 years agomdoc(7) police: "The .Fa argument.".
ru [Thu, 19 Dec 2002 09:40:28 +0000 (09:40 +0000)]
mdoc(7) police: "The .Fa argument.".

21 years agomdoc(7) police: Fixed a few .Fa abuses.
ru [Thu, 19 Dec 2002 09:33:34 +0000 (09:33 +0000)]
mdoc(7) police: Fixed a few .Fa abuses.

21 years agomdoc(7) police: excessive quotes.
ru [Thu, 19 Dec 2002 08:13:27 +0000 (08:13 +0000)]
mdoc(7) police: excessive quotes.

21 years agoo Use sysctl machdep.acpi_root to get the physical address of the
marcel [Thu, 19 Dec 2002 08:06:53 +0000 (08:06 +0000)]
o  Use sysctl machdep.acpi_root to get the physical address of the
   RSDP. Scan the first 1MB on i386 if the sysctl fails,
o  Extend struct ACPIrsdp with the ACPI 2.0 fields which involves
   changing a prior reserved field into the ACPI revision,
o  Only calculate the RSDP checksum on the first 20 bytes to remain
   compatible with ACPI 1.0 tables; we don't check the extended
   checksum covering the whole table,
o  Use the length field in the RSDP to map the RSDP into the address
   space so that we don't have to know about future extensions here.

21 years ago - Remove vm_page_sleep_busy(). The transition to vm_page_sleep_if_busy(),
alc [Thu, 19 Dec 2002 07:23:46 +0000 (07:23 +0000)]
 - Remove vm_page_sleep_busy().  The transition to vm_page_sleep_if_busy(),
   which incorporates page queue and field locking, is complete.
 - Assert that the page queue lock rather than Giant is held in
   vm_page_flag_set().

21 years agoClarify dates and place of Konrad Zuse's birth and death. Despite
grog [Thu, 19 Dec 2002 05:14:35 +0000 (05:14 +0000)]
Clarify dates and place of Konrad Zuse's birth and death.  Despite
calculations reportedly made by Intel Pentium processors, he died
exactly one time.

21 years agoEmbellish the manpage.
obrien [Thu, 19 Dec 2002 04:41:54 +0000 (04:41 +0000)]
Embellish the manpage.

Obtained from: NetBSD

21 years agoUpdate for the 20021213 version.
obrien [Thu, 19 Dec 2002 04:34:00 +0000 (04:34 +0000)]
Update for the 20021213 version.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r108072,
obrien [Thu, 19 Dec 2002 04:33:15 +0000 (04:33 +0000)]
This commit was generated by cvs2svn to compensate for changes in r108072,
which included commits to RCS files with non-trunk default branches.

21 years agoVendor import of bwk's 13-Dec-2002 release.
obrien [Thu, 19 Dec 2002 04:33:15 +0000 (04:33 +0000)]
Vendor import of bwk's 13-Dec-2002 release.

21 years agoSpell `unsigned short' in a way which does not depend on namespace pollution.
wollman [Thu, 19 Dec 2002 02:52:23 +0000 (02:52 +0000)]
Spell `unsigned short' in a way which does not depend on namespace pollution.
Note that this is still the wrong type, but we are not ready to break the
ABI; this change simply allows programs which specify a strict SUSv3
namespace to compile.  (They may still have semantic errors, since SUSv3
specifies correct types.)

21 years agoTest that if the buffer argument (`s') to wcrtomb() is NULL then
tjr [Thu, 19 Dec 2002 02:01:39 +0000 (02:01 +0000)]
Test that if the buffer argument (`s') to wcrtomb() is NULL then
the value of the supplied wide character is ignored and L'\0' is used
instead. Remove incorrect comments about "internal buffer" since wcrtomb()
does not have one (wctomb() does).

21 years ago - Hold the page queues lock when performing vm_page_busy() or
alc [Thu, 19 Dec 2002 01:20:24 +0000 (01:20 +0000)]
 - Hold the page queues lock when performing vm_page_busy() or
   vm_page_flag_set().
 - Replace vm_page_sleep_busy() with proper page queues locking
   and vm_page_sleep_if_busy().

21 years agoAdd some linux keys
davidxu [Thu, 19 Dec 2002 01:17:07 +0000 (01:17 +0000)]
Add some linux keys

21 years agopathconf() and acl_get_file() follow links so they cannot be used to
tjr [Thu, 19 Dec 2002 01:13:23 +0000 (01:13 +0000)]
pathconf() and acl_get_file() follow links so they cannot be used to
determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.

Pointed out by: rwatson, bde

21 years agoFix bug with 3c90xB cards and newer. We weren't trying to
mux [Wed, 18 Dec 2002 23:16:22 +0000 (23:16 +0000)]
Fix bug with 3c90xB cards and newer.  We weren't trying to
copy the mbuf chain into an mbuf cluster when there is
more than 63 mbufs in the chain.  We were trying with older
cards though.

21 years agoDo not return(foo()) in void function.
semenu [Wed, 18 Dec 2002 22:53:24 +0000 (22:53 +0000)]
Do not return(foo()) in void function.

Submitted by: marius@alchemy.franken.de
MFC after: 3 days

21 years agoRefer to the now-existent `options MAC_BSDEXTENDED'.
chris [Wed, 18 Dec 2002 22:46:45 +0000 (22:46 +0000)]
Refer to the now-existent `options MAC_BSDEXTENDED'.

MFC Candidate.

Prompted by: dcs
Sponsored by: DARPA, Network Associates Laboratories

21 years agoFix the missspelt letter in DC_CTYPE_PUP_AUTOSENSe define.
semenu [Wed, 18 Dec 2002 22:45:43 +0000 (22:45 +0000)]
Fix the missspelt letter in DC_CTYPE_PUP_AUTOSENSe define.

Submitted by: marius@alchemy.franken.de
MFC after: 3 days

21 years agoSolve another bug in the mapping code: correctly skip lock sectors.
phk [Wed, 18 Dec 2002 22:11:54 +0000 (22:11 +0000)]
Solve another bug in the mapping code: correctly skip lock sectors.
Make sure sector zero is protected if it contains metadata.

Lower WARNS for gbde to 3 on non-i386 archs.  rijndael-fst is evil
but appearntly does the right thing and passes the test-vectors.

MFC Candidate.

21 years agoQuirk for Memorybird pen drive
njl [Wed, 18 Dec 2002 21:47:52 +0000 (21:47 +0000)]
Quirk for Memorybird pen drive

PR: kern/34712
Submitted by: Oliver Fromme <olli@lurza.secnetix.de>
MFC after: 3 days

21 years agoImprove handling of symlink targets when listing MAC labels: don't
rwatson [Wed, 18 Dec 2002 21:05:15 +0000 (21:05 +0000)]
Improve handling of symlink targets when listing MAC labels: don't
do the wrong thing when the symlink doesn't have a target, by
considering !f_label in the construction of ch_options.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agoSync with up-stream version, including a number of bug-fixes:
fanf [Wed, 18 Dec 2002 20:50:44 +0000 (20:50 +0000)]
Sync with up-stream version, including a number of bug-fixes:

* The partial-evaluation of #elif sequences was broken and the
spaghetti logic of its implementation was too hard to understand.
I've re-done it using a straight-forward table-driven push-down
automaton.

* The pre-processor line parser did not allow for all of the weird
places that people might put comments, which could have caused it
to add syntax-errors to the output by removing a #if line containing
the start- or end-marker of a comment.

* The lexer didn't need to special-case the handling of string-literals
or character-constants, but it did need to learn about line-continuations
(backslash-newline).

* The input routine was buggy and bit-rotten and trivially replacable
with fgets(). I've also made the program static- and const-safe and
improved the presentation-order. The formatting of the state-transition
tables remains non-stylish.

This commit-messsage was brought to you by code-point 45.

MFC-after: one-week

21 years agoHold the page queues lock when performing vm_page_busy().
alc [Wed, 18 Dec 2002 20:16:22 +0000 (20:16 +0000)]
Hold the page queues lock when performing vm_page_busy().

21 years agoFix two blunders in the mapping functions which can lead to corrupt data,
phk [Wed, 18 Dec 2002 19:57:27 +0000 (19:57 +0000)]
Fix two blunders in the mapping functions which can lead to corrupt data,
for request sizes larger than the sectorsize or for multi-key setups.

See warning mailed to current@ for details of recovery.

Found by: Marcus Reid <marcus@blazingdot.com>

21 years agoBalk at unaligned requests.
phk [Wed, 18 Dec 2002 19:53:59 +0000 (19:53 +0000)]
Balk at unaligned requests.

MFC candidate.

21 years agoFix corruption introduced in previous delta.
mckusick [Wed, 18 Dec 2002 19:50:28 +0000 (19:50 +0000)]
Fix corruption introduced in previous delta.

Reported by: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr>
Sponsored by:   DARPA & NAI Labs.

21 years agoMore MFp4: DIG64 structures.
marcel [Wed, 18 Dec 2002 18:52:20 +0000 (18:52 +0000)]
More MFp4: DIG64 structures.

21 years agoo Add new types: msgqnum_t and msglen_t.
mike [Wed, 18 Dec 2002 18:22:06 +0000 (18:22 +0000)]
o Add new types: msgqnum_t and msglen_t.
o Add typedefs for pid_t, time_t, size_t and ssize_t.
o Hide struct mymsg and msgsys() in the standards case.
o Add some comments about conformance bugs.
o Sort prototypes.

21 years agoUpdate with the 4.7 libraries, and add libposix1e to the mix.
obrien [Wed, 18 Dec 2002 18:05:07 +0000 (18:05 +0000)]
Update with the 4.7 libraries, and add libposix1e to the mix.

21 years agoAdd regression test for strerror()/strerror_r().
mike [Wed, 18 Dec 2002 16:59:08 +0000 (16:59 +0000)]
Add regression test for strerror()/strerror_r().

Based on: src/lib/libc/string/strerror.c (rev 1.8)

21 years agoRearrange strerror() so that its itoa procedure can be used with
mike [Wed, 18 Dec 2002 16:53:31 +0000 (16:53 +0000)]
Rearrange strerror() so that its itoa procedure can be used with
strerror_r().  Doing this allows us to ensure that strerror_r() always
fills the supplied buffer regardless of EINVAL or ERANGE errors.

strerror()'s semantics have changed slightly such that an argument of
0 is now considered invalid and errno is set to EINVAL.

Remove internal regression test for strerror() and strerror_r().  This
will be reincarnated in src/tools/regression/lib/libc/string.

In strerror(3), add a comment about strerror()'s bogus return type.

PR: 44356

21 years agoMove the agp driver to the third floppy to un-spill the mfsroot.
scottl [Wed, 18 Dec 2002 16:22:45 +0000 (16:22 +0000)]
Move the agp driver to the third floppy to un-spill the mfsroot.

21 years agoUnder some circumstances, the loopback interface will allocate a new
rwatson [Wed, 18 Dec 2002 15:34:17 +0000 (15:34 +0000)]
Under some circumstances, the loopback interface will allocate a new
mbuf for a packet looping back to provide alignment guarantees for
KAME.  Unfortunately, this code performs a direct copy of the header
rather than using a header copying primitive (largely because we have
sucky header copying primitives).  This results in a multiple free
of the MAC label in the header when the same label data is freed
twice when the two mbufs with that header are freed.  As a temporary
work-around, clear the initialized flag on the label to prevent the
duplicate free, which prevents panics on large unaligned loopback
IP and IPv6 data.  The real fix is to improve and make use of proper
packet header copying routines here.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

21 years agomdoc(7) police: Fixed abuses of the .Ar and .Em macros.
ru [Wed, 18 Dec 2002 13:33:04 +0000 (13:33 +0000)]
mdoc(7) police: Fixed abuses of the .Ar and .Em macros.

21 years agomdoc(7) police: "The .Fn function".
ru [Wed, 18 Dec 2002 12:45:11 +0000 (12:45 +0000)]
mdoc(7) police: "The .Fn function".

21 years agoSwitch to the conventional reference counting scheme.
hsu [Wed, 18 Dec 2002 12:41:03 +0000 (12:41 +0000)]
Switch to the conventional reference counting scheme.

21 years agomdoc(7) police: "The .Fn system call".
ru [Wed, 18 Dec 2002 12:39:25 +0000 (12:39 +0000)]
mdoc(7) police: "The .Fn system call".

21 years agoRemove undocumented behavior (return current work dir if no path
johan [Wed, 18 Dec 2002 11:50:28 +0000 (11:50 +0000)]
Remove undocumented behavior (return current work dir if no path
is given as argument) that is not present in 4-Stable.
It was introduced when realpath(1) was split out of pwd(1).
The removed behavior is provided by pwd(1).

Reviewed by: mike

21 years agoLock up ifaddr reference counts.
hsu [Wed, 18 Dec 2002 11:46:59 +0000 (11:46 +0000)]
Lock up ifaddr reference counts.