]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUnbreak no-ip and no-inet6 module builds with ipfw. For now continue to
bz [Tue, 27 Sep 2011 13:27:17 +0000 (13:27 +0000)]
Unbreak no-ip and no-inet6 module builds with ipfw.  For now continue to
build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the
assumption that the private L2 hook (which hopefully eventually will be a
pfil hook as well) can still be useful.

Allow building the module without inet as well.

Glanced at by: jhb
MFC after: 3 days

12 years agoDo not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
kib [Tue, 27 Sep 2011 13:17:02 +0000 (13:17 +0000)]
Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal()
do not want to deliver the signal, and debugger never get a notification
of exec.

Found and tested by: Anton Yuzhaninov <citrin citrin ru>
Discussed with: jhb
MFC after: 2 weeks

12 years agoInstall ciss(4) ioctl header (together with other .h files from sys/dev/ciss).
kib [Tue, 27 Sep 2011 12:14:43 +0000 (12:14 +0000)]
Install ciss(4) ioctl header (together with other .h files from sys/dev/ciss).

PR: kern/109813
Discussued with: Alex Samorukov <samm os2 kiev ua>
(smartmontools maintainer)
MFC after: 1 week

12 years agoAdd one more ID for the Marvell 88SE9128 6Gbps SATA controller.
mav [Tue, 27 Sep 2011 09:32:34 +0000 (09:32 +0000)]
Add one more ID for the Marvell 88SE9128 6Gbps SATA controller.

MFC after: 3 days

12 years agoFix interrupt counters dumping on SW_WATCHDOG fire.
mav [Tue, 27 Sep 2011 09:30:20 +0000 (09:30 +0000)]
Fix interrupt counters dumping on SW_WATCHDOG fire.

12 years agoUse PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().
pjd [Tue, 27 Sep 2011 08:50:37 +0000 (08:50 +0000)]
Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

MFC after: 3 days

12 years agoNo need to wrap pjdlog functions around with KEEP_ERRNO() macro.
pjd [Tue, 27 Sep 2011 08:26:09 +0000 (08:26 +0000)]
No need to wrap pjdlog functions around with KEEP_ERRNO() macro.

MFC after: 3 days

12 years agoPrefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().
pjd [Tue, 27 Sep 2011 08:21:00 +0000 (08:21 +0000)]
Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().

MFC after: 3 days

12 years ago- Convert some impossible conditions into assertions.
pjd [Tue, 27 Sep 2011 08:04:01 +0000 (08:04 +0000)]
- Convert some impossible conditions into assertions.
- Add missing 'if' in comment.

MFC after: 3 days

12 years agoCorrect two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().
pjd [Tue, 27 Sep 2011 07:59:10 +0000 (07:59 +0000)]
Correct two mistakes when converting asserts to PJDLOG_ASSERT()/PJDLOG_ABORT().

MFC after: 3 days

12 years agoPrefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjd [Tue, 27 Sep 2011 07:57:15 +0000 (07:57 +0000)]
Prefer PJDLOG_ASSERT() and PJDLOG_ABORT() over assert() and abort().
pjdlog versions will log problem to syslog when application is running in
background.

MFC after: 3 days

12 years agoNo need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
pjd [Tue, 27 Sep 2011 07:52:39 +0000 (07:52 +0000)]
No need to use KEEP_ERRNO() macro around pjdlog functions, as they don't
modify errno.

MFC after: 3 days

12 years ago- Add missing interdependencies to kerberos libraries. Some of the
stas [Tue, 27 Sep 2011 07:14:12 +0000 (07:14 +0000)]
- Add missing interdependencies to kerberos libraries.  Some of the
  kerberos libraries were not linked properly (missing dependencies),
  which causes 3rd party applications linking to fail when --as-needed
  ld flag is used.  I also added the --no-undefined ld(1) flag to make
  sure that there're no missing dependencies.

MFC after: 3 days

12 years agoAdd quirks for some USB mass storage devices which doesn't respond
hselasky [Tue, 27 Sep 2011 07:06:02 +0000 (07:06 +0000)]
Add quirks for some USB mass storage devices which doesn't respond
after trying to query the synchronize cache support.

Submitted by: Keith White
PR: usb/160911
Approved by: re (kensmith)
MFC after: 1 week

12 years agoFix typo in OSIOCGIFADDR.
pluknet [Tue, 27 Sep 2011 07:05:41 +0000 (07:05 +0000)]
Fix typo in OSIOCGIFADDR.

MFC after: 3 days

12 years ago- Move misplaced reference [1]
gabor [Tue, 27 Sep 2011 07:00:24 +0000 (07:00 +0000)]
- Move misplaced reference [1]
- Sort references [1]
- s/Since/Because/ [2]

Submitted by: arundel [1],
Chad Perrin <perrin@apotheon.com> [2]
MFC after: 3 days

12 years agoEnsure that pjdlog functions don't modify errno.
pjd [Tue, 27 Sep 2011 06:43:51 +0000 (06:43 +0000)]
Ensure that pjdlog functions don't modify errno.

MFC after: 3 days

12 years agoAdd myself to committers-src.dot.
rmh [Tue, 27 Sep 2011 05:30:52 +0000 (05:30 +0000)]
Add myself to committers-src.dot.

Approved by: kib (mentor)

12 years agoForgot to add "RELENG_8" to list of CVS tags.
kensmith [Mon, 26 Sep 2011 11:57:48 +0000 (11:57 +0000)]
Forgot to add "RELENG_8" to list of CVS tags.

Submitted by: Mamontov Roman <mr.xanto at gmail.com>
Approved by: re (implicit)

12 years agoShift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
kensmith [Mon, 26 Sep 2011 02:27:04 +0000 (02:27 +0000)]
Shift head from 9.0-CURRENT to 10.0-CURRENT in preparation for releasing
it from the 9.0-RELEASE release cycle code freeze.

Approved by: re (implicit)

12 years agoUpdate netfront so that it queries and honors published
gibbs [Wed, 21 Sep 2011 00:15:29 +0000 (00:15 +0000)]
Update netfront so that it queries and honors published
back-end features.

sys/dev/xen/netfront/netfront.c:
o Add xn_query_features() which reads the XenStore and
  records the TSO, LRO, and chained ring-request support
  of the backend.
o Rename xn_configure_lro() to xn_configure_features() and
  use this routine to manage the setup of TSO, LRO, and
  checksum offload.
o In create_netdev(), initialize if_capabilities and
  if_hwassist to the capabilities found on all backends.
  Delegate configuration of if_capenable and the TSO flag
  if if_hwassist to xn_configure_features().

Reported by: Hugo Silva (fix inspired by patch provided)
Approved by: re
MFC after: 1 week

12 years agoModify the netfront driver so it can successfully attach to
gibbs [Wed, 21 Sep 2011 00:13:04 +0000 (00:13 +0000)]
Modify the netfront driver so it can successfully attach to
PV devices with the ioemu attribute set.

sys/dev/xen/netfront/netfront.c:
o If a mac address for the interface cannot be found
  in the front-side XenStore tree, look for an entry
  in the back-side tree.  With ioemu devices, the
  emulator does not populate the front side tree and
  neither does Xend.
o Return an error rather than panic when an attach
  attempt fails.

Reported by: Janne Snabb (fix inspired by patch provided)
PR: kern/154302
Approved by: re

12 years agoCorrect suspend/resume support in the Netfront driver.
gibbs [Wed, 21 Sep 2011 00:08:25 +0000 (00:08 +0000)]
Correct suspend/resume support in the Netfront driver.

Sponsored by: BQ Internet

sys/dev/xen/netfront/netfront.c:
o Implement netfront_suspend(), a specialized suspend
  handler for the netfront driver.  This routine simply
  disables the carrier so the driver is idle during
  system suspend processing.
o Fix a leak when re-initializing LRO during a link reset.
o In netif_release_tx_bufs(), when cleaning up the grant
  references for our TX ring, use gnttab_end_foreign_access_ref
  instead of attempting to grant the page again.
o In netif_release_tx_bufs(), we do not track mbufs associated
  with mbuf chains, but instead just free each mbuf directly.
  Use m_free(), not m_freem(), to avoid double frees of mbufs.
o Refactor some code to enhance clarity.

Approved by: re
MFC after: 1 week

12 years ago[ Forced commit. Actual changes accidentally included in r225704 ]
gibbs [Wed, 21 Sep 2011 00:06:02 +0000 (00:06 +0000)]
[ Forced commit.  Actual changes accidentally included in r225704 ]

sys/dev/xen/control/control.c:
Fix locking violations in Xen HVM suspend processing
and have it perform similar actions to those performed
during an ACPI triggered suspend.

Sponsored by: BQ Internet
Approved by: re
MFC after: 1 week

12 years agoAdd suspend/resume support to the Xen blkfront driver.
gibbs [Wed, 21 Sep 2011 00:02:44 +0000 (00:02 +0000)]
Add suspend/resume support to the Xen blkfront driver.

Sponsored by: BQ Internet

sys/dev/xen/blkfront/block.h:
sys/dev/xen/blkfront/blkfront.c:
Remove now unused blkif_vdev_t from the blkfront soft.

sys/dev/xen/blkfront/blkfront.c:
o In blkfront_suspend(), indicate the desire to suspend
  by changing the softc connected state to SUSPENDED, and
  then wait for any I/O pending on the remote peer to
  drain.  Cancel suspend processing if I/O does not
  drain within 30 seconds.
o Enable and update blkfront_resume().  Since I/O is
  drained prior to the suspension of the VM, the complicated
  recovery process performed by other Xen blkfront
  implementations is avoided.  We simply tear down the
  connection to our old peer, and then re-connect.
o In blkif_initialize(), fix a resource leak and botched
  return if we cannot allocate shadow memory for our
  requests.
o In blkfront_backend_changed(), correct our response to
  the XenbusStateInitialised state.  This state indicates
  that our backend peer has published sufficient data for
  blkfront to publish ring information and other XenStore
  data, not that a connection can occur.  Blkfront now
  will only perform connection processing in response to
  the XenbusStateConnected state.  This corrects an issue
  where blkfront connected before the backend was ready
  during resume processing.

Approved by: re
MFC after: 1 week

12 years agoProperly handle suspend/resume events in the Xen device
gibbs [Tue, 20 Sep 2011 23:44:34 +0000 (23:44 +0000)]
Properly handle suspend/resume events in the Xen device
framework.

Sponsored by: BQ Internet

sys/xen/xenbus/xenbusb.c:
o In xenbusb_resume(), publish the state transition of the
  resuming device into XenbusStateIntiailising so that the
  remote peer can see it.  Recording the state locally is
  not sufficient to trigger a re-connect sequence.
o In xenbusb_resume(), defer new-bus resume processing until
  after the remote peer's XenStore address has been updated.
  The drivers may need to refer to this information during
  resume processing.

sys/xen/xenbus/xenbusb_back.c:
sys/xen/xenbus/xenbusb_front.c:
Register xenbusb_resume() rather than bus_generic_resume()
as the handler for device_resume events.

sys/xen/xenstore/xenstore.c:
o Fix grammer in a comment.
o In xs_suspend(), pass suspend events on to the child
  devices (e.g. xenbusb_front/back, that are attached
  to the XenStore.

Approved by: re
MFC after: 1 week

12 years agoUse nowait sync request for a vnode when doing softdep cleanup. We possibly
kib [Tue, 20 Sep 2011 21:53:26 +0000 (21:53 +0000)]
Use nowait sync request for a vnode when doing softdep cleanup. We possibly
own the unrelated vnode lock, doing waiting sync causes deadlocks.

Reported and tested by: pho
Approved by: re (bz)

12 years agoRestore the writing of the .bss sections of the dsos (not the main
kib [Tue, 20 Sep 2011 21:49:54 +0000 (21:49 +0000)]
Restore the writing of the .bss sections of the dsos (not the main
executable) after r190885. The whole region for the dso is mmaped with
MAP_NOCORE flag, doing only mprotect(2) over .bss prevented it from
writing .bss to core files.

Revert the optimization of using mprotect(2) to establish .bss, overlap
the section with mmap(2).

Reported by: attilio
Reviewed by: attilio, emaste
Approved by: re (bz)
MFC after: 2 weeks

12 years agoMake KBI changes required for future MFCing of inpcb rtentry / llentry caching.
kmacy [Tue, 20 Sep 2011 20:27:26 +0000 (20:27 +0000)]
Make KBI changes required for future MFCing of inpcb rtentry / llentry caching.

Reviewed by: rwatson, bz
Approved by: re (kib)

12 years agoAvoid starting the USB transfer if an error is already pending.
hselasky [Tue, 20 Sep 2011 14:17:58 +0000 (14:17 +0000)]
Avoid starting the USB transfer if an error is already pending.
This change fixes a race in device side mode during clear-stall from
host, which can cause data to be sent too early on the given
endpoint.

Approved by: re (kib)
MFC after: 1 week

12 years agoManually set the channel when using monitor mode - the firmware
adrian [Tue, 20 Sep 2011 04:30:23 +0000 (04:30 +0000)]
Manually set the channel when using monitor mode - the firmware
doesn't select it automatically.

Submitted by: nox
Reviewed by: bschmidt
Approved by: re
PR: kern/160815

12 years agoUse REQUIRE: line to reorder rc.d/bridge instead of BEFORE: line.
hrs [Tue, 20 Sep 2011 00:37:35 +0000 (00:37 +0000)]
Use REQUIRE: line to reorder rc.d/bridge instead of BEFORE: line.

Pointed out by: dougb
Approved by: re (bz)

12 years agoRemove RA timer on an interface with !IFF_UP actively after starting to send
hrs [Tue, 20 Sep 2011 00:32:30 +0000 (00:32 +0000)]
Remove RA timer on an interface with !IFF_UP actively after starting to send
clean-up RA messages for shutting down.  The RA timers could prevent the rtadvd
daemon from shutting down because ra_output() just ignored !IFF_UP interfaces
and TRANSITIVE->UNCONFIGURED state transition never happened due to it.

Spotted by: kib
Approved by: re (bz)

12 years agoCopy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts(). This fixes
hrs [Tue, 20 Sep 2011 00:29:17 +0000 (00:29 +0000)]
Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts().  This fixes
inconsistency when options are specified by both setsockopt() and ancillary
data types.

PR: kern/158307
Approved by: re (bz)

12 years ago- Fix a trivial bug in iconv. When there is no space to perform the
gabor [Mon, 19 Sep 2011 22:49:36 +0000 (22:49 +0000)]
- Fix a trivial bug in iconv. When there is no space to perform the
  conversion, conversion must fail and errno must be set to E2BIG.

PR: standards/160673
Submitted by: Henning Petersen <henning.petersen@t-online.de>
Reviewed by: pluknet
Approved by: re (kib), delphij (mentor)

12 years agoDo not overallocate on the stack. Threaded code might use custom stack
kib [Mon, 19 Sep 2011 22:35:54 +0000 (22:35 +0000)]
Do not overallocate on the stack. Threaded code might use custom stack
size.

Reported by: many
Tested by: Jeremie Le Hen <jeremie@le-hen.org> (previous version)
Reviewed by: jilles
Approved by: re (bz)
MFC after: 2 weeks

12 years agoCleanup the iterator code, remove code that is never executed.
tuexen [Mon, 19 Sep 2011 21:47:20 +0000 (21:47 +0000)]
Cleanup the iterator code, remove code that is never executed.

Approved by: re
MFC after: 1 month.

12 years agoIt is safe to initialize locks even on early boot (and it is the same
attilio [Mon, 19 Sep 2011 18:29:15 +0000 (18:29 +0000)]
It is safe to initialize locks even on early boot (and it is the same
thing all the other architectures already do) thus just initialize
kernel_pmap in pmap_bootstrap().

Reported by: alc
Reviewed by: alc, marius
Tested by: flo, marius
Approved by: re (kib)
MFC after: 1 week

12 years ago- Document inet6 no_radr flag.
hrs [Mon, 19 Sep 2011 16:01:53 +0000 (16:01 +0000)]
- Document inet6 no_radr flag.
- Add descriptions of sysctl(8) variables which can control the default
  configuration of the inet6 flags.

Approved by: re (kib)

12 years ago- Document $ipv6_cpe_wanif.
hrs [Mon, 19 Sep 2011 16:00:55 +0000 (16:00 +0000)]
- Document $ipv6_cpe_wanif.
- Emphasize $ipv6_enable and $ipv6_prefer are deprecated.
- Add more detail descriptions about $ipv6_activate_all_interfaces.
- Add some more examples of $ifconfig_IF_ipv6.
- rtsold(8) and rtadvd(8) can be used even when ipv6_gateway_enable=NO now.

Approved by: re (kib)

12 years agoUse resolvconf(8) to create /etc/resolv.conf, not directly overwrite it.
hrs [Mon, 19 Sep 2011 15:56:50 +0000 (15:56 +0000)]
Use resolvconf(8) to create /etc/resolv.conf, not directly overwrite it.

Approved by: re (kib)

12 years agoFix the script order to run rc.d/bridge after the initial network
hrs [Mon, 19 Sep 2011 15:55:53 +0000 (15:55 +0000)]
Fix the script order to run rc.d/bridge after the initial network
interface configuration and before running network daemons.

Approved by: re (kib)

12 years ago#PROCHOT assertion is sticky after reading the MSR (accordingly with
attilio [Mon, 19 Sep 2011 10:58:30 +0000 (10:58 +0000)]
#PROCHOT assertion is sticky after reading the MSR (accordingly with
Intel manuals) it must be cleared by writing a 0.
Fix that.

Sponsored by: Sandvine Incorporated
Reported by: rstone
Reviewed by: delphij, emaste, rstone
Approved by: re (kib)
MFC after: 1 week

12 years agoImplement missing USB debug information functions.
hselasky [Mon, 19 Sep 2011 08:52:06 +0000 (08:52 +0000)]
Implement missing USB debug information functions.

Approved by: re (kib)
MFC after: 1 week

12 years agoFix a logic bug in pc-sysinstall creating partitions.
jpaetzel [Mon, 19 Sep 2011 05:12:53 +0000 (05:12 +0000)]
Fix a logic bug in pc-sysinstall creating partitions.
Improve exit when an error occurs.
Fix parsing to grab values which contain extra '=' signs.
Fix a bug setting the timezone properly.
Fix a usage bug when setting up with gmirror.
Allow a uzip file from local media to be used.
Allow specifying flags for "newfs" when using UFS as the file system.
Run custom commands after doing final cleanup / fstab generation
and such. Also fix using relative path for config file.

Approved by: re (bz)

12 years agoBump .Dd date for previous revision.
delphij [Sat, 17 Sep 2011 22:53:05 +0000 (22:53 +0000)]
Bump .Dd date for previous revision.

Approved by: re (follow up commit fixing trivial issue)

12 years agoChange the example of using smbfs in fstab to a password-less one,
delphij [Sat, 17 Sep 2011 22:17:31 +0000 (22:17 +0000)]
Change the example of using smbfs in fstab to a password-less one,
which is less likely to block a remote system from boot.

Submitted by: Garrett Cooper <yanegomi@gmail.com>
PR: doc/160775
MFC after: 1 month
Approved by: re (kib)

12 years agoFix error handling bug that would prevent MAC structures from getting
trasz [Sat, 17 Sep 2011 20:48:49 +0000 (20:48 +0000)]
Fix error handling bug that would prevent MAC structures from getting
freed properly if resource limit got exceeded.

Approved by: re (kib)

12 years agoFix long-standing thinko regarding maxproc accounting. Basically,
trasz [Sat, 17 Sep 2011 19:55:32 +0000 (19:55 +0000)]
Fix long-standing thinko regarding maxproc accounting.  Basically,
we were accounting the newly created process to its parent instead
of the child itself.  This caused problems later, when the child
changed its credentials - the per-uid, per-jail etc counters were
not properly updated, because the maxproc counter in the child
process was 0.

Approved by: re (kib)

12 years agoClear transmit checksum offload context state upon lem(4) interface
rstone [Sat, 17 Sep 2011 13:48:09 +0000 (13:48 +0000)]
Clear transmit checksum offload context state upon lem(4) interface
initialization.  Prior to this change packets may be transmitted with an
incorrect checksum.

Em(4) already has an equivalent change in r213234.

Obtained From:  Sandvine
MFC After:      1 week
Approved by:    re (bz)

12 years agoInquire about terminal type if starting from a serial console and do
nwhitehorn [Sat, 17 Sep 2011 09:25:45 +0000 (09:25 +0000)]
Inquire about terminal type if starting from a serial console and do
not configure the host's networking if netbooted [1]. Also fix FTP
installations behind some firewalls [2].

PR: bin/159583 [2]
Reported by: stas [1]
Approved by: re (kib)

12 years agoFix the enabling/disabling of Heartbeats and path MTU
tuexen [Sat, 17 Sep 2011 08:50:29 +0000 (08:50 +0000)]
Fix the enabling/disabling of Heartbeats and path MTU
discovery when using the SCTP_PEER_ADDR_PARAMS socket option.
Approved by: re
MFC after: 1 month.

12 years agoAdd myself and connect me with my mentors
cs [Fri, 16 Sep 2011 22:57:50 +0000 (22:57 +0000)]
Add myself and connect me with my mentors

Approved by: re@, glarkin@

12 years agoAuto-generated code from sys_ prefixing makesyscalls.sh change
kmacy [Fri, 16 Sep 2011 14:04:14 +0000 (14:04 +0000)]
Auto-generated code from sys_ prefixing makesyscalls.sh change

Approved by: re(bz)

12 years agoIn order to maximize the re-usability of kernel code in user space this
kmacy [Fri, 16 Sep 2011 13:58:51 +0000 (13:58 +0000)]
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.

Reviewed by: rwatson
Approved by: re (bz)

12 years agoRemove the svn:keywords property and restore the historical $FreeBSD$ tag.
des [Fri, 16 Sep 2011 11:14:10 +0000 (11:14 +0000)]
Remove the svn:keywords property and restore the historical $FreeBSD$ tag.

Approved by: re (kib)
MFC after: 3 weeks

12 years agoFix a typo introduced in r219892 that prevented file system options from
nwhitehorn [Fri, 16 Sep 2011 09:38:01 +0000 (09:38 +0000)]
Fix a typo introduced in r219892 that prevented file system options from
being set correctly.

Approved by: re (kib)

12 years agoFix WPA setup broken by changes to shell argument passing inside the
nwhitehorn [Fri, 16 Sep 2011 09:37:13 +0000 (09:37 +0000)]
Fix WPA setup broken by changes to shell argument passing inside the
installer network configuration.

PR: bin/159558
Approved by: re (kib)

12 years agoPrint the package name on deletion errors.
pluknet [Fri, 16 Sep 2011 09:09:58 +0000 (09:09 +0000)]
Print the package name on deletion errors.

It appears this was already done in NetBSD a decade ago, hence
I just reuse the change (except our code is bad styled).

PR: bin/160516
Approved by: portmgr
Approved by: re (kib)
Obtained from: NetBSD

12 years agozfsboottest: some additional enhancements
avg [Fri, 16 Sep 2011 08:24:31 +0000 (08:24 +0000)]
zfsboottest: some additional enhancements

- redirect diagnostics printfs in the boot code to stderr
- do not read trailing garbage from a trailing block of a file

Also add my copyright to the file after making so many changes.

Approved by: re (kib)
MFC after: 1 week

12 years agozfstest: rename to zfsboottest and move to tools
avg [Fri, 16 Sep 2011 08:22:48 +0000 (08:22 +0000)]
zfstest: rename to zfsboottest and move to tools

Approved by: re (kib)
MFC after: 1 week

13 years agoWhen resuming an HTTP download, we failed to verify that the range
des [Thu, 15 Sep 2011 22:50:31 +0000 (22:50 +0000)]
When resuming an HTTP download, we failed to verify that the range
returned by the server matched what we requested, and blindly appended
what we received to what we already had.  This could go two ways: if the
delivered offset was higher than expected, the local file would contain
duplicate data, while if it was lower than expected, there would be data
missing from the middle of the file.  Furthermore, if the transfer was
interrupted again, each subsequent attempt would compound the error.
Fix the first problem by restarting the transfer from scratch if there
is a gap, and the second by explicitly seeking to the correct location
in the local file so as to overwrite any duplicated data.

PR: bin/117277
Approved by: re (kib)
MFC after: 3 weeks

13 years agoIt seems when I added code for affine unit changes to units, I
dwmalone [Thu, 15 Sep 2011 19:52:43 +0000 (19:52 +0000)]
It seems when I added code for affine unit changes to units, I
forgot to tell the man page we could now convert Celsius to Fahrenheit.

Approved by: re (kib)
MFC after: 1 month

13 years agoExpose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
jh [Thu, 15 Sep 2011 13:32:43 +0000 (13:32 +0000)]
Expose "log" in the default devfs rules. /etc/rc.d/jail creates /dev/log
as a symbolic link.

PR: conf/160711
Submitted by: Jase Thew
Approved by: re (kib)
MFC after: 1 week

13 years agoAdd IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able
ae [Thu, 15 Sep 2011 12:28:17 +0000 (12:28 +0000)]
Add IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able
build it with and without INET/INET6 support.

Submitted by: Alexander V. Chernikov <melifaro at yandex-team.ru> [1]
Tested by: Alexander V. Chernikov <melifaro at yandex-team.ru> [1]
Approved by: re (bz)
MFC after: 2 weeks

13 years agoFix a typo introduced in
tuexen [Thu, 15 Sep 2011 12:20:52 +0000 (12:20 +0000)]
Fix a typo introduced in
http://svn.freebsd.org/changeset/base/225571
Reported by Ilya A. Arkhipov.

Approved by: re
MFC after: 1 month.

13 years agoRename the cc.4 and cc.9 modular congestion control related man pages to
lstewart [Thu, 15 Sep 2011 12:15:36 +0000 (12:15 +0000)]
Rename the cc.4 and cc.9 modular congestion control related man pages to
mod_cc.4 and mod_cc.9 respectively to avoid any possible confusion with the cc.1
gcc man page. Update references to these man pages where required.

Requested by: Grenville Armitage
Approved by: re (kib)
MFC after: 3 days

13 years agoUse the proper dynamic tls block to calculate the tls variable address
kib [Thu, 15 Sep 2011 11:50:09 +0000 (11:50 +0000)]
Use the proper dynamic tls block to calculate the tls variable address
in case tls data generation was updated.

PR: misc/160721
Submitted by: "Thinker K.F. Li" <thinker codemud net>
Tested by: flo
Approved by: re (bz)
MFC after: 1 week

13 years agoPut amd64_syscall() prototype in md_var.h.
kib [Thu, 15 Sep 2011 09:54:07 +0000 (09:54 +0000)]
Put amd64_syscall() prototype in md_var.h.

Requested by: jhb
Reviewed by: alc, jhb
Approved by: re (bz)
MFC after: 2 weeks

13 years agoMicrooptimize the return path for the fast syscalls on amd64. Arrange
kib [Thu, 15 Sep 2011 09:53:04 +0000 (09:53 +0000)]
Microoptimize the return path for the fast syscalls on amd64. Arrange
the code to have the fall-through path to follow the likely target.
Do not use intermediate register to reload user %rsp.

Proposed by: alc
Reviewed by: alc, jhb
Approved by: re (bz)
MFC after: 2 weeks

13 years agoCorrect the RFC number for the description of IPv6 privacy addressing
dougb [Thu, 15 Sep 2011 09:22:49 +0000 (09:22 +0000)]
Correct the RFC number for the description of IPv6 privacy addressing

Reviewed by: bz
Approved by: re (kib)

13 years agoMake sure that SCTP rejects broadcast, multicast and wildcard addresses
tuexen [Thu, 15 Sep 2011 08:49:54 +0000 (08:49 +0000)]
Make sure that SCTP rejects broadcast, multicast and wildcard addresses
as remote addresses.

Approved by: re
MFC after: 1 month.

13 years agoEnsure that ta_pending doesn't overflow u_short by capping its value at USHRT_MAX.
adrian [Thu, 15 Sep 2011 08:42:06 +0000 (08:42 +0000)]
Ensure that ta_pending doesn't overflow u_short by capping its value at USHRT_MAX.

If it overflows before the taskqueue can run, the task will be
re-added to the taskqueue and cause a loop in the task list.

Reported by: Arnaud Lacombe <lacombar@gmail.com>
Submitted by: Ryan Stone <rysto32@gmail.com>
Reviewed by: jhb
Approved by: re (kib)
MFC after: 1 day

13 years agoMinor spelling, wording and punctuation fixes in comments.
brueffer [Wed, 14 Sep 2011 20:13:10 +0000 (20:13 +0000)]
Minor spelling, wording and punctuation fixes in comments.

PR: 155984
Submitted by: gcooper
Approved by: re (kib)
MFC after: 1 week

13 years agoEnsure that 1-to-1 style SCTP sockets can only be connected once.
tuexen [Wed, 14 Sep 2011 19:10:13 +0000 (19:10 +0000)]
Ensure that 1-to-1 style SCTP sockets can only be connected once.
Allow implicit setup also for 1-to-1 style sockets as described
in the latest version of the socket API ID.

Approved by: re
MFC after: 1 month

13 years agoReduce USB memory usage during enumeration.
hselasky [Wed, 14 Sep 2011 15:16:53 +0000 (15:16 +0000)]
Reduce USB memory usage during enumeration.

We are allocating some kilobytes of extra memory during USB device enumeration.
This does not change alot under FreeBSD, but makes sense for various embedded
operating systems using the FreeBSD USB stack, which have less memory
resources available.

Approved by: re (kib)
MFC after: 1 week

13 years agoFix the handling of the flowlabel and DSCP value in the SCTP_PEER_ADDR_PARAMS
tuexen [Wed, 14 Sep 2011 08:15:21 +0000 (08:15 +0000)]
Fix the handling of the flowlabel and DSCP value in the SCTP_PEER_ADDR_PARAMS
socket option.
Honor the net.inet6.ip6.auto_flowlabel sysctl setting.

Approved by: re (bz)
MFC after: 1 month.

13 years agoAllow WPA PSKs up to 63 characters, the max length according to
brueffer [Tue, 13 Sep 2011 21:39:26 +0000 (21:39 +0000)]
Allow WPA PSKs up to 63 characters, the max length according to
wpa_supplicant.conf(5).  Up to now, the PSK was truncated
to 15 characters (the length of the input field).

PR: 159559
Submitted by: Gavin Chappell <gavin.chappell@gmail.com>
Approved by: re (kib)

13 years agoInclude descriptions for keymaps missing from INDEX.keymaps. This fixes
gavin [Tue, 13 Sep 2011 21:15:23 +0000 (21:15 +0000)]
Include descriptions for keymaps missing from INDEX.keymaps.  This fixes
the five keymaps referred to only by filename on the keymap selection
screen of bsdinstall.

Approved by: re (kib)
MFC after: 1 week

13 years agoModify vfs_register() to use a hash calculation
rmacklem [Tue, 13 Sep 2011 21:01:26 +0000 (21:01 +0000)]
Modify vfs_register() to use a hash calculation
on vfc_name to set vfc_typenum, so that vfc_typenum doesn't
change when file systems are loaded in different orders. This
keeps NFS file handles from changing, for file systems that
use vfc_typenum in their fsid. This change is controlled via
a loader.conf variable called vfs.typenumhash, since vfc_typenum
will change once when this is enabled. It defaults to 1 for
9.0, but will default to 0 when MFC'd to stable/8.

Tested by: hrs
Reviewed by: jhb, pjd (earlier version)
Approved by: re (kib)
MFC after: 1 month

13 years agoFix typos in error messages.
brueffer [Tue, 13 Sep 2011 20:35:34 +0000 (20:35 +0000)]
Fix typos in error messages.

Found by: kib
Approved by: re (kib)
MFC after: 1 week

13 years agoFix csup to allow case insensitive server names in the auth file,
brueffer [Tue, 13 Sep 2011 20:33:27 +0000 (20:33 +0000)]
Fix csup to allow case insensitive server names in the auth file,
just as advertised in the manpage.

PR: 158652
Submitted by: stephen
Approved by: re (kib)
MFC after: 1 week

13 years agoDo not try to change the mode or ownership of the root of the mountpoint
kib [Tue, 13 Sep 2011 20:16:11 +0000 (20:16 +0000)]
Do not try to change the mode or ownership of the root of the mountpoint
when newly established mdmfs mount is readonly.

PR: bin/128427
Tested and reviewed by: jchandra
MFC after: 1 week
Approved by: re (bz)

13 years agoImprove the sleep_delay sysctl description by specifying which unit
brueffer [Tue, 13 Sep 2011 15:57:29 +0000 (15:57 +0000)]
Improve the sleep_delay sysctl description by specifying which unit
the number is in.

PR: 159975
Submitted by: gcooper
Approved by: re (kib)
MFC after: 1 week

13 years ago- Fix compiler warning in ADD_64() macro.
davidch [Tue, 13 Sep 2011 15:49:28 +0000 (15:49 +0000)]
- Fix compiler warning in ADD_64() macro.

Approved by: re
Obtained from: dimitry@andic.com
MFC after: One week

13 years agozfs boot subroutines: correctly specify type of an integer literal
avg [Tue, 13 Sep 2011 14:07:05 +0000 (14:07 +0000)]
zfs boot subroutines: correctly specify type of an integer literal

Found by adding more warning flags to zfs boot blocks build.

Approved by: re (kib)
MFC after: 1 week

13 years agogpt/zfs boot blocks: reduce optimizing CFLAGS to -O1
avg [Tue, 13 Sep 2011 14:03:55 +0000 (14:03 +0000)]
gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1

gpt and zfs boot blocks are not nearly as size-constrained as boot2
from which they inherited their current optimization and anti-optimization
options.  As such the current options do not provide any benefit, but
make debugging of the code much harder.
Also, it has been demonstrated that combination of -mrtd and
-fno-unit-at-a-time may result in mis-compilation of the boot code
with the current base gcc.

Additionally, intermediate assembly file filtering is removed for
zfsboot.

The new boot blocks are all compile- and boot- tested using qemu.
gptzfsboot is tested with real hardware.

Reported by: Peter Jeremy <peterjeremy@acm.org> [miscompilation]
Discussed with: bde, jhb
Tested by: Sebastian Chmielewski <chmielsster@gmail.com> [gptzfsboot]
Approved by: re (kib)
MFC after: 3 weeks

13 years agozfstest: cleanup the code, improve functionality and diagnostics
avg [Tue, 13 Sep 2011 14:01:35 +0000 (14:01 +0000)]
zfstest: cleanup the code, improve functionality and diagnostics

The utility is not connected to the build, so it should be safe
to update it.
To do: move the utility to tools/.
Some code is provided by Peter Jeremy <peterjeremy@acm.org>

Tested by: Sebastian Chmielewski <chmielsster@gmail.com>,
Peter Jeremy <peterjeremy@acm.org> (earlier versions)
Approved by: re (kib)
MFC after: 4 days

13 years agoUpdate ObsoleteFiles.inc:
pluknet [Tue, 13 Sep 2011 13:56:18 +0000 (13:56 +0000)]
Update ObsoleteFiles.inc:
- liblwres shared library version bumped with bind98 import
- named.reload removed in favor of rc.d

Approved by: re (kib)
No objection: dougb

13 years agoFix cpio on ARM.
kientzle [Tue, 13 Sep 2011 05:52:34 +0000 (05:52 +0000)]
Fix cpio on ARM.

PR: bin/160430
Submitted by: Ian Lepore
Approved by: re (Kostik Belousov)
MFC after: 7 days

13 years agoMerge from openresolv 3.4.4 in the vendor branch.
hrs [Tue, 13 Sep 2011 02:46:22 +0000 (02:46 +0000)]
Merge from openresolv 3.4.4 in the vendor branch.

Approved by: re (kib)

13 years ago- Add an warning when ifconfig_IF_ipv6 has no inet6 keyword in front
hrs [Tue, 13 Sep 2011 00:09:47 +0000 (00:09 +0000)]
- Add an warning when ifconfig_IF_ipv6 has no inet6 keyword in front
  of an IPv6 address. (r225489)

- Use eval for ${ifconfig_args} to fix an issue fixed in r223506. (r225489)

Approved by: re (bz)

13 years agoAdd $ipv6_cpe_wanif to enable functionality required for IPv6 CPE
hrs [Tue, 13 Sep 2011 00:06:11 +0000 (00:06 +0000)]
Add $ipv6_cpe_wanif to enable functionality required for IPv6 CPE
(r225485).  When setting an interface name to it, the following
configurations will be enabled:

 1. "no_radr" is set to all IPv6 interfaces automatically.

 2. "-no_radr accept_rtadv" will be set only for $ipv6_cpe_wanif.  This is
    done just before evaluating $ifconfig_IF_ipv6 in the rc.d scripts (this
    means you can manually supersede this configuration if necessary).

 3. The node will add RA-sending routers to the default router list
    even if net.inet6.ip6.forwarding=1.

This mode is added to conform to RFC 6204 (a router which connects
the end-user network to a service provider network).  To enable
packet forwarding, you still need to set ipv6_gateway_enable=YES.

Note that accepting router entries into the default router list when
packet forwarding capability and a routing daemon are enabled can
result in messing up the routing table.  To minimize such unexpected
behaviors, "no_radr" is set on all interfaces but $ipv6_cpe_wanif.

Approved by: re (bz)

13 years ago- Add ":origin" label to the interface id for resolvconf(8). (r223149)
hrs [Mon, 12 Sep 2011 23:55:23 +0000 (23:55 +0000)]
- Add ":origin" label to the interface id for resolvconf(8). (r223149)
- Add -u option to enable adding :[RA-source-address] to the interface id.
  (r223149)
- s/INET6_ADDRSTRLEN/sizeof(ntopbuf)/  (r223149)
- Fix a bug that can prevent -D from being overridden by -d. (r223149)
- /-P pidfile/-p pidfile/ for consistency with rtadvd(8). (r223149)
- Fix -F flag handling to support receiving RAs even when ip6.forwarding=1.
  (r225150)

Approved by: re (kib)

13 years ago- Fix a bug that can lead to displaying an incorrect value. (r224210)
hrs [Mon, 12 Sep 2011 23:52:55 +0000 (23:52 +0000)]
- Fix a bug that can lead to displaying an incorrect value. (r224210)
- Fix an abnormal termination caused by twice of "rtadvctl disable". (r224303)
- Use poll() to wait for the control message socket instead of a spin loop.
  (r224304)
- s/cmsg_/cm_/ to avoid conflict with CMSG_* symbols for struct cmsghdr.
  (r224619)
- Ignore an interface that never sent RAs for graceful shut-down. (r224620)
- Refine log messages. (r225148)
- Fix SIGSEGV when receiving RAs that contain RDNSS and/or DNSSL options.
  (r225149)

Approved by: re (kib)

13 years agoAllow the ipfw.ko module built with a kernel to honor any IPFIREWALL_*
jhb [Mon, 12 Sep 2011 21:09:56 +0000 (21:09 +0000)]
Allow the ipfw.ko module built with a kernel to honor any IPFIREWALL_*
options defined in the kernel config.  This more closely matches the
behavior of other modules which inherit configuration settings from the
kernel configuration during a kernel + modules build.

Reviewed by: luigi
Approved by: re (kib)
MFC after: 1 week

13 years agoConnect the vxge(4) module to the i386/amd64 build.
brueffer [Mon, 12 Sep 2011 20:57:22 +0000 (20:57 +0000)]
Connect the vxge(4) module to the i386/amd64 build.

Catcher of stupid errors: kib
Approved by: re (kib)

13 years agodump_write() returns ENXIO if the dump is trying to be written outside
attilio [Mon, 12 Sep 2011 20:39:31 +0000 (20:39 +0000)]
dump_write() returns ENXIO if the dump is trying to be written outside
of the device boundry.
While this is generally ok, the problem is that all the consumers
handle similar cases (and expect to catch) ENOSPC for this (for a
reference look at minidumpsys() and dumpsys() constructions). That
ends up in consumers not recognizing the issue and amd64 failing to
retry if the number of pages grows up during minidump.
Fix this by returning ENOSPC in dump_write() and while here add some
more diagnostic on involved values.

Sponsored by: Sandvine Incorporated
In collabouration with: emaste
Approved by: re (kib)
MFC after: 10 days

13 years agoPartially revert 222753: If a CardBus card stores its CIS in a BAR, delete
jhb [Mon, 12 Sep 2011 15:21:52 +0000 (15:21 +0000)]
Partially revert 222753: If a CardBus card stores its CIS in a BAR, delete
the BAR after parsing the CIS.  This forces the resource range to be
reallocated if the BAR is reused by the device.

Submitted by: deischen
Reviewed by: imp
Approved by: re (kib)

13 years agoAdd missing lib32 parts for the previous changes:
pluknet [Mon, 12 Sep 2011 14:32:35 +0000 (14:32 +0000)]
Add missing lib32 parts for the previous changes:
removal of Objective-C support and libpkg; libsbuf version bump

Approved by: re (kib)