]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoAdd executable bit to docsinstall [old] and entropy [new] scripts.
dteske [Tue, 15 Oct 2013 02:07:29 +0000 (02:07 +0000)]
Add executable bit to docsinstall [old] and entropy [new] scripts.

Approved by: re (gjb)

10 years agoFix the Atheros MIPS startup path a little.
adrian [Tue, 15 Oct 2013 01:37:00 +0000 (01:37 +0000)]
Fix the Atheros MIPS startup path a little.

* Print out the platform frequency the same as the other frequencies.
* Print out the MDIO frequency.
* Optionally do GMAC and ethernet switch setup if required.

Tested:

* AR9344

10 years agoAdd new features - an MDIO clock, WMAC reset, GMAC reset and ethernet
adrian [Tue, 15 Oct 2013 01:35:48 +0000 (01:35 +0000)]
Add new features - an MDIO clock, WMAC reset, GMAC reset and ethernet
switch reset/initialise functions.

The AR934x and QC955x SoCs both have a configurable MDIO base clock.
The others have the MDIO clock use the same clock as the system
reference clock, whatever that may be.

Tested:

* AR9344 SoC

TODO:

* mips24k - AR933x would be fine for now, just to ensure that things
  are sane.

10 years agoAdd AR934x, AR8327 register definitions.
adrian [Tue, 15 Oct 2013 00:26:02 +0000 (00:26 +0000)]
Add AR934x, AR8327 register definitions.

Obtained from: Linux/OpenWRT

10 years agoAdd the rest of the AR934x SoC reset register definitions.
adrian [Mon, 14 Oct 2013 23:58:52 +0000 (23:58 +0000)]
Add the rest of the AR934x SoC reset register definitions.

Obtained from: Linux/OpenWRT

10 years agoAdd register definitions for the AR933x SoC GMAC (ie, ethernet MAC)
adrian [Mon, 14 Oct 2013 23:57:12 +0000 (23:57 +0000)]
Add register definitions for the AR933x SoC GMAC (ie, ethernet MAC)
control block.

The GMAC configuration block allows for some configuration of how
the GMAC0 (ie, arge0) port is connected to the on-board switch
(if indeed there is one.)  It both can be pushed into the on-board
switch; it could also be torn out and exposed via an external
MII (and that operational mode is also controllable.)

Obtained from: Linux/OpenWRT

10 years agocxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both
np [Mon, 14 Oct 2013 23:32:56 +0000 (23:32 +0000)]
cxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both
ingress and egress queues, and for both T4 and T5.  These values are
used by the T4/T5 iWARP driver.

10 years agoUpdate krping to the latest upstream code. Move all the FreeBSD
np [Mon, 14 Oct 2013 23:02:05 +0000 (23:02 +0000)]
Update krping to the latest upstream code.  Move all the FreeBSD
specific parts to krping_dev.c, which leaves the other files as
close to their upstream versions as possible.

10 years agoDelete all of the old RDMA code (except krping, which was switched to
np [Mon, 14 Oct 2013 22:39:08 +0000 (22:39 +0000)]
Delete all of the old RDMA code (except krping, which was switched to
use sys/ofed some time back).  This has been sitting around as dead code
in the tree for a very long time.

10 years agocxgbe(4): Update T4 and T5 firmwares to 1.9.12.0
np [Mon, 14 Oct 2013 21:25:07 +0000 (21:25 +0000)]
cxgbe(4): Update T4 and T5 firmwares to 1.9.12.0

10 years agoRename libbsdyml to libyaml, make private, and bump
bdrewery [Mon, 14 Oct 2013 18:31:15 +0000 (18:31 +0000)]
Rename libbsdyml to libyaml, make private, and bump
SHLIB_MAJOR to 1.0

Suggested by: des
Approved by: bapt
MFC after: 1 week

10 years agoMake di_blocks unsigned in UFS1 as is the case already for UFS2.
pfg [Mon, 14 Oct 2013 18:17:09 +0000 (18:17 +0000)]
Make di_blocks unsigned in UFS1 as is the case already for UFS2.

Most of the code between UFS1 and UFS2 is shared so this change
is pretty safe. Not only this makes UFS1 and 2 consistent but it
also matches what NetBSD and MacOS X have for some years now.

Reviewed by: mckusick
MFC after: 1 month

10 years agoAdd needed files to the KLD random.ko.
markm [Mon, 14 Oct 2013 17:43:22 +0000 (17:43 +0000)]
Add needed files to the KLD random.ko.

Approved by: re (kib)

10 years ago- Normalize jailname. "example.com" is converted to "example_com".
hrs [Mon, 14 Oct 2013 11:05:13 +0000 (11:05 +0000)]
- Normalize jailname.  "example.com" is converted to "example_com".
- Fix a bug that some $jail_{jname}_foo variables did not work.
- Fix a bug which prevented $jail_devfs_ruleset from working[1].
- Move $jail_parameters to the last of the configuraiton lines[1].

Reported by: Jase Thew[1]
Approved by: re (glebius)

10 years agoReduce disc1.iso image size by installing the userland with
gjb [Sun, 13 Oct 2013 15:49:50 +0000 (15:49 +0000)]
Reduce disc1.iso image size by installing the userland with
the WITHOUT_PROFILE=1 option set, trimming 56MB from the image.

Approved by: re (glebius)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoCentralize the detection logic for the Hyper-V hypervisor.
gibbs [Sun, 13 Oct 2013 02:41:30 +0000 (02:41 +0000)]
Centralize the detection logic for the Hyper-V hypervisor.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs, grehan
Approved by: re (gjb)

sys/sys/systm.h:
 * Add a new VM_GUEST type, VM_GUEST_HV (HyperV guest).

sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c:
sys/dev/hyperv/vmbus/hv_hv.c:
sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c:
 * Set vm_guest to VM_GUEST_HV and use that on other HyperV related
   devices instead of cloning the cpuid hypervisor check.
 * Cleanup the vmbus_identify function.

10 years agoAllow FreeBSD to be booted from CDROM media on XenServer 6.2 and
gibbs [Sun, 13 Oct 2013 02:34:20 +0000 (02:34 +0000)]
Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and
prior releases.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
Approved by: re (gjb)

sys/dev/xen/blkfront/blkfront.c:
On XenServer versions up to an including 6.2, paravirtualized
CDROM support is broken.  When running in an HVM domain,
ignore paravirtualized instances of CDROM media, and instead
rely on native drivers attaching to emulated hardware.  This
functions correctly on all currently known Xen based
platforms.

10 years agoThere is an issue (not seen in our testing) where "yarrow" and
markm [Sun, 13 Oct 2013 00:10:48 +0000 (00:10 +0000)]
There is an issue (not seen in our testing) where "yarrow" and
"dummy" switch priorities, and the users are left with no usable
/dev/random. The fix assigns priories to these and gives the users
what they want. The override tuneable has a stupid name (blame me!)
and this fixes it to be something that 'sysctl kern.random' emits
and is the right thing to set.

Approved by: re (gjb)
Approved by: secteam (cperciva)

10 years agoFix signed integer overflow detection in f_expand_number() of strings.subr.
dteske [Sat, 12 Oct 2013 19:52:27 +0000 (19:52 +0000)]
Fix signed integer overflow detection in f_expand_number() of strings.subr.

Approved by: re (glebius)

10 years agoImplement the virtio block 'get-ident' operation. This eliminates the
grehan [Sat, 12 Oct 2013 19:31:19 +0000 (19:31 +0000)]
Implement the virtio block 'get-ident' operation. This eliminates the
annoying verbose boot error of the form

   g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

The ident returned by bhyve is a text string 'BHYVE-XXXX-XXXX', where
the X's are the first bytes of the md5 hash of the backing filename.

Reviewed by: neel
Approved by: re (gjb)

10 years ago- Add mount.fdescfs parameter to jail(8). This is similar to
hrs [Sat, 12 Oct 2013 17:27:59 +0000 (17:27 +0000)]
- Add mount.fdescfs parameter to jail(8). This is similar to
  mount.devfs but mounts fdescfs.  The mount happens just after
  mount.devfs.

- rc.d/jail now displays whole error message from jail(8) when a jail
  fails to start.

Approved by: re (gjb)

10 years agoMerge from project branch. Uninteresting commits are trimmed.
markm [Sat, 12 Oct 2013 12:57:57 +0000 (12:57 +0000)]
Merge from project branch. Uninteresting commits are trimmed.

Refactor of /dev/random device. Main points include:

* Userland seeding is no longer used. This auto-seeds at boot time
on PC/Desktop setups; this may need some tweeking and intelligence
from those folks setting up embedded boxes, but the work is believed
to be minimal.

* An entropy cache is written to /entropy (even during installation)
and the kernel uses this at next boot.

* An entropy file written to /boot/entropy can be loaded by loader(8)

* Hardware sources such as rdrand are fed into Yarrow, and are no
longer available raw.

------------------------------------------------------------------------
r256240 | des | 2013-10-09 21:14:16 +0100 (Wed, 09 Oct 2013) | 4 lines

Add a RANDOM_RWFILE option and hide the entropy cache code behind it.
Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA.
Add the RANDOM_* options to LINT.

------------------------------------------------------------------------
r256239 | des | 2013-10-09 21:12:59 +0100 (Wed, 09 Oct 2013) | 2 lines

Define RANDOM_PURE_RNDTEST for rndtest(4).

------------------------------------------------------------------------
r256204 | des | 2013-10-09 18:51:38 +0100 (Wed, 09 Oct 2013) | 2 lines

staticize struct random_hardware_source

------------------------------------------------------------------------
r256203 | markm | 2013-10-09 18:50:36 +0100 (Wed, 09 Oct 2013) | 2 lines

Wrap some policy-rich code in 'if NOTYET' until we can thresh out
what it really needs to do.

------------------------------------------------------------------------
r256184 | des | 2013-10-09 10:13:12 +0100 (Wed, 09 Oct 2013) | 2 lines

Re-add /dev/urandom for compatibility purposes.

------------------------------------------------------------------------
r256182 | des | 2013-10-09 10:11:14 +0100 (Wed, 09 Oct 2013) | 3 lines

Add missing include guards and move the existing ones out of the
implementation namespace.

------------------------------------------------------------------------
r256168 | markm | 2013-10-08 23:14:07 +0100 (Tue, 08 Oct 2013) | 10 lines

Fix some just-noticed problems:

o Allow this to work with "nodevice random" by fixing where the
MALLOC pool is defined.

o Fix the explicit reseed code. This was correct as submitted, but
in the project branch doesn't need to set the "seeded" bit as this
is done correctly in the "unblock" function.

o Remove some debug ifdeffing.

o Adjust comments.

------------------------------------------------------------------------
r256159 | markm | 2013-10-08 19:48:11 +0100 (Tue, 08 Oct 2013) | 6 lines

Time to eat crow for me.

I replaced the sx_* locks that Arthur used with regular mutexes;
this turned out the be the wrong thing to do as the locks need to
be sleepable. Revert this folly.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (In original diff)

------------------------------------------------------------------------
r256138 | des | 2013-10-08 12:05:26 +0100 (Tue, 08 Oct 2013) | 10 lines

Add YARROW_RNG and FORTUNA_RNG to sys/conf/options.

Add a SYSINIT that forces a reseed during proc0 setup, which happens
fairly late in the boot process.

Add a RANDOM_DEBUG option which enables some debugging printf()s.

Add a new RANDOM_ATTACH entropy source which harvests entropy from the
get_cyclecount() delta across each call to a device attach method.

------------------------------------------------------------------------
r256135 | markm | 2013-10-08 07:54:52 +0100 (Tue, 08 Oct 2013) | 8 lines

Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use
EVENTHANDLER(mountroot) instead.

This means we can't count on /var being present, so something will
need to be done about harvesting /var/db/entropy/... .

Some policy now needs to be sorted out, and a pre-sync cache needs
to be written, but apart from that we are now ready to go.

Over to review.

------------------------------------------------------------------------
r256094 | markm | 2013-10-06 23:45:02 +0100 (Sun, 06 Oct 2013) | 8 lines

Snapshot.

Looking pretty good; this mostly works now. New code includes:

* Read cached entropy at startup, both from files and from loader(8)
preloaded entropy. Failures are soft, but announced. Untested.

* Use EVENTHANDLER to do above just before we go multiuser. Untested.

------------------------------------------------------------------------
r256088 | markm | 2013-10-06 14:01:42 +0100 (Sun, 06 Oct 2013) | 2 lines

Fix up the man page for random(4). This mainly removes no-longer-relevant
details about HW RNGs, reseeding explicitly and user-supplied
entropy.

------------------------------------------------------------------------
r256087 | markm | 2013-10-06 13:43:42 +0100 (Sun, 06 Oct 2013) | 6 lines

As userland writing to /dev/random is no more, remove the "better
than nothing" bootstrap mode.

Add SWI harvesting to the mix.

My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.

------------------------------------------------------------------------
r256086 | markm | 2013-10-06 13:40:32 +0100 (Sun, 06 Oct 2013) | 11 lines

Debug run. This now works, except that the "live" sources haven't
been tested. With all sources turned on, this unlocks itself in
a couple of seconds! That is no my box, and there is no guarantee
that this will be the case everywhere.

* Cut debug prints.

* Use the same locks/mutexes all the way through.

* Be a tad more conservative about entropy estimates.

------------------------------------------------------------------------
r256084 | markm | 2013-10-06 13:35:29 +0100 (Sun, 06 Oct 2013) | 5 lines

Don't use the "real" assembler mnemonics; older compilers may not
understand them (like when building CURRENT on 9.x).

# Submitted by: Konstantin Belousov <kostikbel@gmail.com>

------------------------------------------------------------------------
r256081 | markm | 2013-10-06 10:55:28 +0100 (Sun, 06 Oct 2013) | 12 lines

SNAPSHOT.

Simplify the malloc pools; We only need one for this device.

Simplify the harvest queue.

Marginally improve the entropy pool hashing, making it a bit faster
in the process.

Connect up the hardware "live" source harvesting. This is simplistic
for now, and will need to be made rate-adaptive.

All of the above passes a compile test but needs to be debugged.

------------------------------------------------------------------------
r256042 | markm | 2013-10-04 07:55:06 +0100 (Fri, 04 Oct 2013) | 25 lines

Snapshot. This passes the build test, but has not yet been finished or debugged.

Contains:

* Refactor the hardware RNG CPU instruction sources to feed into
the software mixer. This is unfinished. The actual harvesting needs
to be sorted out. Modified by me (see below).

* Remove 'frac' parameter from random_harvest(). This was never
used and adds extra code for no good reason.

* Remove device write entropy harvesting. This provided a weak
attack vector, was not very good at bootstrapping the device. To
follow will be a replacement explicit reseed knob.

* Separate out all the RANDOM_PURE sources into separate harvest
entities. This adds some secuity in the case where more than one
is present.

* Review all the code and fix anything obviously messy or inconsistent.
Address som review concerns while I'm here, like rename the pseudo-rng
to 'dummy'.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item)

------------------------------------------------------------------------
r255319 | markm | 2013-09-06 18:51:52 +0100 (Fri, 06 Sep 2013) | 4 lines

Yarrow wants entropy estimations to be conservative; the usual idea
is that if you are certain you have N bits of entropy, you declare
N/2.

------------------------------------------------------------------------
r255075 | markm | 2013-08-30 18:47:53 +0100 (Fri, 30 Aug 2013) | 4 lines

Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the
usual harvest queues. It was a nifty idea, but too heavyweight.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com>

------------------------------------------------------------------------
r255071 | markm | 2013-08-30 12:42:57 +0100 (Fri, 30 Aug 2013) | 4 lines

Separate out the Software RNG entropy harvesting queue and thread
into its own files.

# Submitted by:  Arthur Mesh <arthurmesh@gmail.com>

------------------------------------------------------------------------
r254934 | markm | 2013-08-26 20:07:03 +0100 (Mon, 26 Aug 2013) | 2 lines

Remove the short-lived namei experiment.

------------------------------------------------------------------------
r254928 | markm | 2013-08-26 19:35:21 +0100 (Mon, 26 Aug 2013) | 2 lines

Snapshot; Do some running repairs on entropy harvesting. More needs
to follow.

------------------------------------------------------------------------
r254927 | markm | 2013-08-26 19:29:51 +0100 (Mon, 26 Aug 2013) | 15 lines

Snapshot of current work;

1) Clean up namespace; only use "Yarrow" where it is Yarrow-specific
or close enough to the Yarrow algorithm. For the rest use a neutral
name.

2) Tidy up headers; put private stuff in private places. More could
be done here.

3) Streamline the hashing/encryption; no need for a 256-bit counter;
128 bits will last for long enough.

There are bits of debug code lying around; these will be removed
at a later stage.

------------------------------------------------------------------------
r254784 | markm | 2013-08-24 14:54:56 +0100 (Sat, 24 Aug 2013) | 39 lines

1) example (partially humorous random_adaptor, that I call "EXAMPLE")
 * It's not meant to be used in a real system, it's there to show how
   the basics of how to create interfaces for random_adaptors. Perhaps
   it should belong in a manual page

2) Move probe.c's functionality in to random_adaptors.c
 * rename random_ident_hardware() to random_adaptor_choose()

3) Introduce a new way to choose (or select) random_adaptors via tunable
"rngs_want" It's a list of comma separated names of adaptors, ordered
by preferences. I.e.:
rngs_want="yarrow,rdrand"

Such setting would cause yarrow to be preferred to rdrand. If neither of
them are available (or registered), then system will default to
something reasonable (currently yarrow). If yarrow is not present, then
we fall back to the adaptor that's first on the list of registered
adaptors.

4) Introduce a way where RNGs can play a role of entropy source. This is
mostly useful for HW rngs.

The way I envision this is that every HW RNG will use this
functionality by default. Functionality to disable this is also present.
I have an example of how to use this in random_adaptor_example.c (see
modload event, and init function)

5) fix kern.random.adaptors from
kern.random.adaptors: yarrowpanicblock
to
kern.random.adaptors: yarrow,panic,block

6) add kern.random.active_adaptor to indicate currently selected
adaptor:
root@freebsd04:~ # sysctl kern.random.active_adaptor
kern.random.active_adaptor: yarrow

# Submitted by: Arthur Mesh <arthurmesh@gmail.com>

Submitted by: Dag-Erling Smørgrav <des@FreeBSD.org>, Arthur Mesh <arthurmesh@gmail.com>
Reviewed by: des@FreeBSD.org
Approved by: re (delphij)
Approved by: secteam (des,delphij)

10 years agoFix the formatting for the danish keymap.
eadler [Sat, 12 Oct 2013 07:00:51 +0000 (07:00 +0000)]
Fix the formatting for the danish keymap.

Reported by: dteske
Approved by: re (glebius)

10 years agoRemove most of the ATF tools and the _atf user.
rpaulo [Sat, 12 Oct 2013 06:06:53 +0000 (06:06 +0000)]
Remove most of the ATF tools and the _atf user.

This is necessary because ATF is deprecated and it will be replaced by Kyua.

Submitted by: jmmv@netbsd.org
Reviewed by: Garrett Cooper
Approved by: re

10 years agoFix a lock-order reversal in the net driver by dropping the lock
grehan [Sat, 12 Oct 2013 00:32:34 +0000 (00:32 +0000)]
Fix a lock-order reversal in the net driver by dropping the lock
and holding a reference prior to calling further into the hyperv
stack.

Added missing FreeBSD idents.

Submitted by: Microsoft hyperv dev team
Approved by: re@ (gjb)

10 years agoFix vmbus channel memory leak where incorrect length parameter was
grehan [Fri, 11 Oct 2013 21:30:27 +0000 (21:30 +0000)]
Fix vmbus channel memory leak where incorrect length parameter was
being passed to contigfree().

Submitted by: Microsoft hyperv dev team
Approved by: re@ (glebius)

10 years agoRemove the dumpdev configuration dialog, merge it into the regular
dteske [Fri, 11 Oct 2013 21:23:44 +0000 (21:23 +0000)]
Remove the dumpdev configuration dialog, merge it into the regular
services configuration and enable it by default. Committed with
slight change to menu text for length and content.

Submitted by: Allan Jude <freebsd@allanjude.com>
Approved by: re (glebius)

10 years agoIncorporate PR bin/161547 to detect when an interface is wireless.
dteske [Fri, 11 Oct 2013 21:12:48 +0000 (21:12 +0000)]
Incorporate PR bin/161547 to detect when an interface is wireless.
Patch from PR modified slightly for whitespace and style.

PR: bin/161547
Submitted by: Warren Block <wblock@wonkity.com>
Reviewed by: Allan Jude <freebsd@allanjude.com>
Approved by: re (glebius)

10 years agoRewrite the keymap module to display an actual menu of selectable
dteske [Fri, 11 Oct 2013 20:52:42 +0000 (20:52 +0000)]
Rewrite the keymap module to display an actual menu of selectable
keymaps *and* provide a mechanism for testing the selection. With
this commit, bsdinstall is no longer dependent on kbdmap(1). The
keymap test menu was originally submitted by Warren Block but was
modified).

Submitted by: Warren Block <wblock@wonkity.com>
Reviewed by: Allan Jude <freebsd@allanjude.com>
Approved by: re (glebius)

10 years agoAdd zfsboot module as an option for automatic configuration. Default is
dteske [Fri, 11 Oct 2013 20:41:35 +0000 (20:41 +0000)]
Add zfsboot module as an option for automatic configuration. Default is
to run interactively but it can be scripted too (optinally completely
non-interactive). Currently supports GELI and all ZFS vdev types. Also
performs validation on selections/settings providing error messages if
necessary, explaining (in plain language) what the issue is. Currently
the auto partitioning of naked disks only supports GPT and MBR (VTOC8
pending for sparc64), so is only available for i386/amd64 install.

Submitted by: Allan Jude <freebsd@allanjude.com>, myself
Reviewed by: Allan Jude <freebsd@allanjude.com>
Approved by: re (glebius)

10 years agoIn sys/dev/bxe/bxe.c, print bus_addr_t values using %#jx, to fix several
dim [Fri, 11 Oct 2013 20:35:12 +0000 (20:35 +0000)]
In sys/dev/bxe/bxe.c, print bus_addr_t values using %#jx, to fix several
gcc warnings for PAE kernels.

Approved by: re (glebius)
Reviewed by: davidch, edavis

10 years agoAfter installation, dump 4096 bytes from /dev/random to /entropy in the
des [Fri, 11 Oct 2013 20:21:44 +0000 (20:21 +0000)]
After installation, dump 4096 bytes from /dev/random to /entropy in the
newly installed system.  This should greatly increase the amount of
entropy available when SSH host keys are generated during first boot.

Reviewed by:    markm, nathanw
Approved by: re (gjb)

10 years agoAdd new f_expand_number() (shadowing expand_number(3)).
dteske [Fri, 11 Oct 2013 20:12:30 +0000 (20:12 +0000)]
Add new f_expand_number() (shadowing expand_number(3)).

Approved by: re (glebius)

10 years agoRemove extraneous (but harmless) leading /.
des [Fri, 11 Oct 2013 20:11:24 +0000 (20:11 +0000)]
Remove extraneous (but harmless) leading /.

Noticed by:     Herbert J. Skuhra <hskuhra@eumx.net>
Approved by: re (gjb)

10 years agoStore descriptions for DEVICE_TYPE_DISK and fix static-defaults mapping.
dteske [Fri, 11 Oct 2013 20:10:41 +0000 (20:10 +0000)]
Store descriptions for DEVICE_TYPE_DISK and fix static-defaults mapping.
Add a default description for bhyve block disk device while we're here.

Approved by: re (glebius)

10 years agoRemove extraneous \n.
des [Fri, 11 Oct 2013 20:10:18 +0000 (20:10 +0000)]
Remove extraneous \n.

Noticed by:     Nikolai Lifanov <lifanov@mail.lifanov.com>

Approved by: re (gjb)

10 years agoAdd $VAR_ZFSINTERACTIVE (zfsInteractive) and new f_zfsinteractive() for
dteske [Fri, 11 Oct 2013 20:08:34 +0000 (20:08 +0000)]
Add $VAR_ZFSINTERACTIVE (zfsInteractive) and new f_zfsinteractive() for
determining when a script wants to be nonInteractive but selectively
wants ZFS operations to be *interactive* (this is analgous to already
existing $VAR_NETINTERACTIVE (netInteractive) and f_netinteractive()
used for the same purpose (script wants to be nonInteractive but wants
network operations to be *interactive*).

Approved by: re (glebius)

10 years agoFix a bug that would occur in application death when debugging was enabled
dteske [Fri, 11 Oct 2013 20:07:04 +0000 (20:07 +0000)]
Fix a bug that would occur in application death when debugging was enabled
if you ended up in f_dialog_*_constrain() (indirectly, of course) with a
purposefully-set NULL height, width, or rows parameter (because you didn't
care to have that attribute calculated). Fix typo in a comment while here.

Approved by: re (glebius)

10 years agoDocument XENHVM and xenpci are mutually inclusive.
gjb [Fri, 11 Oct 2013 19:40:28 +0000 (19:40 +0000)]
Document XENHVM and xenpci are mutually inclusive.

Submitted by:   gibbs
Approved by:    re (delphij)
Sponsored by:   The FreeBSD Foundation

10 years agoFix NetBSD release number
eadler [Fri, 11 Oct 2013 18:51:37 +0000 (18:51 +0000)]
Fix NetBSD release number

Submitted by: pluknet
Approved by: re (glebius)

10 years agoAdd keymap.subr for presenting custom keymap dialogs (with X11 support).
dteske [Fri, 11 Oct 2013 18:21:05 +0000 (18:21 +0000)]
Add keymap.subr for presenting custom keymap dialogs (with X11 support).

Approved by: re (glebius)

10 years agoAdd a USE_DIALOG global (analogous to USE_XDIALOG); useful for inserting
dteske [Fri, 11 Oct 2013 18:14:49 +0000 (18:14 +0000)]
Add a USE_DIALOG global (analogous to USE_XDIALOG); useful for inserting
text into a prompt or command syntax iff dialog(1) is in-use.

Approved by: re (glebius)

10 years agoFix a minor bug; if strings.subr was included by itself it may not have
dteske [Fri, 11 Oct 2013 17:54:22 +0000 (17:54 +0000)]
Fix a minor bug; if strings.subr was included by itself it may not have
access to f_dprintf from common.subr -- fix this by including common.subr.

Approved by: re (glebius)

10 years agoAdd support for obtaining the capacity of disks. Add comment while here.
dteske [Fri, 11 Oct 2013 17:52:43 +0000 (17:52 +0000)]
Add support for obtaining the capacity of disks. Add comment while here.

Approved by: re (glebius)

10 years agoFix mode page length calculation to remove last garbage line from the
mav [Fri, 11 Oct 2013 17:00:09 +0000 (17:00 +0000)]
Fix mode page length calculation to remove last garbage line from the
`camcontrol mode daX -l` output.

PR
Approved by: re (gjb)
MFC after: 2 weeks

10 years agoDo not provide a hint of the guest's OS version
bryanv [Fri, 11 Oct 2013 06:48:40 +0000 (06:48 +0000)]
Do not provide a hint of the guest's OS version

The calculation can overflow if __FreeBSD_version is big
enough, and it does not appear to be required.

Reported by: grehan
Approved by: re (gjb)

10 years agoAllow the legacy CDROM device to be accessed in a FreeBSD guest, while
grehan [Thu, 10 Oct 2013 22:46:49 +0000 (22:46 +0000)]
Allow the legacy CDROM device to be accessed in a FreeBSD guest, while
still using enlightened drivers for other block devices.

Submitted by: Microsoft hyperv dev team, mav@
Approved by: re@

10 years agoAdd dependency on ibcore now that it has been modularized.
np [Thu, 10 Oct 2013 22:38:35 +0000 (22:38 +0000)]
Add dependency on ibcore now that it has been modularized.

Approved by: re (gjb)

10 years agoFixed the media type shown via ifconfig.
edavis [Thu, 10 Oct 2013 21:10:51 +0000 (21:10 +0000)]
Fixed the media type shown via ifconfig.
Fixed a panic that occurs when bringing up an interface on 57710/57711
running very old bootcode versions.
Fixed how bool is defined for those who have been using this code on older
versions of FreeBSD.

Approved by:    re@ (gjb)
Approved by:    davidch (mentor)

10 years agoBump OS versions in the toolchain triples to 11.0, and bump the
dim [Thu, 10 Oct 2013 20:47:11 +0000 (20:47 +0000)]
Bump OS versions in the toolchain triples to 11.0, and bump the
__FreeBSD_cc_version predefined macros in clang and gcc.

Approved by: re (gjb)

10 years agoFix the "am I a net80211 vap" check for bpf listeners.
adrian [Thu, 10 Oct 2013 19:56:31 +0000 (19:56 +0000)]
Fix the "am I a net80211 vap" check for bpf listeners.

I changed it to use if_transmit a while ago but apparently with monitor
mode the if_transmit method is overridden.

This is (mostly) a workaround until a more permanent solution can be
found.

Submitted by: Patrick Kelsey <kelsey@ieee.org>
Approved by: re@ (gjb)

10 years agoSanitize the %eflags returned by BIOS routines. Some BIOS routines enter
jhb [Thu, 10 Oct 2013 19:51:38 +0000 (19:51 +0000)]
Sanitize the %eflags returned by BIOS routines.  Some BIOS routines enter
protected mode and may leave protected-mode-specific flags like PSL_NT set
when they return to real mode.  This can cause a fault when BTX re-enters
protected mode after the BIOS mode returns.

PR: amd64/182740
Reported by: Julian Pidancet <julian.pidancet@gmail.com>
Approved by: re (gjb)
MFC after: 1 week

10 years agoIn sys/arm/versatile/versatile_pci.c, add a default handler, to fix a
dim [Thu, 10 Oct 2013 19:40:01 +0000 (19:40 +0000)]
In sys/arm/versatile/versatile_pci.c, add a default handler, to fix a
gcc warning about uninitialized use of a variable.

Approved by: re (gjb)

10 years agoTurn it all the way up to 11:
gjb [Thu, 10 Oct 2013 18:05:13 +0000 (18:05 +0000)]
Turn it all the way up to 11:

- Update FreeBSD version in:
  - UPDATING
  - sys/conf/newvers.sh

- Add 11.0 FreeBSD version for manual pages

- Bump __FreeBSD_version to 1100000

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

10 years agoNew committer info.
edavis [Thu, 10 Oct 2013 17:41:41 +0000 (17:41 +0000)]
New committer info.

Approved by: re@ (gjb)
Approved by: davidch (mentor)

10 years agoUpdate head/ to ALPHA6 in preparation of branching to stable/10.
gjb [Thu, 10 Oct 2013 17:39:39 +0000 (17:39 +0000)]
Update head/ to ALPHA6 in preparation of branching to stable/10.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

10 years agoIn sys/dev/hyperv, fix a number of gcc warnings about usage of anonymous
dim [Thu, 10 Oct 2013 16:25:53 +0000 (16:25 +0000)]
In sys/dev/hyperv, fix a number of gcc warnings about usage of anonymous
union members in strict C99, by giving them names.  While here, add some
FreeBSD keywords where they were missing.

Approved by: re (gjb)
Reviewed by: grehan

10 years agoTidy up the output of "sysctl vm.phys_free".
alc [Thu, 10 Oct 2013 16:11:45 +0000 (16:11 +0000)]
Tidy up the output of "sysctl vm.phys_free".

Approved by: re (glebius)
Sponsored by: EMC / Isilon Storage Division

10 years agoIgnore attempts to set the nmbcluster sysctls to their current value
jhb [Thu, 10 Oct 2013 16:11:34 +0000 (16:11 +0000)]
Ignore attempts to set the nmbcluster sysctls to their current value
rather than failing with an error.

Reviewed by: andre
Approved by: re (delphij)
MFC after: 2 weeks

10 years agoFix for When more than one NIC is present.
alfred [Thu, 10 Oct 2013 14:03:03 +0000 (14:03 +0000)]
Fix for When more than one NIC is present.

The device name was incorrect due to a specific function we ported
from the Linux driver that is not FBSD compatible.  This resulted
with a false sysctl registration and some more problematic issues.

The patch basically revokes it all together.

Submitted by: Meny Yossefi (menyy mellanox.com)

Approved by: re

10 years agoRemove unimplemented options from iscsi.conf(5) manual page, mention
trasz [Thu, 10 Oct 2013 11:28:20 +0000 (11:28 +0000)]
Remove unimplemented options from iscsi.conf(5) manual page, mention
that it's being used by both initiators, and change the title to make
it more easily searchable.

Approved by: re (glebius)
Sponsored by: FreeBSD Foundation

10 years agoMFV r255257: 4082 zfs receive gets EFBIG from dmu_tx_hold_free()
avg [Thu, 10 Oct 2013 09:53:46 +0000 (09:53 +0000)]
MFV r255257: 4082 zfs receive gets EFBIG from dmu_tx_hold_free()

  illumos change 14172:be36a38bac3d:
  illumos ZFS issues:
    4082 zfs receive gets EFBIG from dmu_tx_hold_free()

Please note that this change is slightly different from r255257, because
it is merged out of order with other (larger) upstream changes.

PR: kern/182570
Reported by: Keith White <kwhite@site.uottawa.ca>
Tested by: Keith White <kwhite@site.uottawa.ca>
Approved by: re (glebius)
MFC after: 1 week
X-MFC after: r254753

10 years agoDo not try to detach if the interface does not support IPv6.
hrs [Thu, 10 Oct 2013 09:43:15 +0000 (09:43 +0000)]
Do not try to detach if the interface does not support IPv6.

Tested by: hselasky
PR: usb/182820
Approved by: re (glebius)

10 years ago- Update rc.d/jail to use a jail(8) configuration file instead of
hrs [Thu, 10 Oct 2013 09:32:27 +0000 (09:32 +0000)]
- Update rc.d/jail to use a jail(8) configuration file instead of
  command line options.  The "jail_<jname>_*" rc.conf(5) variables for
  per-jail configuration are automatically converted to
  /var/run/jail.<jname>.conf before the jail(8) utility is invoked.
  This is transparently backward compatible.

- Fix a minor bug in jail(8) which prevented it from returning false
  when jail -r failed.

Approved by: re (glebius)

10 years agoAdd support for "vnet jname" argument in ifconfig_IF. The vnet keyword
hrs [Thu, 10 Oct 2013 07:41:11 +0000 (07:41 +0000)]
Add support for "vnet jname" argument in ifconfig_IF.  The vnet keyword
is ignored except for "rc.d/netif vnet{up,down} ifn" because a jail is
usually created after interface initialization on boot time.

"rc.d/netif vnetup ifn" moves ifn into the specified jail.  It is
designed to be used in other scripts like rc.d/jail, not automatically
invoked during the interface initialization.

Approved by: re (kib)

10 years agoInitialize a variable in sys/contrib/ipfilter/netinet/ip_tftp_pxy.c, to
dim [Thu, 10 Oct 2013 07:23:11 +0000 (07:23 +0000)]
Initialize a variable in sys/contrib/ipfilter/netinet/ip_tftp_pxy.c, to
silence a gcc warning.

Approved by: re (rodrigc)
X-MFC-With: r255332

10 years agoConvert the dtrace(1) man page to mdoc and fix up some aspects of it that
markj [Thu, 10 Oct 2013 03:50:23 +0000 (03:50 +0000)]
Convert the dtrace(1) man page to mdoc and fix up some aspects of it that
don't make sense on FreeBSD. In particular,

- remove the ATTRIBUTES section,
- remove references to the Solaris Dynamic Tracing Guide, except in the
  SEE ALSO section,
- update the description of the -A option for FreeBSD's implementation,
- remove references to Solaris-specific programs and configuration files,
  and replace them with FreeBSD equivalents where possible.

The content has not changed aside from this.

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

10 years agoAllow a 4-byte write to PCI config space to overlap
grehan [Wed, 9 Oct 2013 23:53:21 +0000 (23:53 +0000)]
Allow a 4-byte write to PCI config space to overlap
the 2 read-only bytes at the start of a PCI capability.
This is the sequence that OpenBSD uses when enabling
MSI interrupts, and works fine on real h/w.

In bhyve, convert the 4 byte write to a 2-byte write to
the r/w area past the first 2 r/o bytes of a capability.

Reviewed by: neel
Approved by: re@ (blanket)

10 years agoAdd read/write bus barriers for MIPS.
adrian [Wed, 9 Oct 2013 22:10:03 +0000 (22:10 +0000)]
Add read/write bus barriers for MIPS.

Tested:

* AR9344 - mips74k SoC

Approved by: re@ (delphij)

10 years agoRemove hash generation from release.sh, as it is run as part of
gjb [Wed, 9 Oct 2013 22:00:03 +0000 (22:00 +0000)]
Remove hash generation from release.sh, as it is run as part of
the 'install' target in the release/Makefile.

MFC after: 3 days
Submitted by: jhb
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation

10 years agoUnbreak zfsloader with LOADER_TFTP_SUPPORT on
kan [Wed, 9 Oct 2013 21:33:19 +0000 (21:33 +0000)]
Unbreak zfsloader with LOADER_TFTP_SUPPORT on

Only accept 'net' and 'pxe' devices as underlying transport
in tftp.c on x86. Prior to this change tftp code would attempt
to send packets over any boot device, including zfs one with
predictably sad results.

Approved by: re (gjb)
MFC After: 1 month

10 years agoMFC - tracking commit.
markm [Wed, 9 Oct 2013 21:03:34 +0000 (21:03 +0000)]
MFC - tracking commit.

10 years agoHandle the cases where NULL is passed as cap_rightsp to the
pjd [Wed, 9 Oct 2013 20:58:50 +0000 (20:58 +0000)]
Handle the cases where NULL is passed as cap_rightsp to the
filestat_new_entry() function.

Reported by: Alex Kozlov <spam@rm-rf.kiev.ua>
Approved by: re (gjb)

10 years agoBy popular demand, move freebsd-version(1) from /libexec to /bin.
des [Wed, 9 Oct 2013 20:47:20 +0000 (20:47 +0000)]
By popular demand, move freebsd-version(1) from /libexec to /bin.

Approved by: re (gjb)

10 years agoAdd a RANDOM_RWFILE option and hide the entropy cache code behind it.
des [Wed, 9 Oct 2013 20:14:16 +0000 (20:14 +0000)]
Add a RANDOM_RWFILE option and hide the entropy cache code behind it.
Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA.
Add the RANDOM_* options to LINT.

10 years agoDefine RANDOM_PURE_RNDTEST for rndtest(4).
des [Wed, 9 Oct 2013 20:12:59 +0000 (20:12 +0000)]
Define RANDOM_PURE_RNDTEST for rndtest(4).

10 years agoProperly handle residual count in Data-In PDUs with S bit set.
trasz [Wed, 9 Oct 2013 20:09:58 +0000 (20:09 +0000)]
Properly handle residual count in Data-In PDUs with S bit set.

Approved by: re (gjb)
Sponsored by: FreeBSD Foundation

10 years agoFix missing .
joel [Wed, 9 Oct 2013 20:00:04 +0000 (20:00 +0000)]
Fix missing .

Approved by: re (blanket)

10 years agoExplicitly pass the full path to the input file to sed. This unbreaks
des [Wed, 9 Oct 2013 19:37:51 +0000 (19:37 +0000)]
Explicitly pass the full path to the input file to sed.  This unbreaks
the WITHOUT_BMAKE build.

Approved by: re (gjb)

10 years agoImprove logging around some of the isci(4) reset and recovery paths.
jimharris [Wed, 9 Oct 2013 19:37:41 +0000 (19:37 +0000)]
Improve logging around some of the isci(4) reset and recovery paths.

Sponsored by: Intel
Discussed with: scottl
Approved by: re (marius)
MFC after: 1 week

10 years agoBe extra paranoid with values obtained from the target.
trasz [Wed, 9 Oct 2013 19:30:13 +0000 (19:30 +0000)]
Be extra paranoid with values obtained from the target.

Approved by: re (glebius)
Sponsored by: FreeBSD Foundation

10 years agoFail connection upon receiving too large data segment.
trasz [Wed, 9 Oct 2013 19:28:56 +0000 (19:28 +0000)]
Fail connection upon receiving too large data segment.

Approved by: re (glebius)
Sponsored by: FreeBSD Foundation

10 years ago There are some high performance NICs that count statistics in hardware,
glebius [Wed, 9 Oct 2013 19:04:40 +0000 (19:04 +0000)]
  There are some high performance NICs that count statistics in hardware,
and there are ifnets, that do that via counter(9). Provide a flag that
would skip cache line trashing '+=' operation in ether_input().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Reviewed by: melifaro, adrian
Approved by: re (marius)

10 years agoThe device vnodes are often unlocked when bread() or bwrite() is
kib [Wed, 9 Oct 2013 18:45:01 +0000 (18:45 +0000)]
The device vnodes are often unlocked when bread() or bwrite() is
called.  This probably should be fixed eventually, but for now it is
not needed to try to flush such vnodes from the buffer allocation
context.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)

10 years agoDo not flush buffers when the v_object of the passed vnode does not
kib [Wed, 9 Oct 2013 18:43:29 +0000 (18:43 +0000)]
Do not flush buffers when the v_object of the passed vnode does not
really belong to it. Such vnodes, with the pointers to other vnodes
v_objects, are typically instantiated by the bypass filesystems.
Invalidating mappings of other vnode pages and the pages is wrong,
since reclamation of the upper vnode does not imply that lower vnode
is reclaimed too.

One of the consequences of the improper reclamation was destruction of
the wired mappings of the lower vnode pages, triggering miscellaneous
assertions in the VM system.

Reported by:    John Marshall <john.marshall@riverwillow.com.au>
Tested by:      John Marshall <john.marshall@riverwillow.com.au>, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)

10 years agoWhen growing the file descriptor table, new larger memory chunk is
kib [Wed, 9 Oct 2013 18:41:35 +0000 (18:41 +0000)]
When growing the file descriptor table, new larger memory chunk is
allocated, but the old table is kept around to handle the case of
threads still performing unlocked accesses to it.

Grow the table exponentially instead of increasing its size by
sizeof(long) * 8 chunks when overflowing. This mode significantly
reduces the total memory use for the processes consuming large numbers
of the file descriptors which open them one by one.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (marius)

10 years agoReduce code duplication, introduce the getmaxfd() helper to calculate
kib [Wed, 9 Oct 2013 18:39:44 +0000 (18:39 +0000)]
Reduce code duplication, introduce the getmaxfd() helper to calculate
the max filedescriptor index.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (marius)

10 years agoSigh. I can't even get a single #ifdef right. Who's got the hat?
markm [Wed, 9 Oct 2013 18:11:15 +0000 (18:11 +0000)]
Sigh. I can't even get a single #ifdef right. Who's got the hat?

10 years agostaticize struct random_hardware_source
des [Wed, 9 Oct 2013 17:51:38 +0000 (17:51 +0000)]
staticize struct random_hardware_source

10 years agoWrap some policy-rich code in 'if NOTYET' until we can thresh out what it really...
markm [Wed, 9 Oct 2013 17:50:36 +0000 (17:50 +0000)]
Wrap some policy-rich code in 'if NOTYET' until we can thresh out what it really needs to do.

10 years agoMFC - tracking commit
markm [Wed, 9 Oct 2013 17:41:47 +0000 (17:41 +0000)]
MFC - tracking commit

10 years agoRemove no longer useful debugging output and a stale comment.
trasz [Wed, 9 Oct 2013 17:34:45 +0000 (17:34 +0000)]
Remove no longer useful debugging output and a stale comment.

Approved by: re (gjb)
Sponsored by: FreeBSD Foundation

10 years agoUpdate the Intel igb driver to version 2.4.0
jfv [Wed, 9 Oct 2013 17:32:52 +0000 (17:32 +0000)]
Update the Intel igb driver to version 2.4.0
  - This version has support for the new Intel Avoton systems,
including 2.5Gb support, further it now has IPv6/TSO6 support as
well. Shared code has been updated where necessary as well. Thanks
to my new assistant Eric Joyner for doing the transmit path changes
to bring in the IPv6/TSO6 support. Thanks to Gleb for catching the
one bug and change needed in NETMAP.

Approved by: re

10 years agoInitialize a variable in sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c, to
dim [Wed, 9 Oct 2013 17:07:50 +0000 (17:07 +0000)]
Initialize a variable in sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c, to
silence a gcc warning.

Approved by: re (gjb)
X-MFC-With: r255332

10 years agoRevert r256095, r256120 (partial), r256121:
gjb [Wed, 9 Oct 2013 17:07:20 +0000 (17:07 +0000)]
Revert r256095, r256120 (partial), r256121:

r256095:
 - Add gnu/usr.bin/rcs back to the base system.

r256120:
 - Add WITHOUT_RCS back to src.conf.5.

r256121:
 - Remove UPDATING entry regarding gnu/usr.bin/rcs removal.

Requested by: many
Approved by: re (marius)
Discussed with: core

10 years agoMake the error handling more consistant. Shouldn't make any functional
trasz [Wed, 9 Oct 2013 17:06:03 +0000 (17:06 +0000)]
Make the error handling more consistant.  Shouldn't make any functional
difference.

Approved by: re (gjb)
Sponsored by: FreeBSD Foundation

10 years agoRemove redundant redeclarations of uart_s3c2410_class in
dim [Wed, 9 Oct 2013 17:05:02 +0000 (17:05 +0000)]
Remove redundant redeclarations of uart_s3c2410_class in
sys/arm/s3c2xx0/uart_bus_s3c2410.c and uart_cpu_s3c2410.c, to silence
two gcc warnings.

Approved by: re (gjb)
X-MFC-With: r252394

10 years agoTidy up, cache return value of a function, and add an assertion;
trasz [Wed, 9 Oct 2013 16:55:52 +0000 (16:55 +0000)]
Tidy up, cache return value of a function, and add an assertion;
shouldn't make any functional difference.

Approved by: re (gjb)
Sponsored by: FreeBSD Foundation

10 years agoPlug memory leak.
trasz [Wed, 9 Oct 2013 13:48:08 +0000 (13:48 +0000)]
Plug memory leak.

Coverity CID: 1087991
Approved by: re (gjb)
Sponsored by: FreeBSD Foundation

10 years agoFix memory overrun.
trasz [Wed, 9 Oct 2013 13:45:07 +0000 (13:45 +0000)]
Fix memory overrun.

Coverity CID: 1092478
Approved by: re (gjb)
Sponsored by: FreeBSD Foundation