]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoLock down arc4random so it can be safely called w/o Giant.
Mike Silbersack [Fri, 15 Aug 2003 06:34:47 +0000 (06:34 +0000)]
Lock down arc4random so it can be safely called w/o Giant.

Minor code reorganization was required, but the only functional
change was that the first 1024 bytes of output are thrown out
after each reseed, rather than just the initial seed.

21 years agoRevert part of rev. 1.16 -- reinstate system notify handler. It turns out
Nate Lawson [Fri, 15 Aug 2003 06:33:11 +0000 (06:33 +0000)]
Revert part of rev. 1.16 -- reinstate system notify handler.  It turns out
at least the Casio FIVA requires this.

Requested by: takawata

21 years agoImprove the C3 CPU identification. I didn't notice that the CPU id
Warner Losh [Fri, 15 Aug 2003 06:02:24 +0000 (06:02 +0000)]
Improve the C3 CPU identification.  I didn't notice that the CPU id
was masked.  However KIMURA Yasuhiro-san noticed my mistake and was
kind enough to provide a better patch in PR 55581.  I've merged that
into the routine.  Hopefully I've not overlooked anything this time.

MFC After: 5 days

21 years agoFix the generation of coredumps. We did not take the dirty registers
Marcel Moolenaar [Fri, 15 Aug 2003 05:52:48 +0000 (05:52 +0000)]
Fix the generation of coredumps. We did not take the dirty registers
that were on the kernel stack into account. For now we write them
out to the register stack of the process before creating the dump.
This however is not the final solution. The problem is that we may
invalidate the coredump by overwriting vital information due to an
invalid backing store pointer. Instead we need to write the dirty
registers to an unused region of VM which will result in a seperate
segment in the coredump. For now we can at least get to all the
registers from a coredump.

21 years agoAdd an instruction group break after the move to application register
Marcel Moolenaar [Fri, 15 Aug 2003 05:46:33 +0000 (05:46 +0000)]
Add an instruction group break after the move to application register
and the move to control register to avoid dependency violations when
these functions are used. Note that explicit data and instruction
serialization also need to be in a subsequent instruction group.
This too requires that we have an igrp break here.

21 years agoIntroduce two machine specific ptrace(2) requests: PT_GETKSTACK and
Marcel Moolenaar [Fri, 15 Aug 2003 05:40:59 +0000 (05:40 +0000)]
Introduce two machine specific ptrace(2) requests: PT_GETKSTACK and
PT_SETKSTACK. These requests allow the tracing process to access the
dirty registers of the traced process that are on the kernel stack.

Note that there's currently no way to access the rnat register for
those dirty registers that are not (yet) covered by a nat collection
point. The interface for this is still being slept on.

Also note that implied by these requests is the division of work:
The tracing process has to keep track of where registers are spilled
and is responsible to figure out where the NaT bit of the stacked
registers are at any time during the execution of the traced process.
The kernel provides the interfaces but will not abstract the fact
that the register stack can be split. This model does not follow
the approach taken in Linux where PT_PEEK and PT_POKE deals with
this automagically.

21 years agoAdd or finish support for machine dependent ptrace requests. When we
Marcel Moolenaar [Fri, 15 Aug 2003 05:25:06 +0000 (05:25 +0000)]
Add or finish support for machine dependent ptrace requests. When we
check for permissions, do it for all requests, not the known requests.
Later when we actually service the request we deal with the invalid
requests we previously caught earlier.

This commit changes the behaviour of the ptrace(2) interface for
boundary cases such as an unknown request without proper permissions.
Previously we would return EINVAL. Now we return EBUSY or EPERM.

Platforms need to define __HAVE_PTRACE_MACHDEP when they have MD
requests. This makes the prototype of cpu_ptrace() visible and
introduces a call to this function for all requests greater or
equal to PT_FIRSTMACH.

Silence on: audit

21 years agoExtend the scope of the page queues lock in vm_pageout_scan() to cover
Alan Cox [Fri, 15 Aug 2003 05:13:36 +0000 (05:13 +0000)]
Extend the scope of the page queues lock in vm_pageout_scan() to cover
the traversal of the PQ_INACTIVE queue.

21 years agovinum_scandisk:
Greg Lehey [Fri, 15 Aug 2003 04:36:53 +0000 (04:36 +0000)]
vinum_scandisk:

  Correctly handle additional disks without BIOS partition tables.
  Previously, vinum_scandisk stopped scanning additional disks for
  native partitions after any good partition was found.  This applies
  to all platforms, but was a particular problem on systems without
  BIOS partition tables.

Submitted by: harti

21 years agoif we got this far, we definately don't have an EBADF. Return a more
John-Mark Gurney [Fri, 15 Aug 2003 04:31:01 +0000 (04:31 +0000)]
if we got this far, we definately don't have an EBADF.  Return a more
sane result of EPIPE.

Reported by: nCircle dev team
MFC after: 3 day

21 years agoDrop Giant when calling the disk drivers directly, and reacquire
Greg Lehey [Fri, 15 Aug 2003 03:57:15 +0000 (03:57 +0000)]
Drop Giant when calling the disk drivers directly, and reacquire
afterwards.  This fixes the Vinum breakage in -CURRENT.

Breakage explained by: phk

21 years agomodify comments
Cameron Grant [Fri, 15 Aug 2003 02:31:13 +0000 (02:31 +0000)]
modify comments

21 years agoDe-inline functions which do not need to be inline. Move the DEVMETHOD
Nate Lawson [Fri, 15 Aug 2003 02:18:15 +0000 (02:18 +0000)]
De-inline functions which do not need to be inline.  Move the DEVMETHOD
block to where it is in similar drivers.

21 years agoDon't install a system notify handler. Move the device notify handler
Nate Lawson [Fri, 15 Aug 2003 02:17:23 +0000 (02:17 +0000)]
Don't install a system notify handler.  Move the device notify handler
installation to just before we're ready to handle events.  Make a loop
more readable (no functional change).

21 years agoFix a couple changes that were incorrect in updating for 0619. Only unlock
Nate Lawson [Fri, 15 Aug 2003 02:10:38 +0000 (02:10 +0000)]
Fix a couple changes that were incorrect in updating for 0619.  Only unlock
the hardware mutex if it is held.  Re-add calls to Enable/Clear fixed events.

This is not known to have caused problems.  Bug symptoms might have included
instability after an aborted suspend attempt or power/sleep buttons not
being enabled.

21 years agoadd a few missing bits for future use
Cameron Grant [Fri, 15 Aug 2003 01:24:36 +0000 (01:24 +0000)]
add a few missing bits for future use

21 years agodisable resume code implementing panic().
Cameron Grant [Thu, 14 Aug 2003 22:09:10 +0000 (22:09 +0000)]
disable resume code implementing panic().

this needs to be reimplemented properly.

21 years agoadd a read-only sysctl to display the number of entries in the fixed size
Cameron Grant [Thu, 14 Aug 2003 21:16:46 +0000 (21:16 +0000)]
add a read-only sysctl to display the number of entries in the fixed size
kobj global method table; also kassert that the table has not overflowed
when defining a new method.

there are indications that the table is being overflowed in certain
situations as we gain more kobj consumers- this will allow us to check
whether kobj is at fault.  symptoms would be incorrect methods being called.

21 years agodaemon() has to be called prior to file descriptor setups
Hajimu UMEMOTO [Thu, 14 Aug 2003 19:05:24 +0000 (19:05 +0000)]
daemon() has to be called prior to file descriptor setups
(otherwise file descriptors could be closed mistakenly)

Obtained from: KAME
MFC after: 1 week

21 years agoHook up ffsinfo(8).
Robert Watson [Thu, 14 Aug 2003 18:55:57 +0000 (18:55 +0000)]
Hook up ffsinfo(8).

21 years agoCommit 1 of 2 to fix ffsinfo(8) for UFS2.
Robert Watson [Thu, 14 Aug 2003 18:55:31 +0000 (18:55 +0000)]
Commit 1 of 2 to fix ffsinfo(8) for UFS2.

Update ffsinfo(8) to use new UFS2 support in the growfs(8) debugging
functions.  Largely consists of renaming fields and types to be aware
of the UFS1/UFS2 distinction, relying on libufs(3) to open and sanity
check the device/file/label accessed.

Since libufs(3) now handles label/UFS interactions, remove -L argument.

Note: when submitted, this patch had substantial style changes.  I've
attempted to remove the restyling from the patch to separate the
functional and style changes.

Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
PR: bin/53517

21 years agoBegin snipping out the lists of specific devices from the Hardware
Bruce A. Mah [Thu, 14 Aug 2003 18:52:45 +0000 (18:52 +0000)]
Begin snipping out the lists of specific devices from the Hardware
Notes.  These duplicate information that ideally should live in the
manual pages for individual drivers, and can easily become
out-of-date.  (This in fact is already the case.)

Hypertext versions of the hardware notes already contain links to
on-line versions of the manual pages.

The first two drivers to get this treatment are amr(4) and aac(4).

Discussed on: doc@

21 years agosupport poll(2).
Hajimu UMEMOTO [Thu, 14 Aug 2003 18:43:57 +0000 (18:43 +0000)]
support poll(2).

Obtained from: KAME
MFC after: 1 week

21 years agoCommit 1 of 2 to fix ffsinfo(8) for UFS2.
Robert Watson [Thu, 14 Aug 2003 18:40:59 +0000 (18:40 +0000)]
Commit 1 of 2 to fix ffsinfo(8) for UFS2.

Add support for UFS2 to the UFS debugging routines in growfs; required
to update ffsinfo(8) for UFS2.  A variety of types and fs variables are
renamed to reflect UFS1/2 structures.  Also, the print routines for
inodes are now split into separate UFS1 and UFS2 versions.  We now
define dbg_dump_csum_total(), but lose the printing of rotational
information since that's not present in UFS2.  In the future, we may
want to re-add this functionality to print it solely for UFS1.

Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
PR: bin/53517

21 years agodaemon() has to be called prior to file descriptor setups
Hajimu UMEMOTO [Thu, 14 Aug 2003 18:13:34 +0000 (18:13 +0000)]
daemon() has to be called prior to file descriptor setups
(otherwise file descriptors could be closed mistakenly)

Obtained from: KAME
MFC after: 1 week

21 years ago- rename some variables.
Hajimu UMEMOTO [Thu, 14 Aug 2003 16:51:13 +0000 (16:51 +0000)]
- rename some variables.
- remove unused block.

Obtained from: KAME
MFC after: 1 week

21 years agosignal handler must take "int" arg.
Hajimu UMEMOTO [Thu, 14 Aug 2003 16:23:39 +0000 (16:23 +0000)]
signal handler must take "int" arg.

Obtained from: KAME
MFC after: 1 week

21 years agoavoid fd_set overrun.
Hajimu UMEMOTO [Thu, 14 Aug 2003 16:19:59 +0000 (16:19 +0000)]
avoid fd_set overrun.

Obtained from: KAME
MFC after: 1 week

21 years agosignal handler must take "int" arg.
Hajimu UMEMOTO [Thu, 14 Aug 2003 15:57:52 +0000 (15:57 +0000)]
signal handler must take "int" arg.

Obtained from: KAME
MFC after: 1 week

21 years agoavoid fd_set overrun.
Hajimu UMEMOTO [Thu, 14 Aug 2003 15:47:31 +0000 (15:47 +0000)]
avoid fd_set overrun.

Obtained from: KAME
MFC after: 1 week

21 years agoNow that routes for IP over ATM may look much more complex than before,
Hartmut Brandt [Thu, 14 Aug 2003 15:27:32 +0000 (15:27 +0000)]
Now that routes for IP over ATM may look much more complex than before,
use the atmconfig(8) utility instead of route(8) to install those routes.
For this we need a new rc.conf variable natm_static_routes that works
just like static_routes except that the referenced routes use the syntax
of atmconfig(8).

Okay'ed by: mtm

21 years agoAdd p_candebug() check to access a process map file in procfs; limit
Robert Watson [Thu, 14 Aug 2003 15:26:44 +0000 (15:26 +0000)]
Add p_candebug() check to access a process map file in procfs; limit
access to map information for processes that you wouldn't otherwise
have debug rights on.

Tested by: bms

21 years agodecreased too-strong log levels.
Hajimu UMEMOTO [Thu, 14 Aug 2003 15:21:55 +0000 (15:21 +0000)]
decreased too-strong log levels.

Obtained from: KAME
MFC after: 1 week

21 years agoAdd many new VIA C3 CPU types now that they appear to be available in
Warner Losh [Thu, 14 Aug 2003 15:17:49 +0000 (15:17 +0000)]
Add many new VIA C3 CPU types now that they appear to be available in
machines (at least in Japan).

Submitted by: Masahiko KIMOTO-san
PR: 55578

21 years agoAdd safe _FOREACH iterators to the rest of the queue.h types.
Alexander Kabaev [Thu, 14 Aug 2003 14:49:26 +0000 (14:49 +0000)]
Add safe _FOREACH iterators to the rest of the queue.h types.

21 years agoThe as(1) manpage was missing on i386 and amd64.
Ruslan Ermilov [Thu, 14 Aug 2003 14:43:29 +0000 (14:43 +0000)]
The as(1) manpage was missing on i386 and amd64.

21 years agoAdd support for the newer Moxa PCI 8-port, 16550-compatible based
Pierre Beyssac [Thu, 14 Aug 2003 14:15:16 +0000 (14:15 +0000)]
Add support for the newer Moxa PCI 8-port, 16550-compatible based
CP-168U board. It initializes and attaches in the same way as the
older (but higher performance) C168H. The only difference is the
board ID, which is 0x1681.

PR: kern/53548
Submitted by: regnauld@catpipe.net
MFC after: 1 week

21 years agoRemoved check of st_rdev changing in the -F support. st_rdev for regular
David Greenman [Thu, 14 Aug 2003 11:02:03 +0000 (11:02 +0000)]
Removed check of st_rdev changing in the -F support. st_rdev for regular
files is usually the first direct block pointer. Since FreeBSD does
automatic block reallocation to reduce filesystem fragmentation, the
file being tailed can be relocated to different blocks 'on-the-fly',
making the check for st_rdev unreliable. The result of this bug is
tail -F pseudo-randomnly thinking the file was rotated when it wasn't,
and as a result, spews out the entire file trying to catch up.

MFC after: 3 days

21 years agotrivial optimization: use nameunit here.
Warner Losh [Thu, 14 Aug 2003 07:15:19 +0000 (07:15 +0000)]
trivial optimization: use nameunit here.

21 years agoNote that Microsoft MN-520 WLAN card is now supported.
Warner Losh [Thu, 14 Aug 2003 06:35:48 +0000 (06:35 +0000)]
Note that Microsoft MN-520 WLAN card is now supported.

21 years agoAdd microsoft mn-520 wlan card.
Warner Losh [Thu, 14 Aug 2003 06:30:06 +0000 (06:30 +0000)]
Add microsoft mn-520 wlan card.

Submitted by: Kirk Strauser

21 years agoresync to pcarddevs 1.63
Warner Losh [Thu, 14 Aug 2003 06:27:48 +0000 (06:27 +0000)]
resync to pcarddevs 1.63

21 years agoadd microsoft mn-520 wlan card.
Warner Losh [Thu, 14 Aug 2003 06:26:58 +0000 (06:26 +0000)]
add microsoft mn-520 wlan card.

submitted by: Kirk Strauser

21 years agoEliminate pmap_page_lookup() and its uses. Instead, use PHYS_TO_VM_PAGE()
Alan Cox [Thu, 14 Aug 2003 05:18:38 +0000 (05:18 +0000)]
Eliminate pmap_page_lookup() and its uses.  Instead, use PHYS_TO_VM_PAGE()
to convert the pte's physical address into a vm page.

Reviewed by: peter

21 years agoUpdate powerpc to use the (old thread,new thread) calling convention
Peter Grehan [Thu, 14 Aug 2003 03:56:24 +0000 (03:56 +0000)]
Update powerpc to use the (old thread,new thread) calling convention
for cpu_throw() and cpu_switch().

21 years agoCrank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
Josef Karthauser [Thu, 14 Aug 2003 00:15:23 +0000 (00:15 +0000)]
Crank down UVISORBUFSIZE from 1024 to 64 to avoid a problem where
the Palm device and the USB host controller deadlock. The USB host
controller is expecting an early-end-of-transmission packet with 0
data, and the Palm doesn't send one because it's already communicated
the amount of data it's going to send in a header (which ucom/uvisor
are oblivious to). This is the problem that has been known on the
pilot-link lists as the "[Free]BSD USB problem", but not understood.

Submitted by: Nathan J. Williams <nathanw@MIT.EDU>

21 years agoSet the TX hardware checksum offload bits on all the descriptors of a
Bill Paul [Wed, 13 Aug 2003 22:39:21 +0000 (22:39 +0000)]
Set the TX hardware checksum offload bits on all the descriptors of a
multi-fragment transmission. I'm not sure if this is a bug or a requirement
that I overlooked with going through the documentation, but the sample
8169 NIC that I have seems to require it at least some of the time or
else it botches TCP checksums on segments that span multiple descriptors.

21 years agomake sure the packets contains a complete inner header
Sam Leffler [Wed, 13 Aug 2003 22:36:24 +0000 (22:36 +0000)]
make sure the packets contains a complete inner header
for ip{4,6}-in-ip{4,6} encapsulation; fixes panic
for truncated ip-in-ip over ipsec

Submitted by: Markus Friedl <markus@openbsd.org>
Obtained from: OpenBSD (rev 1.66 ipsec_input.c)

21 years agoDelay creating ic_bss until after the super-class has a chance
Sam Leffler [Wed, 13 Aug 2003 22:09:44 +0000 (22:09 +0000)]
Delay creating ic_bss until after the super-class has a chance
to override the method pointers for manipulating nodes; this fixes
a problem where the ic_bss node was not being created properly
for the ath driver causing the driver to scribble on random memory.

Noticed by: David Young <dyoung@pobox.com>

21 years agoUse IEEE80211_RATE_MAXSIZE instead of IEEE80211_RATE_SIZE to validate the
Sam Leffler [Wed, 13 Aug 2003 21:49:35 +0000 (21:49 +0000)]
Use IEEE80211_RATE_MAXSIZE instead of IEEE80211_RATE_SIZE to validate the
rate set element id from an AP.  This allows stations to associate with
AP's that violate the 802.11 spec by sending >8 rates.  This corrects a
recent regression; older code did likewise.

21 years agoClose a race where ath_intr is installed and may be called before
Sam Leffler [Wed, 13 Aug 2003 21:29:35 +0000 (21:29 +0000)]
Close a race where ath_intr is installed and may be called before
the HAL is setup: use sc_invalid to discard such entries into
ath_intr.  This can easily happen if the device is assigned a shared IRQ.

21 years agoo add missing {}'s that to safe_dmamap_uniform that caused extraneous copies
Sam Leffler [Wed, 13 Aug 2003 20:42:53 +0000 (20:42 +0000)]
o add missing {}'s that to safe_dmamap_uniform that caused extraneous copies
  for partly-aligned operations through /dev/crypto (unlikely)
o add missing case in iov code that never showed up because of the above bug

Submitted by: "Jason L. Wright" <jason@thought.net>
MFC after: 3 days

21 years agoUse STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO in a few more
Garance A Drosehn [Wed, 13 Aug 2003 20:31:33 +0000 (20:31 +0000)]
Use STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO in a few more
places (replacing constants 0, 1 & 2).

Noticed by:
Reviewed by: md5
MFC after: 4 days

21 years ago - The vm_object pointer in pipe_buffer is unused. Remove it.
Alan Cox [Wed, 13 Aug 2003 20:01:38 +0000 (20:01 +0000)]
 - The vm_object pointer in pipe_buffer is unused.  Remove it.
 - Check for successful initialization of pipe_zone in pipeinit()
   rather than every call to pipe(2).

21 years agoDocument LIST_FOREACH_SAFE in queue(3).
Bosko Milekic [Wed, 13 Aug 2003 19:58:38 +0000 (19:58 +0000)]
Document LIST_FOREACH_SAFE in queue(3).

Asked with "please" by Ruslan Ermilov.  I've always had a weakness
for "please".

21 years agoRemove GIANT_REQUIRED from vmspace_alloc().
Alan Cox [Wed, 13 Aug 2003 19:23:51 +0000 (19:23 +0000)]
Remove GIANT_REQUIRED from vmspace_alloc().

21 years agoAdd Alfred Hitchcock's birthday.
Murray Stokely [Wed, 13 Aug 2003 19:21:11 +0000 (19:21 +0000)]
Add Alfred Hitchcock's birthday.

Inspired by: google.com

21 years agoAdd LIST_FOREACH_SAFE, which is like LIST_FOREACH but allows you
Bosko Milekic [Wed, 13 Aug 2003 18:37:25 +0000 (18:37 +0000)]
Add LIST_FOREACH_SAFE, which is like LIST_FOREACH but allows you
to walk the list and remove the current item and destroy/free it.

Alexander Kabaev will likely do the equivalent for the other list
types, but I just happened to have this one sitting in a local
non-FreeBSD tree already.

21 years ago- Clarify the port range syntax in -redirect_port.
Ruslan Ermilov [Wed, 13 Aug 2003 15:13:33 +0000 (15:13 +0000)]
- Clarify the port range syntax in -redirect_port.

PR: docs/46286

- "IP number" -> "IP address", for consistency.

21 years agoAdd the Dell PERC 3/DCL to the list of supported devices. This has been
Simon L. B. Nielsen [Wed, 13 Aug 2003 15:02:14 +0000 (15:02 +0000)]
Add the Dell PERC 3/DCL to the list of supported devices.  This has been
in the hardware notes for a long time, but was never added to this
manual page.

PR: docs/55533
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>

21 years agoAdded an option to specify an alternate PID file.
Ruslan Ermilov [Wed, 13 Aug 2003 13:16:19 +0000 (13:16 +0000)]
Added an option to specify an alternate PID file.

PR: bin/37159
Submitted by: "Aleksandr A. Babaylov" <.@babolo.ru>

21 years agoMarkup, spelling and punctuation fixes
Christian Brueffer [Wed, 13 Aug 2003 12:54:55 +0000 (12:54 +0000)]
Markup, spelling and punctuation fixes

PR: 55440
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
MFC after: 3 days

21 years agoMarkup, wording and capitalization fixes
Christian Brueffer [Wed, 13 Aug 2003 12:44:45 +0000 (12:44 +0000)]
Markup, wording and capitalization fixes

PR: 55441
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
MFC after: 3 days

21 years agoGrammar and spelling fixes
Christian Brueffer [Wed, 13 Aug 2003 12:39:44 +0000 (12:39 +0000)]
Grammar and spelling fixes

PR: 55442
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
MFC after: 3 days

21 years agoReplace a panic with a .1Hz retry loop.
Poul-Henning Kamp [Wed, 13 Aug 2003 12:35:25 +0000 (12:35 +0000)]
Replace a panic with a .1Hz retry loop.
Not a perfect solution, but far cheaper than one.

21 years agoGrammar and spelling fixes
Christian Brueffer [Wed, 13 Aug 2003 12:34:54 +0000 (12:34 +0000)]
Grammar and spelling fixes

PR: 55443
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>

21 years agoFix typo
Christian Brueffer [Wed, 13 Aug 2003 12:20:33 +0000 (12:20 +0000)]
Fix typo

PR: 55480
Submitted by: Lukas Ertl <l.ertl@univie.ac.at>
MFC after: 3 days

21 years agoForced commit to record the PR for the previous commit.
Hartmut Brandt [Wed, 13 Aug 2003 11:02:37 +0000 (11:02 +0000)]
Forced commit to record the PR for the previous commit.

Remembered by: maxim

PR: bin/45967

21 years agoImplement what has been documented for a long time: make -debug switch
Hartmut Brandt [Wed, 13 Aug 2003 10:56:40 +0000 (10:56 +0000)]
Implement what has been documented for a long time: make -debug switch
on socket debugging.

Okay'ed by: markm

21 years agoThe syncache has made use of TCPDEBUG problematic, because the SYN
Hartmut Brandt [Wed, 13 Aug 2003 10:20:57 +0000 (10:20 +0000)]
The syncache has made use of TCPDEBUG problematic, because the SYN
segments are lost for the application. This broke, for example,
ports/benchmarks/dbs which needs the SYN segment to filter the
contents of the trace buffer for the connection it is interested in.

This patch makes the SYN segments available again. Unfortunately they
are now associated with the listening socket instead of the new one, so
a change to applications is required, but without this patch it wouldn't
work altogether.

PR: kern/45966

21 years agoThe tcp_trace call needs the length of the header. Unfortunately the
Hartmut Brandt [Wed, 13 Aug 2003 08:50:42 +0000 (08:50 +0000)]
The tcp_trace call needs the length of the header. Unfortunately the
code has rotten a bit so that the header length is not correct at
the point when tcp_trace is called. Temporarily compute the correct
value before the call and restore the old value after. This makes
ports/benchmarks/dbs to almost work.

This is a NOP unless you compile with TCPDEBUG.

21 years agoA number of patches in the last years have created new return paths
Hartmut Brandt [Wed, 13 Aug 2003 08:46:54 +0000 (08:46 +0000)]
A number of patches in the last years have created new return paths
in tcp_input that leave the function before hitting the tcp_trace
function call for the TCPDEBUG option. This has made TCPDEBUG mostly
useless (and tools like ports/benchmarks/dbs not working). Add
tcp_trace calls to the return paths that could be identified in this
maze.

This is a NOP unless you compile with TCPDEBUG.

21 years agoMake this WARNS=6 clean by just constifying two local char pointers.
Hartmut Brandt [Wed, 13 Aug 2003 07:51:06 +0000 (07:51 +0000)]
Make this WARNS=6 clean by just constifying two local char pointers.

21 years agoPut all the argument-less options together in the synopsis as required
Hartmut Brandt [Wed, 13 Aug 2003 07:43:08 +0000 (07:43 +0000)]
Put all the argument-less options together in the synopsis as required
by style(9).

21 years agoImplement two command line options that allow one to change the
Hartmut Brandt [Wed, 13 Aug 2003 07:42:07 +0000 (07:42 +0000)]
Implement two command line options that allow one to change the
file descriptors that are used for input and output. That allows
one, for example, to use nghook to bi-directionally pipe the
input and output into/from another non-netgraph-aware program.

21 years agoImplement the nwchan keyword that has been in the man page, but was
Hartmut Brandt [Wed, 13 Aug 2003 07:35:07 +0000 (07:35 +0000)]
Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address
some process is waiting on.

21 years agoA small statistics tool for gauging the statistical significance
Poul-Henning Kamp [Wed, 13 Aug 2003 07:21:54 +0000 (07:21 +0000)]
A small statistics tool for gauging the statistical significance
of data from benchmarks etc.  Implements "Student's t" for various
confidence levels, defaults to 95%.

If your benchmarks are not significant at the 95% confidence level,
we don't want to hear about it.

21 years agoIn case we encounter a zero sectorsize provider in g_io_check(), fail
Poul-Henning Kamp [Wed, 13 Aug 2003 06:42:56 +0000 (06:42 +0000)]
In case we encounter a zero sectorsize provider in g_io_check(), fail
the request with a printf rather than a divide by zero error.

21 years agoDon't run verify directly as that would require the perl script to
Marcel Moolenaar [Wed, 13 Aug 2003 03:59:18 +0000 (03:59 +0000)]
Don't run verify directly as that would require the perl script to
have execute permissions. Run "perl verify" instead. Replace all
occurences of the hardcoding of ./verify with $(VERIFY) to allow
it to be overridden as well.

21 years agoDon't use VM_MIN_KERNEL_ADDRESS to check if the faulting address is
Marcel Moolenaar [Wed, 13 Aug 2003 03:20:10 +0000 (03:20 +0000)]
Don't use VM_MIN_KERNEL_ADDRESS to check if the faulting address is
in user space or kernel space. VM_MIN_KERNEL_ADDRESS starts after the
gateway page, which means that improper memory accesses to the gateway
page while in user mode would panic the kernel. Use VM_MAX_ADDRESS
instead. It ends before the gateway page. The difference between
VM_MIN_KERNEL_ADDRESS and VM_MAX_ADDRESS is exactly the gateway page.

21 years agoReduce the size of the vm map (and by inclusion the vm space) on 64-bit
Alan Cox [Wed, 13 Aug 2003 03:13:22 +0000 (03:13 +0000)]
Reduce the size of the vm map (and by inclusion the vm space) on 64-bit
architectures by moving a field within the structure.

21 years agoPut an instruction group break between the move to ar.rnat and the
Marcel Moolenaar [Wed, 13 Aug 2003 02:49:50 +0000 (02:49 +0000)]
Put an instruction group break between the move to ar.rnat and the
move to ar.rsc. The RSE must be in enforced lazy mode when writing
to RSE modifyable registers. In this case we restore the RSE NaT
collection register ar.rnat. I have seen 2 general exception faults
on pluto1 now that indicate that the move to ar.rsc has already
happened prior to the move to ar.rnat, meaning that the RSE is not
in enforced lazy mode anymore. The ia64 dependency and instruction
ordering rules seem to allow having both registers written to in
the same instruction group, provided ar.rsc is written to later than
ar.rnat (based on the ordering semantics). It appears that we may
be pushing our luck. For now, put them in seperate cycles (by means
of the instruction group break). If we ever get a general exception
fault on the move to ar.rnat again, we have definite proof that
something else is fishy.

21 years agoAlways set tcb for bound thread, and switch tcb for M:N thread at correct
David Xu [Wed, 13 Aug 2003 01:49:07 +0000 (01:49 +0000)]
Always set tcb for bound thread, and switch tcb for M:N thread at correct
time.

21 years agoImply NOLIBC_R for PowerPC.
David E. O'Brien [Wed, 13 Aug 2003 00:13:37 +0000 (00:13 +0000)]
Imply NOLIBC_R for PowerPC.

21 years agoExpand inline the relevant parts of src/COPYRIGHT for Matt Dillon's
Warner Losh [Tue, 12 Aug 2003 23:24:05 +0000 (23:24 +0000)]
Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon's
copyrighted files.

Approved by: Matt Dillon

21 years agoMove the stop_dhcp in start_dhcp again before the
Martin Blapp [Tue, 12 Aug 2003 22:44:48 +0000 (22:44 +0000)]
Move the stop_dhcp in start_dhcp again before the
delay. It seems that dhclient really needs the time
to get killed.

21 years agoOops.. Some debugging code snuck in here.
Paul Saab [Tue, 12 Aug 2003 22:33:49 +0000 (22:33 +0000)]
Oops.. Some debugging code snuck in here.
Requeue the request if the controller is busy.

21 years agoRemove the dhclient.${interface}.pid defines. They are now
Martin Blapp [Tue, 12 Aug 2003 22:27:08 +0000 (22:27 +0000)]
Remove the dhclient.${interface}.pid defines. They are now
obsolete. A working dhclient with OMAPI will also not need
this.

21 years agoDon't forget to set kcb_self.
David Xu [Tue, 12 Aug 2003 22:13:06 +0000 (22:13 +0000)]
Don't forget to set kcb_self.

21 years agoRemove extra space.
Maxime Henrion [Tue, 12 Aug 2003 20:34:31 +0000 (20:34 +0000)]
Remove extra space.

21 years agoMake this working with two or more pccards and with more than
Martin Blapp [Tue, 12 Aug 2003 20:22:44 +0000 (20:22 +0000)]
Make this working with two or more pccards and with more than
one internal device. Don't call the startup procedure again if
we already use start.

Support a manually started dhclient and keep its configured
interfaces after pccard removal.

Make pccard_ether working in single-user mode without /usr mounted.

21 years agoFixup comment.
John Baldwin [Tue, 12 Aug 2003 20:20:23 +0000 (20:20 +0000)]
Fixup comment.

21 years agoReduce the size of the vm object on 64-bit architectures by moving
Alan Cox [Tue, 12 Aug 2003 20:10:32 +0000 (20:10 +0000)]
Reduce the size of the vm object on 64-bit architectures by moving
a field within the structure.

21 years agoAdd a '-M mask' option so that users can have different
Tom Rhodes [Tue, 12 Aug 2003 20:06:56 +0000 (20:06 +0000)]
Add a '-M mask' option so that users can have different
masks for files and directories.  This should make some
of the Midnight Commander users happy.

Remove an extra ')' in the manual page.

PR: 35699
Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> (original version)
Tested by: simon

21 years agoCorrect a grammatical error.
Ceri Davies [Tue, 12 Aug 2003 20:01:10 +0000 (20:01 +0000)]
Correct a grammatical error.

21 years ago- Convert Alpha over to the new calling conventions for cpu_throw() and
John Baldwin [Tue, 12 Aug 2003 19:33:36 +0000 (19:33 +0000)]
- Convert Alpha over to the new calling conventions for cpu_throw() and
  cpu_switch() where both the old and new threads are passed in as
  arguments.  Only powerpc uses the old conventions now.
- Update comments in the Alpha swtch.s to reflect KSE changes.

Tested by: obrien, marcel

21 years agoSupport EINPROGRESS and properly deal with 64bit physical addressing.
Paul Saab [Tue, 12 Aug 2003 17:55:53 +0000 (17:55 +0000)]
Support EINPROGRESS and properly deal with 64bit physical addressing.

21 years agoHalted CPU's should not accumulate time.
Paul Saab [Tue, 12 Aug 2003 17:01:10 +0000 (17:01 +0000)]
Halted CPU's should not accumulate time.

Reviewed by: jhb

21 years agomalloc() may return NULL.
Hajimu UMEMOTO [Tue, 12 Aug 2003 16:58:32 +0000 (16:58 +0000)]
malloc() may return NULL.

Obtained from: KAME
MFC after: 1 week

21 years agoFix typo
Martin Blapp [Tue, 12 Aug 2003 15:15:34 +0000 (15:15 +0000)]
Fix typo