]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoo add 802.11 state machine states for DFS and client-side power save
Sam Leffler [Wed, 5 Sep 2007 21:31:32 +0000 (21:31 +0000)]
o add 802.11 state machine states for DFS and client-side power save
o fixup drivers to ignore new states

Reviewed by: avatar (?)
Approved by: re (blanket wireless)

17 years agoadd defs just removed from ieee80211.h
Sam Leffler [Wed, 5 Sep 2007 21:25:58 +0000 (21:25 +0000)]
add defs just removed from ieee80211.h

Approved by: re (blanket wireless)

17 years agoUpdate channel definition:
Sam Leffler [Wed, 5 Sep 2007 20:37:39 +0000 (20:37 +0000)]
Update channel definition:
o add ic_extieee to hold the HT40 extension channel number
o add ic_state to track dynamic channel state for DFS
o add flags to mark regulatory channel requirements
o add state defs for DFS/radar support

Reviewed by: avatar
Approved by: re (blanket wireless)

17 years agoMiscellaneous fixups to 802.11 defs:
Sam Leffler [Wed, 5 Sep 2007 20:29:51 +0000 (20:29 +0000)]
Miscellaneous fixups to 802.11 defs:
o update 11n definitions to D2.0 spec
o add IEEE80211_CAPINFO_SPECTRUM_MGMT for DFS support
o add CSA ie definition for DFS support
o purge some unused definitions
o correct 802.11 reason and status codes
o correct reason code returned when a sta tries to associate to an
  ap operating with WPA/RSN but without a WPA/RSN ie

Reviewed by: thompsa, avatar
Approved by: re (blanket wireless)

17 years agoo add M_WEP mbuf flag so drivers can mark frames that are decrypted by the
Sam Leffler [Wed, 5 Sep 2007 20:22:59 +0000 (20:22 +0000)]
o add M_WEP mbuf flag so drivers can mark frames that are decrypted by the
  device and have had the crypto bits stripped from the 802.11 header
o strip mbuf flags in the rx path before passing up the stack

Reviewed by: thompsa, sephe, avatar
Approved by: re (blanket wireless)

17 years agoAdd MLINKS entries for various SYSCTL_*() macros documented in sysctl.9.
Robert Watson [Wed, 5 Sep 2007 19:46:23 +0000 (19:46 +0000)]
Add MLINKS entries for various SYSCTL_*() macros documented in sysctl.9.

Approved by: re (bmah)
Submitted by: Constantine A. Murenin <cnst+freebsd@bugmail.mojo.ru>
Sponsored by: Google Summer of Code 2007

17 years agoensure the head entry of addrinfo chain has non-NULL ai_canonname to be
JINMEI Tatuya [Wed, 5 Sep 2007 18:08:14 +0000 (18:08 +0000)]
ensure the head entry of addrinfo chain has non-NULL ai_canonname to be
compliant with RFC3493.

PR: standards/114910
Approved by:   ume (mentor)
Approved by:   re
MFC after:     1 week

17 years ago- Fix strange for loop.
Pawel Jakub Dawidek [Wed, 5 Sep 2007 14:27:13 +0000 (14:27 +0000)]
- Fix strange for loop.

  Reported by: phk

- While here, check the unit before calculating the actually number.
  This way we can return EINVAL for invalid unit instead of ERANGE.

Approved by: re (kensmith)

17 years agoPoint expand_number(3) at humanize_number(3) and nive versa.
Pawel Jakub Dawidek [Wed, 5 Sep 2007 14:25:16 +0000 (14:25 +0000)]
Point expand_number(3) at humanize_number(3) and nive versa.

Suggested by: trhodes
Approved by: re (kensmith)

17 years agoThere's no need to re-read PCIR_COMMAND once we set it.
Olivier Houchard [Tue, 4 Sep 2007 18:45:27 +0000 (18:45 +0000)]
There's no need to re-read PCIR_COMMAND once we set it.

Approved by: re (blanket)

17 years agoRestore historical behavior where more(1) does not check for dumb terminals.
Xin LI [Tue, 4 Sep 2007 13:54:09 +0000 (13:54 +0000)]
Restore historical behavior where more(1) does not check for dumb terminals.

Reported by: rwatson on -current
Tested by: keramida, rwatson
Approved by: re (rwatson)

17 years agoThis is an update to the new Intel 10G 82598 driver.
Jack F Vogel [Tue, 4 Sep 2007 02:31:35 +0000 (02:31 +0000)]
This is an update to the new Intel 10G 82598 driver.
The first drop was Beta, this code is expected to be the release version.
Note that this driver code will build in either 6.2 or 7. If you
use the code in 6.2 you will not get TSO or MSI/X support but it will
function in a legacy mode.

Approved by: re

17 years agoStart lockd after statd.
Mike Makonnen [Mon, 3 Sep 2007 02:02:31 +0000 (02:02 +0000)]
Start lockd after statd.

Approved by: re (bmah)
Noticed by: Ted Faber <faber@ISI.EDU>

17 years agoInactive pages don't have to be dirty plus improve description of
Ruslan Ermilov [Sun, 2 Sep 2007 10:29:16 +0000 (10:29 +0000)]
Inactive pages don't have to be dirty plus improve description of
the cache queue.

Submitted by: alc
Approved by: re (kensmith)

17 years agoIn userland_sysctl(), call useracc() with the actual newlen value to be
Robert Watson [Sun, 2 Sep 2007 09:59:33 +0000 (09:59 +0000)]
In userland_sysctl(), call useracc() with the actual newlen value to be
used, rather than the one passed via 'req', which may not reflect a
rewrite.  This call to useracc() is redundant to validation performed by
later copyin()/copyout() calls, so there isn't a security issue here,
but this could technically lead to excessive validation of addresses if
the length in newlen is shorter than req.newlen.

Approved by: re (kensmith)
Reviewed by: jhb
Submitted by: Constantine A. Murenin <cnst+freebsd@bugmail.mojo.ru>
Sponsored by: Google Summer of Code 2007

17 years agoSort wlan entries by driver name.
Christian Brueffer [Sun, 2 Sep 2007 09:15:08 +0000 (09:15 +0000)]
Sort wlan entries by driver name.

Approved by: re (blanket)

17 years agoAutogenerate hardware notes for zyd(4).
Christian Brueffer [Sun, 2 Sep 2007 09:11:10 +0000 (09:11 +0000)]
Autogenerate hardware notes for zyd(4).

Approved by: re (blanket)

17 years agoConnect zyd.4 to the build.
Warner Losh [Sun, 2 Sep 2007 07:09:25 +0000 (07:09 +0000)]
Connect zyd.4 to the build.

Approved by: re@

17 years agoRemove extra copy of the man page that has been noted by many people.
Warner Losh [Sun, 2 Sep 2007 07:04:50 +0000 (07:04 +0000)]
Remove extra copy of the man page that has been noted by many people.

Approved by: re@

17 years agoFix a kernel panic due to a NULL pointer access on pc98.
Yoshihiro Takahashi [Sat, 1 Sep 2007 12:18:28 +0000 (12:18 +0000)]
Fix a kernel panic due to a NULL pointer access on pc98.

When any PnP device exists, isa_release_resource() is called with no
activated resource.  So a bushandle is not allocated yet.

Approved by: re (kensmith)

17 years agoAdd support for Camellia encryption algorithm.
Pawel Jakub Dawidek [Sat, 1 Sep 2007 06:33:02 +0000 (06:33 +0000)]
Add support for Camellia encryption algorithm.

PR: kern/113790
Submitted by: Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp>
Approved by: re (bmah)

17 years agoUse CTLFLAG_RDTUN for tunable sysctls.
Pawel Jakub Dawidek [Sat, 1 Sep 2007 06:23:42 +0000 (06:23 +0000)]
Use CTLFLAG_RDTUN for tunable sysctls.

Approved by: re (bmah)

17 years agoImplement expand_number(3), which is the opposite of humanize_number(3), ie.
Pawel Jakub Dawidek [Sat, 1 Sep 2007 06:19:11 +0000 (06:19 +0000)]
Implement expand_number(3), which is the opposite of humanize_number(3), ie.
a number in human-readable form is converted to int64_t, for example:
123b -> 123
10k -> 10240
16G -> 17179869184

First version submitted by: Eric Anderson <anderson@freebsd.org>
Approved by: re (bmah)

17 years agoFix the description of the "Cache" memory and clarify the
Ruslan Ermilov [Sat, 1 Sep 2007 05:52:39 +0000 (05:52 +0000)]
Fix the description of the "Cache" memory and clarify the
description of the "Inact" memory.  (They count pages in
the cache/inactive page queues, respectively.)

Approved by: re (kensmith)

17 years agoFix races in msdosfs_lookup() and msdosfs_readdir(). These functions
Bruce Evans [Fri, 31 Aug 2007 22:29:55 +0000 (22:29 +0000)]
Fix races in msdosfs_lookup() and msdosfs_readdir().  These functions
can easily block in bread(), and then there was nothing to prevent the
static buffer (nambuf_{ptr,len,last_id}) being clobbered by another
thread.

The effects of the bug seem to have been limited to failed lookups and
mangled names in readdir(), since Giant locking provides enough
serialization to prevent concurrent calls to the functions that access
the buffer.  They were very obvious for multiple concurrent tree walks,
especially with a small cluster size.

The bug was introduced in msdosfs_conv.c 1.34 and associated changes,
and is in all releases starting with 5.2.

The fix is to allocate the buffer as a local variable and pass around
pointers to it like "_r" functions in libc do.  Stack use from this
is large but not too large.  This also fixes a memory leak on module
unload.

Reviewed by: kib
Approved by: re (kensmith)

17 years agoFound some obsolete files in /rescue.
Yaroslav Tykhiy [Fri, 31 Aug 2007 19:41:27 +0000 (19:41 +0000)]
Found some obsolete files in /rescue.
The ipf related stuff was removed in rescue/Makefile rev. 1.43,
and vinum in rev. 1.30.

Approved by: re (bmah)

17 years agoClose a race that snuck in with the recent changes to fix a LOR between
John Baldwin [Fri, 31 Aug 2007 19:01:30 +0000 (19:01 +0000)]
Close a race that snuck in with the recent changes to fix a LOR between
the callout_lock spin lock and the sleepqueue spin locks.  In the fix,
callout_drain() has to drop the callout_lock so it can acquire the
sleepqueue lock.  The state of the callout can change while the
callout_lock is held however (for example, it can be rescheduled via
callout_reset()).  The previous code assumed that the only state change
that could happen is that the callout could finish executing.  This change
alters callout_drain() to effectively restart and recheck everything
after it acquires the sleepqueue lock thus handling all the possible
states that the callout could be in after any changes while callout_lock
was dropped.

Approved by: re (kensmith)
Tested by: kris

17 years agoAdd missing newline in the log message of the previous commit.
Diomidis Spinellis [Fri, 31 Aug 2007 13:56:26 +0000 (13:56 +0000)]
Add missing newline in the log message of the previous commit.

Approved by: re (kensmith) - implied

17 years agoDon't panic. When encountering a negative value call log(LOG_NOTICE, ...)
Diomidis Spinellis [Fri, 31 Aug 2007 13:36:58 +0000 (13:36 +0000)]
Don't panic.  When encountering a negative value call log(LOG_NOTICE, ...)
and record LONG_MAX, instead of calling KASSERT(...).

Reported by: rwatson
Approved by: re (kensmith)

17 years agoEvaluate _OSC on boot to indicate our OS capabilities to ACPI. This is
Nate Lawson [Thu, 30 Aug 2007 21:18:42 +0000 (21:18 +0000)]
Evaluate _OSC on boot to indicate our OS capabilities to ACPI.  This is
needed at least to convince the BIOS to give us access to CPU freq
control on MacBooks.

Submitted by: Rui Paulo <rpaulo / fnop.net>
Approved by: re
MFC after: 5 days

17 years agoShow the ACTIVE flag in ifconfig for the single interface that is actaully
Andrew Thompson [Thu, 30 Aug 2007 19:12:10 +0000 (19:12 +0000)]
Show the ACTIVE flag in ifconfig for the single interface that is actaully
active in failover mode rather than all interfaces with a link. This makes it
clear if the master interface is in use or one of the backup links.

Found by: Writing the Handbook section
Approved by: re (kensmith)

17 years ago- Fix include path, these functions were moved to sys/priv.h.
Daniel Gerzo [Thu, 30 Aug 2007 15:03:21 +0000 (15:03 +0000)]
- Fix include path, these functions were moved to sys/priv.h.

Approved by: re (bmah)
Submitted by: sbahra@hpcl.seas.gwu.edu (via #bsddocs@EFnet)
Pointy hat to: rwatson

17 years agoRemove the lock assert from iwi_newstate, this function does not need the lock
Andrew Thompson [Wed, 29 Aug 2007 21:52:03 +0000 (21:52 +0000)]
Remove the lock assert from iwi_newstate, this function does not need the lock
to be held and this will falsely trigger if called from net80211.

Reported by: Munehiro (haro) Matsuda
Reviewed by: sam
Approved by: re (kensmith)

17 years agoPartially revert the previous change. I failed to notice that where
John Baldwin [Wed, 29 Aug 2007 21:17:11 +0000 (21:17 +0000)]
Partially revert the previous change.  I failed to notice that where
ktruserret() is invoked, an unlocked check of  the per-process queue
is performed inline, thus, we don't lock the ktrace_sx on every userret().

Pointy hat to: jhb
Approved by: re (kensmith)
Pointy hat recovered from: rwatson

17 years agoA port of the zyd driver from NetBSD by . This supports the ZyDAS
Warner Losh [Wed, 29 Aug 2007 21:16:50 +0000 (21:16 +0000)]
A port of the zyd driver from NetBSD by .  This supports the ZyDAS
ZD1211/ZD1211B USB IEEE 802.11b/g wireless network devices.  Not (yet)
connected to the build process (next batch of commits once I've looped
the current back back).

Submitted by: Weongyo Jeong
Reviewed by: sam@
Approved by: re@

17 years agoBring in the man page for zyd, ported from NetBSD, complete with bogus
Warner Losh [Wed, 29 Aug 2007 21:08:14 +0000 (21:08 +0000)]
Bring in the man page for zyd, ported from NetBSD, complete with bogus
Bill Paul copyright.  Not sure what the right copyright is, but this
file has been through 22 reversions on OpenBSD and 1 on NetBSD.  This
isn't (yet) connected to the build, just in case I've done something
wrong (test builds worked, but better safe than sorry).

Submitted by: Weongyo Jeong
Approved by: re@

17 years agoMakefile for building zyd kernel module.
Warner Losh [Wed, 29 Aug 2007 21:04:26 +0000 (21:04 +0000)]
Makefile for building zyd kernel module.

Submitted by: Weongyo Jeong
Approved by: re@ (kensmith)

17 years agoAdd devices for the forthcoming zyd driver, ported from NetBSD, by
Warner Losh [Wed, 29 Aug 2007 21:00:57 +0000 (21:00 +0000)]
Add devices for the forthcoming zyd driver, ported from NetBSD, by
Weongyo Jeong.

Submitted by: Weongyo Jeong
Approved by: re@

17 years agoRepair ALTQ-tagging rules in IPFW which got broken in the last PF
Brian Feldman [Wed, 29 Aug 2007 19:34:28 +0000 (19:34 +0000)]
Repair ALTQ-tagging rules in IPFW which got broken in the last PF
import.  The PF mbuf-tagging support routines changed to link the
allocated tags into the provided mbuf themselves, so the left-over
m_tag_prepend() was trying to add a bogus (usually NULL) tag.

Reviewed by: mlaier
Approved by: re

17 years agoRework the routines to convert a 5.x+ statfs structure (with fixed-size
John Baldwin [Tue, 28 Aug 2007 20:28:12 +0000 (20:28 +0000)]
Rework the routines to convert a 5.x+ statfs structure (with fixed-size
64-bit counters) to a 4.x statfs structure (with long-sized counters).
- For block counters, we scale up the block size sufficiently large so
  that the resulting block counts fit into a the long-sized (long for the
  ABI, so 32-bit in freebsd32) counters.  In 4.x the NFS client's statfs
  VOP did this already.  This can lie about the block size to 4.x binaries,
  but it presents a more accurate picture of the ratios of free and
  available space.
- For non-block counters, fix the freebsd32 stats converter to cap the
  values at INT32_MAX rather than losing the upper 32-bits to match the
  behavior of the 4.x statfs conversion routine in vfs_syscalls.c

Approved by: re (kensmith)

17 years agoRegenerate.
Konstantin Belousov [Tue, 28 Aug 2007 12:36:23 +0000 (12:36 +0000)]
Regenerate.

Approved by: re (kensmith)

17 years agoImplement fake linux sched_getaffinity() syscall to enable java to work
Konstantin Belousov [Tue, 28 Aug 2007 12:26:35 +0000 (12:26 +0000)]
Implement fake linux sched_getaffinity() syscall to enable java to work
with Linux 2.6 emulation. This shall be reimplemented once FreeBSD gets
native scheduler affinity syscalls.

Submitted by: rdivacky
Reviewed by: jkim
Sponsored by: Google Summer of Code 2007
Approved by: re (kensmith)

17 years agoFix off-by-two errors.
Jung-uk Kim [Tue, 28 Aug 2007 00:09:12 +0000 (00:09 +0000)]
Fix off-by-two errors.
Both WWNN and WWPN are 64-bit unsigned integers and they are prefixed
with "0x", which requires two more bytes each.

Submitted by: Danny Braniss (danny at cs dot huji dot ac dot il)
via Matthew Jacob (lydianconcepts at gmail dot com)
Approved by: re (bmah)
MFC after: 3 days

17 years agoOutput keymap choice to stderr so it is easier to parse for apps chained to
Murray Stokely [Mon, 27 Aug 2007 21:56:42 +0000 (21:56 +0000)]
Output keymap choice to stderr so it is easier to parse for apps chained to
this curses based app.

Submitted by: ivoras
Approved by: re@ (bmah@)

17 years agoRegenerate src.conf.5 -after- the addition of WITHOUT_ZONEINFO, the way
Remko Lodder [Mon, 27 Aug 2007 20:22:59 +0000 (20:22 +0000)]
Regenerate src.conf.5 -after- the addition of WITHOUT_ZONEINFO, the way
I did this in the previous commit, leaves out the parsing of $FreeBSD$
which is actually required to be parsed.

Kindly reminded by: bmah
Approved by: re (bmah)
Approved by: imp (mentor, implicit)

17 years agoAdd WITHOUT_ZONEINFO to the build options and regenerate src.conf.5
Remko Lodder [Mon, 27 Aug 2007 20:01:08 +0000 (20:01 +0000)]
Add WITHOUT_ZONEINFO to the build options and regenerate src.conf.5

Reminded by: ceri
Approved by: re (bmah)
Approved by: imp (mentor)

17 years ago- During shutdown pending, when the last sack came in and
Randall Stewart [Mon, 27 Aug 2007 05:19:48 +0000 (05:19 +0000)]
- During shutdown pending, when the last sack came in and
  the last message on the send stream was "null" but still
  there, a state we allow, we could get hung and not clean
  it up and wait for the shutdown guard timer to clear the
  association without a graceful close. Fix this so that
  that we properly clean up.
- Added support for Multiple ASCONF per new RFC. We only
  (so far) accept input of these and cannot yet generate
  a multi-asconf.
- Sysctl'd support for experimental Fast Handover feature. Always
  disabled unless sysctl or socket option changes to enable.
- Error case in add-ip where the peer supports AUTH and ADD-IP
  but does NOT require AUTH of ASCONF/ASCONF-ACK. We need to
  ABORT in this case.
- According to the Kyoto summit of socket api developers
  (Solaris, Linux, BSD). We need to have:
   o non-eeor mode messages be atomic - Fixed
   o Allow implicit setup of an assoc in 1-2-1 model if
     using the sctp_**() send calls - Fixed
   o Get rid of HAVE_XXX declarations - Done
   o add a sctp_pr_policy in hole in sndrcvinfo structure - Done
   o add a PR_SCTP_POLICY_VALID type flag - yet to-do in a future patch!
- Optimize sctp6 calls to reuse code in sctp_usrreq. Also optimize
  when we close sending out the data and disabling Nagle.
- Change key concatenation order to match the auth RFC
- When sending OOTB shutdown_complete always do csum.
- Don't send PKT-DROP to a PKT-DROP
- For abort chunks just always checksums same for
  shutdown-complete.
- inpcb_free front state had a bug where in queue
  data could wedge an assoc. We need to just abandon
  ones in front states (free_assoc).
- If a peer sends us a 64k abort, we would try to
  assemble a response packet which may be larger than
  64k. This then would be dropped by IP. Instead make
  a "minimum" size for us 64k-2k (we want at least
  2k for our initack). If we receive such an init
  discard it early without all the processing.
- When we peel off we must increment the tcb ref count
  to keep it from being freed from underneath us.
- handling fwd-tsn had bugs that caused memory overwrites
  when given faulty data, fixed so can't happen and we
  also stop at the first bad stream no.
- Fixed so comm-up generates the adaption indication.
- peeloff did not get the hmac params copied.
- fix it so we lock the addr list when doing src-addr selection
  (in future we need to use a multi-reader/one writer lock here)
- During lowlevel output, we could end up with a _l_addr set
  to null if the iterator is calling the output routine. This
  means we would possibly crash when we gather the MTU info.
  Fix so we only do the gather where we have a src address
  cached.
- we need to be sure to set abort flag on conn state when
  we receive an abort.
- peeloff could leak a socket. Moved code so the close will
  find the socket if the peeloff fails (uipc_syscalls.c)

Approved by: re@freebsd.org(Ken Smith)

17 years agoo Fix bug I introduced in the previous commit (ipfw set extention):
Maxim Konovalov [Sun, 26 Aug 2007 18:38:31 +0000 (18:38 +0000)]
o Fix bug I introduced in the previous commit (ipfw set extention):
pack a set number correctly.

Submitted by: oleg

o Plug a memory leak.

Submitted by: oleg and Andrey V. Elsukov
Approved by: re (kensmith)
MFC after: 1 week

17 years agoAdd option to not fill second code image, this makes the full disk
Poul-Henning Kamp [Sun, 26 Aug 2007 14:57:08 +0000 (14:57 +0000)]
Add option to not fill second code image, this makes the full disk
image compress much better.

Respect pkg_add's internal 200 package limitation.

Approved by: re (bmah)
Spelling fixes by: bmah

17 years agoOff-by-one bug in country ie construction, which will make HOSTAP send out
Sepherosa Ziehau [Sun, 26 Aug 2007 11:34:51 +0000 (11:34 +0000)]
Off-by-one bug in country ie construction, which will make HOSTAP send out
malformatted beacons.

Reviewed by: sam
Approved by: re (bmah), sam (mentor)

17 years agoFix following nits:
Sepherosa Ziehau [Sun, 26 Aug 2007 11:32:56 +0000 (11:32 +0000)]
Fix following nits:
- Per ieee80211com sysctl ctx leakage on detach
- getmgtframe incorrectly adjusts mbuf.m_data

Reviewed by: sam
Approved by: re (bmah), sam (mentor)

17 years agoUpdate the MFI driver to support new "1078" series of hardware. This
Scott Long [Sat, 25 Aug 2007 23:58:45 +0000 (23:58 +0000)]
Update the MFI driver to support new "1078" series of hardware.  This
includes the upcoming Dell PERC6 series.  Many thanks to LSI for
contributing this code.

Submitted by: LSI
Approved by: re

17 years agoFixes for 4 port and small packet optimization
Kip Macy [Sat, 25 Aug 2007 21:07:37 +0000 (21:07 +0000)]
Fixes for 4 port and small packet optimization

- remove cpl->iff panic - we can't know the port number from the rspq on the 4-port
- pick the ifnet based on the interface in the CPL header
- switch to using qset 0 for egress on the 4-port for now - may change
  when we start using RSS
- move ether_ifdetach to before the port lock gets deinitialized to avoid
  hang in the case where there are BPF peers (cxgb_ioctl is called indirectly
  when BPF peers are present)
- don't call t3_mac_reset if multiport is set, this was causing tx errors
  by misconfiguring the MAC on the 4-port
- change V_TXPKT_INTF to use txpkt_intf as the interfaces are not contiguous
- free the mbuf immediately in the case where the payload is small enough to be copied
  into the rspq
- only update the coalesce timer if for a queue if packets were taken off of it
- add in missed 20ms DELAY in initializaton vsc8211

- prompt MFC as this only applies to the 4-port which is currently completely
  broken - OK'd by kensmith

Supported by: Chelsio
Approved by: re (blanket)
MFC after: 0 days

17 years agosleep 2 seconds after having loaded g_uzip.ko. We need this because
Matteo Riondato [Sat, 25 Aug 2007 00:19:17 +0000 (00:19 +0000)]
sleep 2 seconds after having loaded g_uzip.ko. We need this because
otherwise the /dev/mdX.uzip won't be created immediately, which is
needed because we issue a mount right afterwards.

Approved by: re@ (bmah@)
MFC after: 2 days

17 years agodocument hw.realmem
Daniel Gerzo [Fri, 24 Aug 2007 20:38:09 +0000 (20:38 +0000)]
document hw.realmem

Submitted by: cnst@ (Constantine A. Murenin)
Sponsored by: Google Summer of Code 2007
Approved by: re@ (bmah)
MFC after: 1 week

17 years agoRemove old prototypes for addr2ascii() and ascii2addr(), functions which no
Bruce M Simpson [Fri, 24 Aug 2007 20:25:52 +0000 (20:25 +0000)]
Remove old prototypes for addr2ascii() and ascii2addr(), functions which no
longer exist in libc.

Requested by: Craig Rodrigues
Approved by: re (kensmith)

17 years agoFix stack overflow with too many items return list in 'dialog' program.
Andrey A. Chernov [Fri, 24 Aug 2007 16:26:24 +0000 (16:26 +0000)]
Fix stack overflow with too many items return list in 'dialog' program.
(Noticed in ghostscript-gpl core dump)

Approved by:    re@ (bmah)

17 years agodrop frames marked for encryption when no key is available
Sam Leffler [Fri, 24 Aug 2007 15:44:27 +0000 (15:44 +0000)]
drop frames marked for encryption when no key is available

Reviewed by: avatar
Approved by: re (kensmith)
Obtained from: madwifi

17 years agoNew release note: coretemp(4).
Bruce A. Mah [Fri, 24 Aug 2007 15:18:42 +0000 (15:18 +0000)]
New release note:  coretemp(4).

Updated release note:  tzdata2007g [1].

[1] Technically I should remove the &merged; entity here but the commit  has
a one-week MFC-after so I figure I can leave it this way for now.

Approved by: re (implicitly)

17 years agoMFV: tzdata2007g
Edwin Groothuis [Fri, 24 Aug 2007 13:36:20 +0000 (13:36 +0000)]
MFV: tzdata2007g

PR: conf/115706
Submitted by: edwin@
Approved by: re (bmah@)
Obtained from: ftp://elsie.nci.nih.gov/pub/
MFC after: 1 week

17 years agoThis commit was generated by cvs2svn to compensate for changes in r171945,
Edwin Groothuis [Fri, 24 Aug 2007 13:27:26 +0000 (13:27 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171945,
which included commits to RCS files with non-trunk default branches.

17 years agoImport of timezone database from Arthur Olson et al.
Edwin Groothuis [Fri, 24 Aug 2007 13:27:26 +0000 (13:27 +0000)]
Import of timezone database from Arthur Olson et al.

Timezone data changes in the following locations:

- Egypt
- Australia (new DST rules for 2008 and following)
- Perry County, Indiana
- America/Indiana/Tell_City
- Pike County, Indiana

Also:

- City coordinates corrected.
- Layout of leapseconds is updated

PR: conf/115706
Approved by: re (bmah@)

17 years ago- Fix address add handling to clear cached routes and source addresses
Randall Stewart [Fri, 24 Aug 2007 00:53:53 +0000 (00:53 +0000)]
- Fix address add handling to clear cached routes and source addresses
  when peer acks the add in case the routing table changes.
- Fix sctp_lower_sosend to send shutdown chunk for mbuf send
  case when sndlen = 0 and sinfoflag = SCTP_EOF
- Fix sctp_lower_sosend for SCTP_ABORT mbuf send case with null data,
  So that it does not send the "null" data mbuf out and cause
  it to get freed twice.
- Fix so auto-asconf sysctl actually effect the socket's asconf state.
- Do not allow SCTP_AUTO_ASCONF option to be used on subset bound sockets.
- Memset bug in sctp_output.c (arguments were reversed) submitted
  found and reported by Dave Jones (davej@codemonkey.org.uk).
- PD-API point needs to be invoked >= not just > to conform to socket api
  draft this fixes sctp_indata.c in the two places need to be >=.
- move M_NOTIFICATION to use M_PROTO5.
- PEER_ADDR_PARAMS did not fail properly if you specify an address
  that is not in the association with a valid assoc_id. This meant
  you got or set the stcb level values instead of the destination
  you thought you were going to get/set. Now validate if the
  stcb is non-null and the net is NULL that the sa_family is
  set and the address is unspecified otherwise return an error.
- The thread based iterator could crash if associations were freed
  at the exact time it was running. rework the worker thread to
  use the increment/decrement to prevent this and no longer use
  the markers that the timer based iterator uses.
- Fix the memleak in sctp_add_addr_to_vrf() for the case when it is
  detected that ifa is already pointing to a ifn.
- Fix it so that if someone is so insane that they drop the
  send window below the minimal add mark, they still can send.
- Changed all state for associations to use mask safe macro.
- During front states in association freeing in sctp_inpcbfree, we
  had a locking problem where locks were not in place where they
  should have been.
- Free association calls were not testing the return value in
  sctp_inpcb_free() properly... others should be cast  void returns
  where we don't care about the return value.
- If a reference count is held on an assoc, even from the "force free"
  we should not do the actual free.. but instead let the timer
  free it.
- When we enter sctp_input(), if the SCTP_ASOC_ABOUT_TO_BE_FREED
  flag is set, we must NOT process the packet but handle it like
  ootb. This is because while freeing an assoc we release the
  locks to get all the higher order locks so we can purge all
  the hash tables. This leaves a hole if a packet comes in
  just at that point. Now sctp_common_input_processing() will
  call the ootb code in such a case.
- Change MBUF M_NOTIFICATION to use M_PROTO5 (per Sam L). This makes
  it so we don't have a conflict (I think this is a covertity change).
  We made this change AFTER some conversation and looking to make sure
  that M_PROTO5 does not have a problem between SCTP and the 802.11
  stuff (which is the only other place its used).
- Fixed lock order reversal and missing atomic protection around
  locked_tcb during association lookup and the 1-2-1 model.
- Added debug to source address selection.
- V6 output must always do checksum even for loopback.
- Remove more locks around inp that are not needed for an atomically
  added/subtracted ref count.
- slight optimization in the way we zero the array in sctp_sack_check()
- It was possible to respond to a ABORT() with bad checksum with
  a PKT-DROP. This lead to a PKT-DROP/ABORT war. Add code to NOT
  send a PKT-DROP to any ABORT().
- Add an option for local logging (useful for macintosh or when
  you need better performing during debugging). Note no commands
  are here to get the log info, you must just use kgdb.
- The timer code needs to be aware of if it needs to call
  sctp_sack_check() to slide the maps and adjust the cum-ack.
  This is because it may be out of sync cum-ack wise.
- Added threshold managment logging.
- If the user picked just the right size, that just filled the send
  window minus one mtu, we would enter a forever loop not copying and
  at the same time not blocking. Change from < to <= solves this.
- Sysctl added to control the fragment interleave level which defaults
  to 1.
- My rwnd control was not being used to control the rwnd properly (we
  did not add and subtract to it :-() this is now fixed so we handle
  small messages (1 byte etc) better to bring our rwnd down more
  slowly.

Approved by: re@freebsd.org (Bruce Mah)

17 years ago- Fix typo in netstat's display of Nagle algorithm - refer to the RFC.
Randall Stewart [Fri, 24 Aug 2007 00:35:18 +0000 (00:35 +0000)]
- Fix typo in netstat's display of Nagle algorithm - refer to the RFC.

Submitted by: bruce@cran.org.uk
Approved by: re@freebsd.org (Bruce Mah)

17 years agoAdd PCI IDs for two cards:
Ed Maste [Thu, 23 Aug 2007 20:12:40 +0000 (20:12 +0000)]
Add PCI IDs for two cards:
- Adaptec RAID 3405
- Adaptec RAID 3805

Approved by: re (bmah)
Submitted by: John Marra  jmarra at nmu dot edu
MFC After: 1 week

17 years agoAdd man pages for coretemp(4) and ichwd(4).
Dag-Erling Smørgrav [Thu, 23 Aug 2007 20:05:09 +0000 (20:05 +0000)]
Add man pages for coretemp(4) and ichwd(4).

Approved by: re (bmah)

17 years agoReturn EADDRNOTAVAIL instead of EDESTADDRREQ error when
Maksim Yevmenkin [Thu, 23 Aug 2007 16:55:22 +0000 (16:55 +0000)]
Return EADDRNOTAVAIL instead of EDESTADDRREQ error when
listen(2) is called on improperly bound socket.

Suggested by: Iain Hibbert
Approved by: re (kensmith)
MFC after: 3 days

17 years agoExport 4Gbps Fibre Channel link speed correctly with inquiry commands.
Jung-uk Kim [Thu, 23 Aug 2007 15:57:13 +0000 (15:57 +0000)]
Export 4Gbps Fibre Channel link speed correctly with inquiry commands.

Approved by: re (kensmith)
MFC after: 3 days

17 years agoFix pkg_add behaviour to preserve pathnames.
Kirill Ponomarev [Thu, 23 Aug 2007 13:05:10 +0000 (13:05 +0000)]
Fix pkg_add behaviour to preserve pathnames.

PR: bin/93915 bin/109134
Submitted by: Jason Heiss <heissj@yahoo-inc.com>, Constantin Stefanov<cstef@mail.ru>
Approved by: re@ (kensmith)
MFC after: 7 days

17 years agoStyle nits + more reliable Tj(max) detection + improved reporting of
Dag-Erling Smørgrav [Thu, 23 Aug 2007 10:53:03 +0000 (10:53 +0000)]
Style nits + more reliable Tj(max) detection + improved reporting of
critical temperature + sched_unbind() after rdmsr + initialize sc_dev.

Submitted by: Rui Paulo <rpaulo@fnop.net>, cnst
Approved by: re (kensmith)

17 years agoUse POSIX mutex instead of Solaris ones. This makes generation
Xin LI [Thu, 23 Aug 2007 09:39:40 +0000 (09:39 +0000)]
Use POSIX mutex instead of Solaris ones.  This makes generation
of threaded RPC servers to work out of the box.

Spotted by: Changming Sun <changming at staff.sina.com.cn>
Sponsored by: SINA Corporation
Approved by: re (kensmith)

17 years agosysent.h is installed as sys/sysent.h, so reflect it.
Xin LI [Thu, 23 Aug 2007 09:38:26 +0000 (09:38 +0000)]
sysent.h is installed as sys/sysent.h, so reflect it.

Approved by: re (kensmith)
Spotted by: Changming Sun <changming at staff.sina.com.cn>
Sponsored by: SINA Corporation

17 years agoWhen checking the sequence number of a TCP header embedded in an
Daniel Hartmeier [Thu, 23 Aug 2007 09:30:58 +0000 (09:30 +0000)]
When checking the sequence number of a TCP header embedded in an
ICMP error message, do not access th_flags. The field is beyond
the first eight bytes of the header that are required to be present
and were pulled up in the mbuf.

A random value of th_flags can have TH_SYN set, which made the
sequence number comparison not apply the window scaling factor,
which led to legitimate ICMP(v6) packets getting blocked with
"BAD ICMP" debug log messages (if enabled with pfctl -xm), thus
breaking PMTU discovery.

Triggering the bug requires TCP window scaling to be enabled
(sysctl net.inet.tcp.rfc1323, enabled by default) on both end-
points of the TCP connection. Large scaling factors increase
the probability of triggering the bug.

PR: kern/115413: [ipv6] ipv6 pmtu not working
Tested by: Jacek Zapala
Reviewed by: mlaier
Approved by: re (kensmith)

17 years agoForced commit to note repo-copy:
Yaroslav Tykhiy [Thu, 23 Aug 2007 05:09:31 +0000 (05:09 +0000)]
Forced commit to note repo-copy:

These files have been repo-copied from src/include/fts.h
and src/lib/libc/gen/fts.c to serve as a base for 4.4BSD
compatible versions of fts(3) functions to be preserved
through libc symbol versioning while the default versions
undergo ABI-breaking extension to support big file trees.

Approved by: re (kensmith)

17 years agoNMIs now come from 'nmi_calltrap' rather than 'calltrap', so teach 'kgdb'
John Baldwin [Wed, 22 Aug 2007 20:28:13 +0000 (20:28 +0000)]
NMIs now come from 'nmi_calltrap' rather than 'calltrap', so teach 'kgdb'
to treat the frame under 'nmi_calltrap' as a trapframe.

MFC after: 3 days
Approved by: re (bmah)

17 years agoBring in two fixes for TinyBSD:
Remko Lodder [Wed, 22 Aug 2007 18:45:00 +0000 (18:45 +0000)]
Bring in two fixes for TinyBSD:

- Add the bind mtree to the TinyBSD build so that files
  can be installed there (else the build fails)
- Change GEOM_GPT to GEOM_PART_GPT since that had been
  renamed in current. The kernel configuration provided
  by TinyBSD will not build without these changes.

PR: misc/115484
PR: misc/115405
Submitted by: Richard Arends <richard at unixguru dot nl>
Approved by: re (bmah)
Approved by: imp (mentor)

17 years ago- Fix origin of the portcheckout port as we have it in the port-mgmt
Gabor Kovesdan [Wed, 22 Aug 2007 18:07:41 +0000 (18:07 +0000)]
- Fix origin of the portcheckout port as we have it in the port-mgmt
  category now

PR: docs/115193
Submitted by: Tomas Mozes <hydrapolic at gmail dot com>
Approved by: re (bmah),
keramida (mentor)
MFC after: 0 days

17 years ago- Use mount -t msdosfs instead of mount_msdosfs
Gabor Kovesdan [Wed, 22 Aug 2007 18:04:08 +0000 (18:04 +0000)]
- Use mount -t msdosfs instead of mount_msdosfs

PR: docs/115571
Submitted by: rodrigc
Approved by: re (bmah),
keramida (mentor)
MFC after: 1 week

17 years ago- Fix a copy-paste bug in the list of supported chips
Gabor Kovesdan [Wed, 22 Aug 2007 18:02:01 +0000 (18:02 +0000)]
- Fix a copy-paste bug in the list of supported chips

PR: docs/115151
Submitted by: O. Hartmann <ohartman at zedat dot fu-berlin dot de>
Approved by: re (bmah),
keramida (mentor)

17 years ago- Fix a bug which could cause a panic when enabling LRO
Andrew Gallatin [Wed, 22 Aug 2007 13:22:12 +0000 (13:22 +0000)]
- Fix a bug which could cause a panic when enabling LRO
   on an down mxge interface
- Fix a bug where mxge reported the link state as
   active when it wasn't (after ifconfig down).
- Prevent spurious watchdog resets when link partner is not consuming
- Add support for CX4 and popular XFP media detection
- Update the firmware and associated header files to 1.4.25

Approved by: re (kensmith)

17 years agoAssign sizes to assembly language support functions.
Joseph Koshy [Wed, 22 Aug 2007 05:06:14 +0000 (05:06 +0000)]
Assign sizes to assembly language support functions.

Approved by: re (kensmith)

17 years agoDefine an END() macro for use in i386 and amd64 assembly code, akin
Joseph Koshy [Wed, 22 Aug 2007 04:26:07 +0000 (04:26 +0000)]
Define an END() macro for use in i386 and amd64 assembly code, akin
to the one available on the ia64, sparc64, and sun4v architectures.

Approved by: re (kensmith)

17 years agoAdd thr_kill2 syscall.
David Xu [Wed, 22 Aug 2007 01:56:35 +0000 (01:56 +0000)]
Add thr_kill2 syscall.

Submitted by: Tijl Coosemans tijl at ulyssis dot org
Approved by: re (kensmith)

17 years agoAdd a HARDWARE section which lists supported devices.
MIHIRA Sanpei Yoshiro [Tue, 21 Aug 2007 13:20:13 +0000 (13:20 +0000)]
Add a HARDWARE section which lists supported devices.
Kyocera AH-K3001V Mobile Phone(WILLCOM)
Kyocera WX320K Mobile Phone(WILLCOM)

Approved by:    re (bmah)

17 years agoProperly initialize the dev_priv before calling the i915_dma_cleanup().
Konstantin Belousov [Tue, 21 Aug 2007 12:52:57 +0000 (12:52 +0000)]
Properly initialize the dev_priv before calling the i915_dma_cleanup().
This fixes my rev. 1.5.

Reviewed by: anholt
Approved by: re (kensmith)
MFC after: 2 weeks

17 years agoIn general, when we map a page into the kernel's address space, we no
Alan Cox [Tue, 21 Aug 2007 04:59:34 +0000 (04:59 +0000)]
In general, when we map a page into the kernel's address space, we no
longer create a pv entry for that mapping.  (The two exceptions are
mappings into the kernel's exec and pipe submaps.)  Consequently, there is
no reason for get_pv_entry() to dig deep into the free page queues, i.e.,
use VM_ALLOC_SYSTEM, by default.  This revision changes get_pv_entry() to
use VM_ALLOC_NORMAL by default, i.e., before calling pmap_collect() to
reclaim pv entries.

Approved by: re (kensmith)

17 years agoSome times ago, vfs_getopts() was changed, so that it would set error to
Olivier Houchard [Mon, 20 Aug 2007 15:33:22 +0000 (15:33 +0000)]
Some times ago, vfs_getopts() was changed, so that it would set error to
ENOENT if the option wasn't provided, instead of setting it to 0.
xfs however didn't catch up on this, so it assumed something went bad if
vfs_getopts() sets the error to non-zero, and just returns the error.
Unbreak xfs mount by just ignoring the error if vfs_getopts() sets the
error to ENOENT, as we should have sane defaults.

Reviewed by:    kan
Approved by:    re (rwatson)
Tested by:      rpaulo

17 years agoDo not drop vm_map lock between doing vm_map_remove() and vm_map_insert().
Konstantin Belousov [Mon, 20 Aug 2007 12:05:45 +0000 (12:05 +0000)]
Do not drop vm_map lock between doing vm_map_remove() and vm_map_insert().
For this, introduce vm_map_fixed() that does that for MAP_FIXED case.

Dropping the lock allowed for parallel thread to occupy the freed space.

Reported by: Tijl Coosemans <tijl ulyssis org>
Reviewed by: alc
Approved by: re (kensmith)
MFC after: 2 weeks

17 years agoDestroy the kaio_mtx on the freeing the struct kaioinfo in the
Konstantin Belousov [Mon, 20 Aug 2007 11:53:26 +0000 (11:53 +0000)]
Destroy the kaio_mtx on the freeing the struct kaioinfo in the
aio_proc_rundown.

Do not allow for zero-length read to be passed to the fo_read file method
by aio.

Reported and tested by: Peter Holm
Approved by: re (kensmith)

17 years ago - Improve runq_findbit_from() which is used by ULE's circular queue. Mask
Jeff Roberson [Mon, 20 Aug 2007 06:36:12 +0000 (06:36 +0000)]
 - Improve runq_findbit_from() which is used by ULE's circular queue.  Mask
   of the bits we want to ignore on the first pass rather than doing a
   linear scan.  This puts us within a few instructions of the cost of
   runq_findbit() and removes this function from the top of profiling output
   for context switch heavy workloads.

Approved by: re

17 years ago - Set steal_thresh to log2(ncpus). This improves idle-time load balancing
Jeff Roberson [Mon, 20 Aug 2007 06:34:20 +0000 (06:34 +0000)]
 - Set steal_thresh to log2(ncpus).  This improves idle-time load balancing
   on 2cpu machines by reducing it to 1 by default.  This improves loaded
   operation on 8cpu machines by increasing it to 3 where the extra idle
   time is not as critical.

Approved by: re

17 years agoAlways call sched_bind(), even if on the CPU in question. It is wrong to
Nate Lawson [Mon, 20 Aug 2007 06:28:26 +0000 (06:28 +0000)]
Always call sched_bind(), even if on the CPU in question.  It is wrong to
check if we're already on that cpu and skip the bind since the thread could
be migrated off in the meantime.

Suggested by: jeff
Approved by: re

17 years agoUse a different loop variable for the inner loop. This previous reuse could
Nate Lawson [Sun, 19 Aug 2007 20:34:13 +0000 (20:34 +0000)]
Use a different loop variable for the inner loop.  This previous reuse could
have caused a hang, but we got lucky with the available multi-CPU states
on actual hardware.

Submitted by: Bjorn Koenig <bkoenig / alpha-tierchen.de>
Approved by: re
MFC after: 3 days

17 years agoThis commit updates libarchive to be compatible with
Tim Kientzle [Sat, 18 Aug 2007 21:53:25 +0000 (21:53 +0000)]
This commit updates libarchive to be compatible with
GNU tar 1.17's implementation of --posix --sparse,
at the cost of losing compatibility with GNU tar 1.16.
Fortunately, the 1.17 implementation actually makes sense,
so the libarchive code is now a bit more straightforward
than before.

Background:  GNU tar 1.16 defined a new way to store
sparse files in --posix archives.  Unfortunately,
the implementation incorrectly inserted several
blocks of null padding after each such entry.
As a result, non-GNU tar implementations saw the
archive as truncated after any sparse entry.
This was fixed in GNU tar 1.17 at the cost of
losing compatibility with GNU tar 1.16 for this
new format (which is not the default, so hopefully
rarely used).  Libarchive recently gained support
for reading the GNU tar 1.16 formats; this commit
updates it to read the GNU tar 1.17 variant instead.

Approved by: re (ksmith for libarchive portion)
Approved by: re (blanket for libarchive_test portion)
MFC after: 5 days

17 years agoRemove references to the now-deleted installation notes and add a
Bruce A. Mah [Sat, 18 Aug 2007 17:11:14 +0000 (17:11 +0000)]
Remove references to the now-deleted installation notes and add a
pointer to the installation chapter of the Handbook (it might be a
good idea to sprinkle a few more through this article).

De-emphasize the floppy disk part of installation media; it's
generally believed that most users install from CDROM or DVD
nowadays.

Use &arch.* entities where appropriate.

Bump copyright date while here.

Approved by: re (implicitly)

17 years agoJust wbinv if both PREREAD and PREWRITE are set.
Olivier Houchard [Sat, 18 Aug 2007 16:47:28 +0000 (16:47 +0000)]
Just wbinv if both PREREAD and PREWRITE are set.
In PREREAD, just invalidate the cache lines, and do not write back them, if
the buffer is properly aligned.

Approved by: re (blanket)

17 years agoRemove comment that is no longer quite true.
Konstantin Belousov [Sat, 18 Aug 2007 16:41:31 +0000 (16:41 +0000)]
Remove comment that is no longer quite true.

Noted by: alc
Approved by: re (kensmith)

17 years agoFactor out arch.* entities so we don't need to include them with
Bruce A. Mah [Sat, 18 Aug 2007 16:40:37 +0000 (16:40 +0000)]
Factor out arch.* entities so we don't need to include them with
every one of the release documents.

Approved by: re (implicitly)

17 years agoFix the phys_pager in the way similar to the rev. 1.83 of the
Konstantin Belousov [Sat, 18 Aug 2007 16:40:33 +0000 (16:40 +0000)]
Fix the phys_pager in the way similar to the rev. 1.83 of the
sys/vm/device_pager.c:

Protect the creation of the phys pager with non-NULL handle with the
phys_pager_mtx. Lookup of phys pager in the pagers list by handle is now
synchronized with its removal from the list, and phys_pager_mtx is put
before vm object lock in lock order. Dispose the phys_pager_alloc_lock
and tsleep calls, together with acquiring Giant, since phys_pager_mtx
now covers the same block.

Reviewed by: alc
Approved by: re (kensmith)

17 years agoIf the STP state machine is stopped then clear the bridge-id and root-id.
Andrew Thompson [Sat, 18 Aug 2007 12:06:13 +0000 (12:06 +0000)]
If the STP state machine is stopped then clear the bridge-id and root-id.

Approved by: re (kensmith)