luigi [Thu, 20 Sep 2001 13:52:49 +0000 (13:52 +0000)]
A bunch of minor changes to the code (see below) for readability, code size
and speed. No new functionality added (yet) apart from a bugfix.
MFC will occur in due time and probably in stages.
BUGFIX: fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (there is a PR on this).
OTHER CHANGES: minor changes to the internal struct for static and dynamic rules.
Requires rebuild of ipfw binary.
Add comments to show how data structures are linked together.
(It probably makes no sense to keep the chain pointers separate
from actual rule descriptors. They will be hopefully merged soon.
keep a (sysctl-readable) counter for the number of static rules,
to speed up IP_FW_GET operations
initial support for a "grace time" for expired connections, so we
can set timeouts for closing connections to much shorter times.
merge zero_entry() and resetlog_entry(), they use basically the
same code.
clean up and reduce replication of code for removing rules,
both for readability and code size.
introduce a separate lifetime for dynamic UDP rules.
fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (PR ...)
restructure dynamic rule descriptors
introduce some local variables to avoid multiple dereferencing of
pointer chains (reduces code size and hopefully increases speed).
peter [Thu, 20 Sep 2001 09:09:03 +0000 (09:09 +0000)]
Export kernbase like on the i386. I dont think the alpha kernel is
movable like on the x86, but this gets things in sync and reduces
the need for special cases in things like ps and libkvm etc.
peter [Thu, 20 Sep 2001 08:47:41 +0000 (08:47 +0000)]
Now that the compat4x libc.so.4 binary has been updated, we can finally
switch over to using a future-proof stdin/out/err.
Note that if you run 4.x binaries on your system, you will certainly
want to update /usr/lib/compat/libc.so.4. The easiest way is to
add "COMPAT4X= yes" in your /etc/make.conf.
Use the current process's credentials rather than socket's cached.
If the process drops its super-user privileges, we certainly don't
want to allow it to modify routing tables.
peter [Thu, 20 Sep 2001 05:13:43 +0000 (05:13 +0000)]
Wrap a module around the init code so that we have somethign do do a
modfind(2) on, and declare a version so that loader/kldload etc
can locate it (using kldxref's linker.hints file if needed).
Add probe line for the AMD 761 northbridge chip. At least it detects now,
seems to set up memory spaces correctly. This change actually did work for
me using -STABLE, XFree86 4.0.3 ~ some snapshot of DRI awhile back. I sent
mail to dfr to no avail, perhaps someone else would like to test it with
DRI.
Anyway, people have been nagging me about this change for awhile, so here's
the commit.
peter [Thu, 20 Sep 2001 03:45:51 +0000 (03:45 +0000)]
Oops. Fix a missing indirection level. gcc didn't complain about it on
x86, but did complain about it on alpha (since int and pointer are
different sizes)
luigi [Thu, 20 Sep 2001 02:52:02 +0000 (02:52 +0000)]
Make the script aware of mdconfig, so it can hopefully run on -CURRENT
as well. This works by selecting "md" or "vn" depending on "uname -r"
output, so we can use the same script on -CURRENT and -STABLE.
Also included minor bugfixes and code cleanup.
Testers welcome, as this code has only been tested on -STABLE
(and for this reason I am doing an immediate MFC).
Add minimal support for "o"-type print-file actions in lpd control files.
This was described in the original RFC wrt lpr, but most lpr's do not
actually implement it. There is some indication that MacOS 10.1 will
be using this when sending postscript files to print servers (that is
what "o"-type was supposed to signify -- postscript files).
Fix a bug in propagate priority: the kse group pointer wasn't being
updated in the loop so the new thread always seemd to have the same
priority as the original thread and no actual priorities were changed.
Handle the RX FIFO overflow condition with the rxeof handler instead
of the rxeoc handler for now. The rxeoc handler will reset the link,
and the NatSemi chip's RX FIFO will overflow on a 32-bit bus once you
start hitting it with 500Mbps or more of traffic.
Also increase the size of the RX ring to 128 descriptors (was 64).
BASESYNTAX, DQSYNTAX, SQSYNTAX and ARISYNTAX handles negative indexes.
Allow those to be used to properly quote characters in the shell
control character range.
Fix abuse of vtagtype. In addition, after this the linux programs will be
able correctly distinguish ext2fs from the ufs filesystem (previously ext2fs
was indistinguishable from the ufs).
Various fixes and improvements:
- fix harmless compiler's warnings (unused variables and missed prototype);
- before refusing to delete package because "there are packages installed
that require this package" check that packages in question is actually
installed;
- add new `-r' option to pkg_delete(8), which instructs it to delete not only
packages specified at command line, but all packages that depend on
specified packages as well.
peter [Wed, 19 Sep 2001 05:44:12 +0000 (05:44 +0000)]
Reserve an extra 16 bytes in case we have to grow the trapframe into
a vm86trapframe for switching to vm86 [unlikely] while exiting.
I lost this when doing the pcb move that went in with the KSE commit.
peter [Wed, 19 Sep 2001 05:34:12 +0000 (05:34 +0000)]
Fix a mistake I made with the pcb movement relative to the stack in the
KSE patch. We need to leave the 16 bytes here for enabling the trapframe
to be converted to a vm86trapframe if we're switching *to* a vm86 context.
peter [Wed, 19 Sep 2001 00:22:26 +0000 (00:22 +0000)]
The vfs.nfs.bufpackets sysctl is in the client, not the server. Move it
to the client section. Turn off nfsiod, it no longer exists (now just
kthreads). I need revisit nfsiod so that we have an argument passthrough.
Yes this really is rather silly and the implementation is overkill given
that you are only allowed one of them, but NetBSD implements cloning on
this device and it's a less cluttered example of cloning then most.
- If we ever do the per-cpu KTR stuff, the index won't be volatile as it
will be private to each CPU.
- Re-style(9) the globaldata structures. There really needs to be a MI
struct pcpu that has a MD struct mdpcpu member at some point.
If we have a p variable pointing to td->td_proc already, use it instead of
needlessly repeating the indirection in several places. Half of the places
used td->td_proc, and half used p. They are now consistent with each other
and all use p.
o Introduce two new calls, securelevel_gt() and securelevel_ge(), which
abstract the securelevel implementation details from the checking
code. The call in -CURRENT accepts a struct ucred--in -STABLE, it
will accept struct proc. This facilitates the upcoming commit of
per-jail securelevel support. The calls will also generate a
kernel printf if the calls are made with NULL ucred/proc pointers:
generally speaking, there are few instances of this, and they should
be fixed.
o Update p_candebug() to use securelevel_gt(); future updates to the
remainder of the kernel tree will be committed soon.
Set debug information on the process being traced, not the current (debugger)
process. This should allow gdb to function correctly on post-KSE kernels.
nfs_strategy calls nfs_asyncio with td as NULL. So add a bandaid that
will pass NULL as the struct proc when td is NULL. This has stopped
crashing on my machine.
Note: The passing of NULL may be bogus, but I'll let others fix that
problem.
Add support for loading bzip2-compressed kernels and modules. This support
is turned off by default and could be enabled by defining LOADER_BZIP2_SUPPORT
make variable. Also make gzip support optional (turned on by default) -
it could be turned off via LOADER_NO_GZIP_SUPPORT make variable.
Please note, that due to limit on the amount of memory available to the
loader(8), it is possible to load modules/kernels compressed with the smallest
block size supported by the bzip2 - 100k (`-1' bzip2(1) option), however
even in this mode bzip2(1) usually provides better compression ratio than
gzip(1) in its best compression mode.
Add support for loading bzip2-compressed filesystems. Among other things
this would allow to load bzip2-compressed kernels/modules from the loader(8)
(support for that will be committer separately).