Commit Graph

76303 Commits

Author SHA1 Message Date
Peter Wemm
7022a21abd Update an 'XXX what is this?' type comment about suswintr and fuswintr.
These are 16 bit short values used only by the profiling code.
2002-06-20 07:40:53 +00:00
Tim J. Robbins
d2979f5673 Style: put static qualifier on definition of static functions. 2002-06-20 07:36:22 +00:00
Peter Wemm
e8aef1d3b5 Use suword16/fuword16 instead of susword/fusword - this has two different
definitions so far.. 16 bit on x86 and appears to be 32 bit on sparc64.
Be explicit to avoid suprises.
2002-06-20 07:23:08 +00:00
Juli Mallett
49d54362f1 Bogusness may have happened using a variable assignment here before, but
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.

In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
Peter Wemm
b23619e02a Deorbit suibyte(). It was only used for split address space systems
for supporting UIO_USERISPACE (ie: it wasn't used).
2002-06-20 07:13:35 +00:00
Tim J. Robbins
51ddbf586b time(1) does not use the shell to execute the specified utility, remove
sentence stating it did.
2002-06-20 07:12:34 +00:00
Peter Wemm
3ff369fed2 Remove references to UIO_USERISPACE which no longer exists. 2002-06-20 07:09:24 +00:00
Peter Wemm
9d04103b7c Remove UIO_USERISPACE - we do not support any split instruction/data
address space machines (eg: pdp-11) and are not likely to ever do so.
Nothing in our kernel sets this.
2002-06-20 07:08:43 +00:00
Tim J. Robbins
3f6c6c912f Make it obvious that command line arguments may be specified for the utility
that is to be invoked on the command line. Use "utility" instead of "command"
in manual page and usage message for consistency with POSIX.
2002-06-20 07:07:00 +00:00
Juli Mallett
0d9d1e7875 That's right, you can shove your xargs(1) issues in my direction, and I'm
also glad to review changes to it.
2002-06-20 07:06:21 +00:00
Peter Wemm
8acb9efb5b ia32 %edx return comes from td_retval[1], not td_retval[0]
Obtained from:	dfr
2002-06-20 06:47:44 +00:00
Peter Wemm
6e1f6045c0 Use suword32/64 and fuword32/64 like elsewhere instead of inventing
suhword/fuhword.
2002-06-20 06:45:43 +00:00
Peter Wemm
92caa29d8e Add boot_serial and boot_multicons variables to set RB_SERIAL and
RB_MULTIPLE since this seems to be the easiest way to add these flags
for non-forth loaders etc.
2002-06-20 06:29:42 +00:00
Peter Wemm
3800e8732f panic rather than fault and explode if we fail to contigmalloc a kernel
stack.  This is still bad(TM), but at least we have a clue when we get
hit when contigmalloc fails.
2002-06-20 06:25:22 +00:00
Peter Wemm
3c2aff6c15 Use the canonical pmap_{new,dispose,swapin,swapout}_proc() functions,
in this case cut/pasted from sparc64 instead of messing with
contigmalloc where it is not needed.
2002-06-20 06:23:40 +00:00
Peter Wemm
2f9267ec23 Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish.
This changes
  #define RQB_FFS(mask) (ffs64(mask))
  foo = RQB_FFS(mask) - 1;
to
  #define RQB_FFS(mask) (ffs64(mask) - 1)
  foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().

Reviewed by:	jake (in principle)
2002-06-20 06:21:20 +00:00
Juli Mallett
6953dff37c Use size_t consistently and complete some uncompleted code resulting in a
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.

MFC after:	1 month
2002-06-20 06:00:51 +00:00
Juli Mallett
d7b8563d55 A function which takes no arguments has an argument list spelled (void) in the
world of ANSI C.
2002-06-20 05:35:40 +00:00
Juli Mallett
0e6c085ae6 We have a place for extern declarations of global variables in ed.h, do not
use main() to do it locally.
2002-06-20 05:28:02 +00:00
Juli Mallett
4e17884ffe Remove two unused variables. 2002-06-20 05:21:43 +00:00
Juli Mallett
8b7808bc49 Minor const cleanup.
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
Gregory Neil Shapiro
2a1d418ce1 Add a warning regarding the SENDMAIL_*_MC make.conf variable values.
Using /etc/mail/sendmail.mc will create /etc/mail/sendmail.cf during
a buildworld.

PR:		misc/39397
MFC after:	3 days
2002-06-20 04:33:06 +00:00
Juli Mallett
6d5fda5fd5 Grrr, make the test for embedded variables in the left-hand-side actually do
the right thing in every case.  Yuck.
2002-06-20 03:08:20 +00:00
Alan Cox
5375be1861 o Acquire and release the vm_map lock instead of Giant in obreak().
Consequently, use vm_map_insert() and vm_map_delete(), which expect
   the vm_map to be locked, instead of vm_map_find() and vm_map_remove(),
   which do not.
2002-06-20 02:04:55 +00:00
Peter Wemm
532cf61bcf Solve the 'unregistered netisr 18' information notice with a sledgehammer.
Register the ISR early, but do not actually kick off the timer until we
see some activity.  This still saves us from running the arp timers on
a system with no network cards.
2002-06-20 01:27:40 +00:00
Jeff Roberson
1e081f889b - Move the computation of pflags out of the page allocation loop in
kmem_malloc()
- zero fill pages if PG_ZERO bit is not set after allocation in kmem_malloc()

Suggested by: alc, jake
2002-06-19 23:49:57 +00:00
Andrew R. Reiter
2eb7b21b00 - Remove the lock(9) protecting the kernel linker system.
- Added a mutex, kld_mtx, to protect the kernel_linker system.  Note that
  while ``classes'' is global (to that file), it is only read only after
  SI_SUB_KLD, SI_ORDER_ANY.
- Add a SYSINIT to flip a flag that disallows class registration after
  SI_SUB_KLD, SI_ORDER_ANY.

Idea for ``classes'' read only by:	jake
Reviewed by:	jake
2002-06-19 21:25:59 +00:00
Jeff Roberson
3370c5bfd7 - Remove bogus use of kmem_alloc that was inherited from the old zone
allocator.
- Properly set M_ZERO when talking to the back end page allocators for
  non malloc zones.  This forces us to zero fill pages when they are first
  brought into a cache.
- Properly handle M_ZERO in uma_zalloc_internal.  This fixes a problem where
  per cpu buckets weren't always getting zeroed.
2002-06-19 20:49:44 +00:00
Jeff Roberson
95f24639b7 Teach kmem_malloc about M_ZERO. 2002-06-19 20:47:18 +00:00
Robert Drehmel
4507bd42c6 Correct spelling of 'supplied'.
PR: misc/39528
2002-06-19 20:44:48 +00:00
Dag-Erling Smørgrav
bc39792308 We don't use this any more.
Sponsored by:	DARPA, NAI Labs
2002-06-19 20:01:25 +00:00
Dag-Erling Smørgrav
bb151ea158 Enable OPIE for sshd and telnetd. I thought I'd done this a long time
ago...

Sponsored by:	DARPA, NAI Labs
2002-06-19 20:00:43 +00:00
Eivind Eklund
0f798c48ed Make locate.updatedb tell about the security risk when it is run as root. 2002-06-19 19:22:18 +00:00
Mike Barcroft
0c49c1f970 Change spelling of u_char' to unsigned char' to avoid requiring
<sys/types.h> as a prerequisite.
2002-06-19 19:05:41 +00:00
Juli Mallett
0aa9e01c51 Add a test for what was fixed in revision 1.27 and 1.28 of make(1)'s var.c,
expansion of embedded variables in the left-hand-side of an assignment
expression, using the simplest case - hiding recursion using nil-expanded
variables.
2002-06-19 18:57:04 +00:00
Juli Mallett
fe36b03b4c Fix a memory leak from previous commit by freeing the possibly expanded
string at the first opportunity, being sure to now always allocate the
new string from VarPossiblyExpand.  Oops.
2002-06-19 17:39:36 +00:00
Warner Losh
d5ca4da61e Add better mediaopt support for ibss and friends.
Now the driver is closer to matching the wi man page.

Submitted by: jhay (who obtained it from OpenBSD).
2002-06-19 17:37:34 +00:00
Juli Mallett
0a9c401f9a Possibly expand the variable name's embedded variables before using it, as
seen (somewhat) in NetBSD.  This catches a few extra recursion cases that
could be hidden by expanding a NIL variable causing an existing variable to
be returned (which caused infinite looping and climbing memory usage in at
least one case).

Obtained from:	NetBSD (in principle)
2002-06-19 17:23:08 +00:00
Makoto Matsushita
dafdb1b4c5 Set PATH statically, and use 'env -i' to kick chroot(8). As a result,
the second buildworld environment is fully isolated from parent's
environment variables.

Tested virtually on: snapshots.jp.FreeBSD.org
Approved by:	arch@ (silently)
MFC after:	2 weeks
2002-06-19 15:06:38 +00:00
Yoshihiro Takahashi
f832bb8c37 MFi386: revisions from 1.342 to 1.344 2002-06-19 13:47:53 +00:00
Yoshihiro Takahashi
5463ee36b6 Backout previous change and merge from sys/dev/sio/sio.c revision 1.375. 2002-06-19 13:20:20 +00:00
Yoshihiro Takahashi
2240ad94a5 Merged from sys/isa/fd.c revision 1.233. 2002-06-19 13:17:43 +00:00
Søren Schmidt
9153cecd64 Use si_iosize_max to tell the upper layers not to use more
than 32K chunks on ZIP drives instead of deblocking it in
the driver.
2002-06-19 12:41:05 +00:00
Søren Schmidt
098d258d05 Add yet another (older) Promise chip 2002-06-19 12:26:20 +00:00
Tim J. Robbins
029c8ee4fa Bring documentation on CDPATH and its effects on cd(1) back into sync with
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.

PR:		38442
Submitted by:	oleg dashevskii <be9@be9.ru>
MFC after:	1 week
2002-06-19 12:04:22 +00:00
Tim J. Robbins
12e8db4067 Fix duplicate % in %b format introduced in rev 1.22. 2002-06-19 09:42:20 +00:00
Matthew Dillon
a37313d234 In rev 1.72 a situation related to write/mmap was fixed which could result
in a user process gaining visibility into the 'old' contents of a filesystem
block.  There were two cases:  (1) when uiomove() fails (user process issues
illegal write), and (2) when uiomove() overlaps a mmap() of the same file at
the same offset (fault -> recursive buffer I/O reads contents of old block).

Unfortunately 1.72 also had the unintended effect of forcing the filesystem
to do a read-before-write in the case of a full-block-write (non append case),
e.g. 'dd if=/dev/zero of=test.dat bs=1m count=256 conv=notrunc'.  This
destroys performance.. not only is a read forced for every write, but
clustering breaks as well.

The solution is to clear the buffer manually in the full-block case rather
then asking BALLOC to do it (BALLOC issues the read-before-write).  In the
partial-block case we want BALLOC to do it because the read-before-write
is necessary.  This patch should greatly improve database and news-feed
server performance.

Found by: MKI <mki@mozone.net>
MFC after:	3 days
2002-06-19 09:39:41 +00:00
Tim J. Robbins
98dd638658 Let printf(1) tell the difference between zero width/precision and
unspecified width/precision.

PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
2002-06-19 09:24:30 +00:00
Poul-Henning Kamp
c4bacc1871 Remove the compat bits for the mis-aligned struct disklabel on alpha,
people got three times longer than I promised.

Sponsored by: DARPA & NAI Labs.
2002-06-19 08:37:02 +00:00
Dag-Erling Smørgrav
f8bd33a0ae Don't try to dereference conn when we know it's NULL. 2002-06-19 08:36:00 +00:00