luigi [Thu, 20 Jun 2002 21:29:55 +0000 (21:29 +0000)]
Add some #define's for mbuf annotations.
As the comment in the code says, eventually there will be a proper
data structure (e.g NetBSD's struct m_tag) to store chains of
annotations, and mbuf-handling procedures will handle these chains
in the correct way.
Right now, these chains do not exist, and we just use the constants
defined here to implement simple ad-hoc solutions to remove some global
variables used so far to pass around informations about packets
being processed.
Global variables are not only ugly and make the code unreadable, they
also prevent from using parallelism in network stack processing.
(the 3-days MFC only refers to this commit, i.e. the PACKET_TAG_*
constants; the full mechanism will be committed and MFC'ed on a
longer timescale).
bmah [Thu, 20 Jun 2002 21:19:49 +0000 (21:19 +0000)]
Provide a way to keep out old ("historic") release notes from bloating
the size of the rendered release notes. By default, any element with
a role="historic" attribute won't get rendered in the output unless
the INCLUDE_HISTORIC Makefile variable is defined.
mux [Thu, 20 Jun 2002 20:03:42 +0000 (20:03 +0000)]
Change the way we internally store the mount options to
a linked list. This is to allow the merging of the mount
options in the MNT_UPDATE case, as the current data structure
is unsuitable for this.
There are no functional differences in this commit.
jmallett [Thu, 20 Jun 2002 19:51:13 +0000 (19:51 +0000)]
Fix a bug fixed by NetBSD in revision 1.42 of parse.c by christos which caused
an example Makefile I was showing someone just last night to report a variable
as being recursive.
alc [Thu, 20 Jun 2002 18:38:28 +0000 (18:38 +0000)]
o Remove an incorrect cast from obreak(). This cast would,
for example, break an sbrk(>=4GB) on 64-bit architectures
even if the resource limit allowed it.
o Correct an off-by-one error.
o Correct a spelling error in a comment.
o Reorder an && expression so that the commonly FALSE expression
comes first.
sobomax [Thu, 20 Jun 2002 14:55:53 +0000 (14:55 +0000)]
Don't try to decode old-style options if the argv[1] begins with `-' and the
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:
$ ps -Ufoobar1234
the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.
Reported by: Vladimir Sotnikov <vovan@kyivstar.net>
MFC after: 2 weeks
iedowse [Thu, 20 Jun 2002 14:03:36 +0000 (14:03 +0000)]
Display the mutex name in the ^T status line if the selected thread
is blocked on a mutex. Prepend a '*' to distinguish this case as
is done in top(1).
jmallett [Thu, 20 Jun 2002 10:37:43 +0000 (10:37 +0000)]
It seems the hard lock on m4(1) is viewed as superfluous. Okay. It's gone.
I'm sick of waiting on OpenBSD to make a number of changes anyway. If someone
else wants to take over fixing m4(1), I'll be glad to make them aware of the
existing issues.
bde [Thu, 20 Jun 2002 09:04:33 +0000 (09:04 +0000)]
Quick fix for the type of the bitmap in sigset_t. It was an array of
4 u_ints but needs to be an array of 4 uint32_t's to work, at least
if unsigned ints have less than 32 bits. It should be a non-array of
1 uint128_t on 128-bit machines, especially if u_int has 128 bits.
The headers that declare uint32_t (actually __uint32_t) are intentionally
not included here since this header should only be included by other
headers.
Fixed some style bugs (space instead of tab after #ifndef and #endif).
peter [Thu, 20 Jun 2002 07:23:08 +0000 (07:23 +0000)]
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.
jmallett [Thu, 20 Jun 2002 07:15:55 +0000 (07:15 +0000)]
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.
peter [Thu, 20 Jun 2002 07:08:43 +0000 (07:08 +0000)]
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.
tjr [Thu, 20 Jun 2002 07:07:00 +0000 (07:07 +0000)]
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.
peter [Thu, 20 Jun 2002 06:29:42 +0000 (06:29 +0000)]
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.
peter [Thu, 20 Jun 2002 06:25:22 +0000 (06:25 +0000)]
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.
peter [Thu, 20 Jun 2002 06:23:40 +0000 (06:23 +0000)]
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.
peter [Thu, 20 Jun 2002 06:21:20 +0000 (06:21 +0000)]
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().
jmallett [Thu, 20 Jun 2002 06:00:51 +0000 (06:00 +0000)]
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.
gshapiro [Thu, 20 Jun 2002 04:33:06 +0000 (04:33 +0000)]
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.
alc [Thu, 20 Jun 2002 02:04:55 +0000 (02:04 +0000)]
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.
peter [Thu, 20 Jun 2002 01:27:40 +0000 (01:27 +0000)]
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.
jeff [Wed, 19 Jun 2002 23:49:57 +0000 (23:49 +0000)]
- 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()
arr [Wed, 19 Jun 2002 21:25:59 +0000 (21:25 +0000)]
- 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
jeff [Wed, 19 Jun 2002 20:49:44 +0000 (20:49 +0000)]
- 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.
jmallett [Wed, 19 Jun 2002 18:57:04 +0000 (18:57 +0000)]
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.
jmallett [Wed, 19 Jun 2002 17:39:36 +0000 (17:39 +0000)]
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.
jmallett [Wed, 19 Jun 2002 17:23:08 +0000 (17:23 +0000)]
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).
matusita [Wed, 19 Jun 2002 15:06:38 +0000 (15:06 +0000)]
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.
tjr [Wed, 19 Jun 2002 12:04:22 +0000 (12:04 +0000)]
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.
dillon [Wed, 19 Jun 2002 09:39:41 +0000 (09:39 +0000)]
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.
tjr [Wed, 19 Jun 2002 07:09:44 +0000 (07:09 +0000)]
Indicate that env(1) allows you to supply arguments to the utility it
executes in the usage() message and manual page. Use "utility" instead of
"command" in both places to emphasise that shell builtins etc. will not work,
and to be consistent with the terminology used by POSIX.
PR: 39210
Submitted by: Danny J. Zerkel <dzerkel@columbus.rr.com>
MFC after: 1 week
alfred [Wed, 19 Jun 2002 06:39:25 +0000 (06:39 +0000)]
Squish the "could sleep with process lock" messages caused by calling
uifind() with a proc lock held.
change_ruid() and change_euid() have been modified to take a uidinfo
structure which will be pre-allocated by callers, they will then
call uihold() on the uidinfo structure so that the caller's logic
is simplified.
This allows one to call uifind() before locking the proc struct and
thereby avoid a potential blocking allocation with the proc lock
held.
This may need revisiting, perhaps keeping a spare uidinfo allocated
per process to handle this situation or re-examining if the proc
lock needs to be held over the entire operation of changing real
or effective user id.
Submitted by: Don Lewis <dl-freebsd@catspoiler.org>
julian [Tue, 18 Jun 2002 21:32:33 +0000 (21:32 +0000)]
A node that creates a device entry in /dev (yay devfs)
so that /dev/mumble can be the entrypoint to some networking graph,
e.g. a tunnel or a remote tape drive or whatever...
Not fully tested (by me) yet.
Submitted by: Mark Santcroos <marks@ripe.net>
MFC after: 3 weeks
n_hibma [Tue, 18 Jun 2002 21:30:37 +0000 (21:30 +0000)]
Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.