marcel [Fri, 27 Aug 2004 21:57:00 +0000 (21:57 +0000)]
Catch up with the drive-by renaming of IA32 to COMPAT_IA32. Missed
11 days ago when all the other places were fixed and finally caught
by the tinderbox run...
gibbs [Fri, 27 Aug 2004 21:33:33 +0000 (21:33 +0000)]
Forced commit to add additional comment.
o Add MOUSE_PS2_TAP into syncmask[0] correctly when we're built with
PSM_CONFIG_FORCETAP. The previous code from revision 1.56 attempted
to do this but updated the a mask variable that would be clobbered later.
o If syncmask[1] hasn't yet been set when ioctl(MOUSE_GETMODE) is called,
zero syncmask[0] and syncmask[1] so that sync validation is effectively
disabled in userland applications and moused doesn't misbehave. The
psm driver performs sync validation so there is no loss in functionality
in clearing the sync mask.
o If PSM_NEED_SYNCBITS is set, setup syncmask[1], even if it's already
correct. This prevents the PSM_NEED_SYNCBITS bit from being left on
after a re-initialisation and erroneously causing a subsequent
out-of-sync packet to mis-set syncmask[1].
gibbs [Fri, 27 Aug 2004 21:25:16 +0000 (21:25 +0000)]
Improve sync recovery algorithm:
o Remove PSM_SYNCERR_THRESHOLD1. This value specified how many sync
errors were required before the mouse is re-initialised.
Re-initialisation is now done after (packetsize * 2) sync errors as
things aren't likely to improve after that.
o Reset lastinputerror when re-initialisation occurs. We don't want
to continue to drop data after re-initialisation.
o Count the number of failed packets independently of the syncerrors
statistic. syncerrors is useful for recovering sync within a single
packet. pkterrors allows us to detect when the mouse changes its
packet mode due to some external event (e.g. KVM switch).
o Reinitialize the mouse if we see more than psmpkterrthresh errors
during the validation period. The validation period begins as soon
as a sync error is detected and continues until psmerrsecs/msecs
time has elapsed. The defaults for these two values force a reset
if we see two packet errors in a 2 second period. This allows rapid
detection of packet framing errors caused by the mouse changing packet
modes.
o Export psmpkterrthresh as a sysctl
o Export psmloglevel as a sysctl.
o Enable more debugging code to be enabled at runtime via psmloglevel.
o Simplify verbose conditioned loging by using a VLOG macro.
o Add several comments describing the sync recovery algorithm of
this driver.
Large Portions by: Brian Somers <brian@Awfulhak.org>
Inspired and Frustrated by: Belkin KVMs
Reviewed by: njl, philip
andre [Fri, 27 Aug 2004 21:23:50 +0000 (21:23 +0000)]
Poll() uses the array smallbits that is big enough to hold 32 struct
pollfd's to avoid calling malloc() on small numbers of fd's. Because
smalltype's members have type char, its address might be misaligned
for a struct pollfd. Change the array of char to an array of struct
pollfd.
PR: kern/58214
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: bde (a long time ago)
MFC after: 3 days
marcel [Fri, 27 Aug 2004 19:42:35 +0000 (19:42 +0000)]
Move the kernel-specific logic to adjust frompc from MI to MD. For
these two reasons:
1. On ia64 a function pointer does not hold the address of the first
instruction of a functions implementation. It holds the address
of a function descriptor. Hence the user(), btrap(), eintr() and
bintr() prototypes are wrong for getting the actual code address.
2. The logic forces interrupt, trap and exception entry points to
be layed-out contiguously. This can not be achieved on ia64 and is
generally just bad programming.
The MCOUNT_FROMPC_USER macro is used to set the frompc argument to
some kernel address which represents any frompc that falls outside
the kernel text range. The macro can expand to ~0U to bail out in
that case.
The MCOUNT_FROMPC_INTR macro is used to set the frompc argument to
some kernel address to represent a call to a trap or interrupt
handler. This to avoid that the trap or interrupt handler appear to
be called from everywhere in the call graph. The macro can expand
to ~0U to prevent adjusting frompc. Note that the argument is selfpc,
not frompc.
This commit defines the macros on all architectures equivalently to
the original code in sys/libkern/mcount.c. People can take it from
here...
Compile-tested on: alpha, amd64, i386, ia64 and sparc64
Boot-tested on: i386
simon [Fri, 27 Aug 2004 19:29:21 +0000 (19:29 +0000)]
- For column lists: ignore first item when it is likely to be a header.
- Clean up and improve handling of trailing punctuation characters.
- Handle the Pa macro.
- Give a warning when ignoring unimplemented mdoc commands.
marcel [Fri, 27 Aug 2004 19:13:35 +0000 (19:13 +0000)]
Have the linker provide the btext symbol when referenced. This is needed
for profiling kernels. Apparently, nobody has ever tried to build one on
alpha...
alc [Fri, 27 Aug 2004 19:06:17 +0000 (19:06 +0000)]
The machine-independent parts of the virtual memory system always pass a
valid pmap to the pmap functions that require one. Remove the checks for
NULL. (These checks have their origins in the Mach pmap.c that was
integrated into BSD. None of the new code written specifically for
FreeBSD included them.)
rwatson [Fri, 27 Aug 2004 18:41:41 +0000 (18:41 +0000)]
Semi-gratuitous white space synchronization with KAME tree: to reduce
diffs against #ifdef'd version of IPSEC, use "struct thread *p"
rather than "struct proc *p", fix some white space, and make some
already inconsistent white space inconsiste differently.
andre [Fri, 27 Aug 2004 18:33:08 +0000 (18:33 +0000)]
Apply error and success logic consistently to the function netisr_queue() and
its users.
netisr_queue() now returns (0) on success and ERRNO on failure. At the
moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full)
are supported.
Previously it would return (1) on success but the return value of IF_HANDOFF()
was interpreted wrongly and (0) was actually returned on success. Due to this
schednetisr() was never called to kick the scheduling of the isr. However this
was masked by other normal packets coming through netisr_dispatch() causing the
dequeueing of waiting packets.
PR: kern/70988
Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
MFC after: 3 days
andre [Fri, 27 Aug 2004 15:39:34 +0000 (15:39 +0000)]
In the case the destination of a packet was changed by the packet filter
to point to a local IP address; and the packet was sourced from this host
we fill in the m_pkthdr.rcvif with a pointer to the loopback interface.
Before the function ifunit("lo0") was used to obtain the ifp. However
this is sub-optimal from a performance point of view and might be dangerous
if the loopback interface has been renamed. Use the global variable 'loif'
instead which always points to the loopback interface.
andre [Fri, 27 Aug 2004 15:16:24 +0000 (15:16 +0000)]
Always compile PFIL_HOOKS into the kernel and remove the associated kernel
compile option. All FreeBSD packet filters now use the PFIL_HOOKS API and
thus it becomes a standard part of the network stack.
If no hooks are connected the entire packet filter hooks section and related
activities are jumped over. This removes any performance impact if no hooks
are active.
Both OpenBSD and DragonFlyBSD have integrated PFIL_HOOKS permanently as well.
roam [Fri, 27 Aug 2004 14:51:21 +0000 (14:51 +0000)]
Remove the misleading description of the 'key' argument to
mpool_open(3) - it is *not* really used for synchronization; in fact,
it is not used at all.
PR: 70929
Submitted by: Martin Kammerhofer <dada@sbox.tugraz.at>
MFC after: 3 days
sos [Fri, 27 Aug 2004 14:48:32 +0000 (14:48 +0000)]
Fix the handling of "inflight" requests when doing reinit's.
Add missing untimeout that would get lost in handling of some
error situations, and caused what looked like random timeouts
afterwards when the timeout fired.
osa [Fri, 27 Aug 2004 13:38:01 +0000 (13:38 +0000)]
Two things:
1. we are already under 6.0-CURRENT
2. add FreeBSD Design and Impl. book description
(obtained from http://www.awprofessional.com/title/0201702452)
iedowse [Fri, 27 Aug 2004 01:20:26 +0000 (01:20 +0000)]
When trying each linker class in turn with a preloaded module, exit
the loop if the preload was successful. Previously a successful
preload was ignored if the linker class was not the last in the
list.
iedowse [Fri, 27 Aug 2004 01:10:16 +0000 (01:10 +0000)]
Add a new module information type MODINFOMD_SHDR that will be used
by the loader to pass the section header table from preloaded ELF
relocatable modules into the kernel.
iedowse [Fri, 27 Aug 2004 01:06:57 +0000 (01:06 +0000)]
Add MD relocation support for amd64 and i386 platforms. The no-op
relocation is not sufficient for ELF relocatable object format
modules, since accessing the module metadata involves following
pointers between different ELF sections.
This allows kldxref to correctly build linker.hints on the amd64
platform.
iedowse [Fri, 27 Aug 2004 00:51:21 +0000 (00:51 +0000)]
Call the file format specific code through a table of function
pointers and remove knowledge of the file format from kldxref.c.
This will make it possible to support more than one file format.
le [Thu, 26 Aug 2004 21:04:41 +0000 (21:04 +0000)]
When attaching a consumer from a volume to a plex, check if the
volume already has a plex attached and adjust the access counts
of the new consumer accordingly.
nectar [Thu, 26 Aug 2004 19:37:06 +0000 (19:37 +0000)]
Correct a denial-of-service vulnerability in zlib.
For reference, this bug was first reported at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252253
Submitted by: "Dmitry V. Levin" <ldv@altlinux.org>
tjr [Thu, 26 Aug 2004 13:16:44 +0000 (13:16 +0000)]
Improve the robustness of MSDOSFSMNT_KICONV handling:
- Use copyinstr() to read cs_win, cs_dos, cs_local strings from the
mount argument structure instead of reading through user-space pointers(!).
- When mounting a filesystem, or updating an existing mount, only try to
update the iconv handles from the information in the mount argument
structure if the structure itself has the MSDOSFSMNT_KICONV flag set.
- Attempt to handle failure of update_mp() in the MNT_UPDATE case.
brueffer [Thu, 26 Aug 2004 08:34:09 +0000 (08:34 +0000)]
- move the list of supported adapters into a HARDWARE section
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date
brueffer [Thu, 26 Aug 2004 08:33:03 +0000 (08:33 +0000)]
- move the list of supported adapters into a HARDWARE section
- sort the list of adapters
- add the 3Com 3c460 HomeConnect Ethernet USB Adapter [1]
- properly capitalize Ethernet
- replace a misleading 'adapter' with 'chipset'
- bump document date
kientzle [Thu, 26 Aug 2004 03:53:43 +0000 (03:53 +0000)]
Don't edit permissions of pre-existing directories during extract.
This closes a security hole. Otherwise, libarchive will happily
extract into directories to which it lacks write permissions by
resetting the permissions during the extract.
simon [Thu, 26 Aug 2004 00:19:54 +0000 (00:19 +0000)]
- Add a HARDWARE section which lists supported devices.
- Mark up each item in the device list with .It, as per mdoc(7) and to
make it simpler for auto generated Hardware Notes to parse the manual
page.
brueffer [Wed, 25 Aug 2004 22:39:05 +0000 (22:39 +0000)]
- put the list of supported adapters into a HARDWARE section
- make the Buffalo entry look better
- properly capitalize Ethernet and Fast Ethernet
- bump document date
marius [Wed, 25 Aug 2004 22:15:33 +0000 (22:15 +0000)]
Don't call uart_bus_probe() for non-matching PnP-devices. Trying to probe
the keyboard controller with uart_bus_probe() caused a hang here on an i386
machine.
ru [Wed, 25 Aug 2004 22:06:29 +0000 (22:06 +0000)]
Fix "make world DESTDIR=/mnt" to work again. A recent change
to make(1) that causes command-line variables to be passed as
command-line variables to sub-processes that make(1) executes
broke it. By changing the type of all DESTDIR variables used
internally in Makefile.inc1, from environment to command-line
variables of the highest priority, I was able to "make world"
with success, with the command-line variable DESTDIR set.
rwatson [Wed, 25 Aug 2004 21:24:36 +0000 (21:24 +0000)]
Don't hold the UNIX domain socket subsystem lock over the body of the
UNIX domain socket garbage collection implementation, as that risks
holding the mutex over potentially sleeping operations (as well as
introducing some nasty lock order issues, etc). unp_gc() will hold
the lock long enough to do necessary deferal checks and set that it's
running, but then release it until it needs to reset the gc state.
imp [Wed, 25 Aug 2004 19:39:13 +0000 (19:39 +0000)]
Recommend using make kernel for current -> current upgrades. No reason
to have multiple commands for that.
Use relative paths into the src tree consistantly in the instructions.
Fix minor nits that have crept into things.