yokota [Tue, 7 Aug 2001 11:51:26 +0000 (11:51 +0000)]
Don't call wakeup() while we are in DDB. The patch was
developed by bde. I added the same check in one more place
where wakeup() might be called during the DDB session.
Submitted by: bde
mike [Mon, 6 Aug 2001 22:01:31 +0000 (22:01 +0000)]
o Correctly define rcsid.
o Add consts where appropriate.
o Rename some variables that were shadowing global declarations.
o Remove register storage-classes.
o Make errmsg a const, so we can just set error messages instead
of using sprintf/strcpy.
o Set WARNS=2
ume [Mon, 6 Aug 2001 19:40:01 +0000 (19:40 +0000)]
printed current sequence number of the SA. accordingly, changed
into sadb_x_sa2_sequence from sadb_x_sa2_reserved3 in the sadb_x_sa2
structure. Also the output of setkey is changed. sequence number
of the sadb is replaced to the end of the output.
scottl [Mon, 6 Aug 2001 18:16:46 +0000 (18:16 +0000)]
After confering with sheldonh, it was decided that the tuning section should
be renamed back to 'Tuning' and should be a subsection under 'Description'.
also make a few other minor tweaks.
green [Mon, 6 Aug 2001 14:21:57 +0000 (14:21 +0000)]
Previously, the ELF linker would always just store the pointer to a
filename passed in via the module loader functions in the GDB
"sharedlibrary" support structures. This isn't good, since the pointer
would become stale in almost every case (not the pre-loaded case, of
course).
Change this to malloc()ed copy of the string and finally fix the reason
that gdb -k's "sharedlibrary" command stopped working.
chris [Mon, 6 Aug 2001 05:56:33 +0000 (05:56 +0000)]
Remove the fildesc_clone() function and its associated unnecessary code.
It didn't implement the proper /dev/fd functionality (which would be to
include in the directory listing /dev/fd/n if the process has fd n open)
anyway.
Anything needing access to /dev/fd/n where n > 2 can use the optional
fdescfs module, which implements this properly and does not cause any
trouble with devfs.
scottl [Mon, 6 Aug 2001 04:34:47 +0000 (04:34 +0000)]
Put the linux compat ioctl interface on death row. Add FreeBSD
definitions of all of the ioctls, plus round out all ioctl definitions to
match what exists for linux. Allow ioctls to be called through either the
native or linux interface, though no apps exist (yet) that can take
advantage of native calling.
jake [Mon, 6 Aug 2001 02:34:20 +0000 (02:34 +0000)]
Handle dmmu protection faults as well as misses. Enable tracking of
the modify and reference tte bits. Implementing allocating of tsb pages.
Make tsb_stte_lookup do the right thing with the kernel pmap.
jake [Mon, 6 Aug 2001 02:29:13 +0000 (02:29 +0000)]
Save the primary mmu context around calls to the prom, and install
nucleus context. The prom runs at trap level 0, so there's no
implicit nucleus context and we have to force it.
jake [Mon, 6 Aug 2001 02:18:39 +0000 (02:18 +0000)]
Add code model medlow to cflags and move the kernel load address from
just before the memory hole to 4 megs. Special case building exception.s
like locore.s, it needs to at the beginning so the branches out from the
trap table don't overflow.
gibbs [Sun, 5 Aug 2001 22:20:12 +0000 (22:20 +0000)]
aic7xxx.c:
Correct an off by one in our critical section handling.
SEQADDR always reads the next instruction to execute,
so we must subtract one from its value before making
comparisons with entries in the critical section table.
Print a few additional registers whenever we dump
card state.
Show the SCB_CONTROL and SCB_TAG values for all pending
SCBs in card SCB ram when dumping card state.
aic7xxx.seq:
Fix a bug introduced while optimizing the SDPTR path.
We would ack the SDPTR message twice on Ultra2 or better
chips if it occurred after all data had been transferred
for a transaction.
Change our workaround for the PCI2.1 retry bug on some
chips. Although the previous workaround was logically
correct, its faster method of draining the FIFO seemed
to occassionally confuse the FIFO state. We now drain
the FIFO at half the speed which avoids the problem.
aic7xxx_pci.c:
Chips with the PCI 2.1 retry bug can't handle a 16byte
cachesize. If the cachesize is set to 16bytes, drop
it to 0.
mike [Sun, 5 Aug 2001 19:37:12 +0000 (19:37 +0000)]
o Move APNIC flag from -p to -A. Since, -p is usually associated
with specifying a port.
o Add the -p flag for specifying a port. (PR: 28790) This is
useful for querying rwhois servers. Example:
whois -h rwhois.exodus.net -p rwhois 216.136.180.0
o Add the -c flag which allows one to get the same whois server
that would normally be determined if no arguments were specified.
(Concept based on work by phantom, requested by ache) Example:
whois -c ru TCNET-MNT-RIPN
o Deprecate -R flag in favour of -c ru.
iedowse [Sun, 5 Aug 2001 16:24:13 +0000 (16:24 +0000)]
Fix a number of bugs and annoyances in fdisk, many of which were
pointed out by bde:
- Ask for user confirmation before adjusting to a head/cylinder
boundary (only when running interactively), and separate this
adjustment from the automatic calculation of c/h/s parameters.
- In sanitize_partition, don't change any values in the slice until
we know that the automatic adjustment will succeed.
- When auto-adjusting, ignore unused slices and give an appropriate
error for other zero-size slices depending on the cause.
- Change dos() to do all of the c/h/s calculations for a whole slice;
this fixes a bug where the ending c/h/s of an unused slice was set
incorrectly.
- When changing the active slice, detect the currently active slice
number instead of always defaulting to slice 4.
- Call fflush(stdout) before calling fgets().
- Test for fgets() returning NULL so we don't loop on EOF.
sheldonh [Sun, 5 Aug 2001 11:15:23 +0000 (11:15 +0000)]
Clean up previous delta:
* Fix typo (defautls).
* Don't use hard sentence breaks in new text.
* Don't introduce the use of the second person (you).
* Use the standard "IMPLEMENTATION NOTES" section name instead of the
non-standard "TUNING".
scottl [Sun, 5 Aug 2001 07:26:31 +0000 (07:26 +0000)]
Once again throw out the calculation of si_iosize_max and set it to 64K.
Although it can go higher, it is not safe to so do on arrays with many
members. Compromise by adding a tunable, "hw.aac.iosize_max" that can be
set at boottime. Also document in the aac(4) manpage.
imp [Sun, 5 Aug 2001 07:02:42 +0000 (07:02 +0000)]
Now that we are setting a bit in the PCIC_INT_GEN (0x3) register, we
can't blindly write zero into it to disable the card. We must
preserve this bit. This changes pcic_disable to only clear the bits
we know we need to clear on card disable, thus preserving the magic
bit for many TI bridges.
This appears to have fixed the problems that people are reporting
about the system failing to recognize cards being inserted or removed
(or both). Greg: This may fix your problem too :-).
scottl [Sun, 5 Aug 2001 06:20:13 +0000 (06:20 +0000)]
Bugfixes. Close a race and logic bug in the timeout handling, don't call the
interrupt handler from the upper half, etc. This fixes some serious stability
problems that we were seeing on our production server. These patches have
been tested for almost 6 months and are a highly recommended MFC candidate.
Reviewed by: gibbs, merry, msmith
MFC after: 4 days
tmm [Sun, 5 Aug 2001 03:55:02 +0000 (03:55 +0000)]
Add a missing semicolon to unbreak the kernel build with INVARIANTS
(which was unfortunately turned off in the confguration I used for the
last test build).
It's bad enough to capitalize the name of the executable at the
beginning of the sentence, but at the very least it shouldn't be done
in the middle of a sentence!
tmm [Sat, 4 Aug 2001 20:17:05 +0000 (20:17 +0000)]
Add a zdestroy() function to the zone allocator. This is needed for the
unload case of modules that use their own zones.
It has been tested with the nfs module.
tmm [Sat, 4 Aug 2001 18:30:54 +0000 (18:30 +0000)]
Make use of the new features of libdevstat to allow iostat to work on
crash dumps, and make it use sysctl for all data retrievals in the
"live" case (i.e. when not using iostat on a crash dump).
Remove setgid kmem for the iostat executable, it is not needed any
more after these changes.
tmm [Sat, 4 Aug 2001 18:25:48 +0000 (18:25 +0000)]
Add some features to libdevstat, and overhaul the interface a bit:
1.) prefix all functions in the library with devstat_ (compatability
functions are available for all functions that were chaned in an
incompatible way, but are deprecated).
2.) Add a pointer to a kvm_t as the first argument to functions that
used to get their information via sysctl; they behave the same
as before when NULL is passed as this argument, otherwise, the
information is obtained via libkvm using the supplied handle.
3.) Add a new function, devstat_compute_statistics(), that is intended
to replace the old compute_stats() function. It offers more
statistics data, and has a more flexible interface.
libdevstat does now require libkvm; a library depedency is added, so
that libkvm only needs to be explicitely specified for statically linked
programs.
The library major version number is bumped.
Submitted by: Sergey A. Osokin <osa@freebsd.org.ru>, ken (3)
Reviewed by: ken
ume [Sat, 4 Aug 2001 17:10:14 +0000 (17:10 +0000)]
When running aplication joined multicast address,
removing network card, and kill aplication.
imo_membership[].inm_ifp refer interface pointer
after removing interface.
When kill aplication, release socket,and imo_membership.
imo_membership use already not exist interface pointer.
Then, kernel panic.
bde [Fri, 3 Aug 2001 22:28:25 +0000 (22:28 +0000)]
Link to libcipher in the usual way. `bdes' depended on a nonexistent
library. This only worked because of the undocmented feature of make(1)
that targets named foo.a are always up to date.
rwatson [Fri, 3 Aug 2001 18:21:06 +0000 (18:21 +0000)]
Anton kindly pointed out (and fixed) a bug in the Jail handling of the
bind() call on IPv4 sockets:
Currently, if one tries to bind a socket using INADDR_LOOPBACK inside a
jail, it will fail because prison_ip() does not take this possibility
into account. On the other hand, when one tries to connect(), for
example, to localhost, prison_remote_ip() will silently convert
INADDR_LOOPBACK to the jail's IP address. Therefore, it is desirable to
make bind() to do this implicit conversion as well.
Apart from this, the patch also replaces 0x7f000001 in
prison_remote_ip() to a more correct INADDR_LOOPBACK.
This is a 4.4-RELEASE "during the freeze, thanks" MFC candidate.
Submitted by: Anton Berezin <tobez@FreeBSD.org>
Discussed with at some point: phk
MFC after: 3 days
rwatson [Fri, 3 Aug 2001 17:20:34 +0000 (17:20 +0000)]
Collapse a Pmem case in with the other debugging files case for procfs,
as there are now "unusual" protection properties to Pmem that differ
from the other files. While I'm at it, introduce proc locking for
the other files, which was previously present only in the Pmem case.
rwatson [Fri, 3 Aug 2001 17:13:23 +0000 (17:13 +0000)]
Prior to support for almost all ps activity via sysctl, ps used procfs,
and so special-casing was introduced to provide extra procfs privilege
to the kmem group. With the advent of non-setgid kmem ps, this code
is no longer required, and in fact, can is potentially harmful as it
allocates privilege to a gid that is increasingly less meaningful.
Knowledge of specific gid's in kernel is also generally bad precedent,
as the kernel security policy doesn't distinguish gid's specifically,
only uid 0.
This commit removes reference to kmem in procfs, both in terms of
access control decisions, and the applying of gid kmem to the
/proc/*/mem file, simplifying the associated code considerably.
Processes are still permitted to access the mem file based on
the debugging policy, so ps -e still works fine for normal
processes and use.
fenner [Fri, 3 Aug 2001 16:51:53 +0000 (16:51 +0000)]
Don't terminate the uiomove() loop on a zero-length mbuf. It's not
particularly nice that IPSEC inserts a zero-length mbuf into the
chain, and that bug should be fixed too, but interfaces should be
robust to bad input.
Print the interface name when TUNDEBUG()ing about dropping an mbuf.
markm [Fri, 3 Aug 2001 16:03:26 +0000 (16:03 +0000)]
Revamp and diff-reduce the various secure telnets. Make sure that
Kerberos5 has _a_ telnet (which is not currently K5 enabled).
Incorporate BDE's static linking fixes.