]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoUse the default policy table of RFC 6724.
ume [Sat, 2 Feb 2013 18:08:09 +0000 (18:08 +0000)]
Use the default policy table of RFC 6724.

MFC after: 1 weeks

11 years agofix some fat-fingering in r246246
avg [Sat, 2 Feb 2013 14:19:50 +0000 (14:19 +0000)]
fix some fat-fingering in r246246

Submitted by: mjg
Pointyhat to: avg
MFC after: 5 days
X-MFC with: r246246

11 years agorevert accidentally committed unneeded changes from r246250
avg [Sat, 2 Feb 2013 12:52:43 +0000 (12:52 +0000)]
revert accidentally committed unneeded changes from r246250

MFC after: 7 days
X-MFC with: r246250

11 years agoacpi: clear power button status bit after waking up...
avg [Sat, 2 Feb 2013 12:44:19 +0000 (12:44 +0000)]
acpi: clear power button status bit after waking up...

so that it is not confused for a new power off request.

Learned from: Linux and ACPI specification
Tested by: gjb
MFC after: 12 days

11 years agoacpi: after wakeup from a state > S1 re-enable SCI_EN with a direct write
avg [Sat, 2 Feb 2013 12:42:07 +0000 (12:42 +0000)]
acpi: after wakeup from a state > S1 re-enable SCI_EN with a direct write

This hack is picked up from Linux, which claims that it follows
Windows behavior.

PR: amd64/174409
Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>,
KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>,
Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 13 days

11 years agocpususpend_handler: mark AP as resumed only after fully setting up lapic
avg [Sat, 2 Feb 2013 12:04:32 +0000 (12:04 +0000)]
cpususpend_handler: mark AP as resumed only after fully setting up lapic

Reviewed by: jhb
Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>,
KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
MFC after: 12 days

11 years agox86 suspend/resume: suspend pics and pseudo-pics in reverse order
avg [Sat, 2 Feb 2013 12:02:42 +0000 (12:02 +0000)]
x86 suspend/resume: suspend pics and pseudo-pics in reverse order

- change 'pics' from STAILQ to TAILQ
- ensure that Local APIC is always first in 'pics'

Reviewed by: jhb
Tested by: Sergey V. Dyatko <sergey.dyatko@gmail.com>,
KAHO Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
MFC after: 12 days

11 years agoprint compiler version in the kernel banner
avg [Sat, 2 Feb 2013 11:58:35 +0000 (11:58 +0000)]
print compiler version in the kernel banner

And provide kernel compiler version as a sysctl as well.
This is useful while we have gcc and clang cohabitation.
This could be even more useful when we have support
for external toolchains.

In cooperation with: mjg
MFC after: 13 days

11 years agong_ether: track interface renaming
avg [Sat, 2 Feb 2013 11:54:00 +0000 (11:54 +0000)]
ng_ether: track interface renaming

Also sanitize interface names that can potentially contain characters
that are prohibited in netgraph names.

PR: kern/154850 (sanitizing of names)
Discussed with: eri, melifaro
Submitted by: Nikolay Denev <ndenev@gmail.com> (sanitizing code)
Reviewed by: eri, glebius
MFC after: 17 days

11 years agosolaris compat: remove KM_ZERO
avg [Sat, 2 Feb 2013 11:41:05 +0000 (11:41 +0000)]
solaris compat: remove KM_ZERO

- there is no such flag in Solaris and derivatives
- the flag was added in an unrelated change
- the flag is not used

The proper way to allocate zeroed out memory is to use kmem_zalloc.

MFC after: 3 days

11 years agouart: add resume method and enable it for attachments on the most common
avg [Sat, 2 Feb 2013 11:38:26 +0000 (11:38 +0000)]
uart: add resume method and enable it for attachments on the most common
x86 buses

Otherwise the uart hardware could be in such a state after the resume
where IER is cleared and thus no interrupts are generated.

This behavior is observed and tested with QEMU, so I am comitting this
change to help with my debugging.
There has been no feedback from users of serial ports on real hardware.

MFC after: 20 days

11 years agozfs: add MODULE_VERSION for zfsctrl
avg [Sat, 2 Feb 2013 11:35:18 +0000 (11:35 +0000)]
zfs: add MODULE_VERSION for zfsctrl

This should allow the kernel linker to easily detect a situation
when the module is present both in a kernel and in a preloaded file
(zfs.ko).

Reviewed by: jhb
MFC after: 5 days

11 years agoFix an obvious typo that broke time specifications of the form
kientzle [Sat, 2 Feb 2013 06:06:39 +0000 (06:06 +0000)]
Fix an obvious typo that broke time specifications of the form
"2 hours ago".

11 years agoTweaks to standard BEAGLEBONE config, as recently discussed
kientzle [Sat, 2 Feb 2013 06:01:57 +0000 (06:01 +0000)]
Tweaks to standard BEAGLEBONE config, as recently discussed
on FreeBSD-ARM.

11 years agoAllow IEEE80211_SUPPORT_SUPERG to be defined _and_ have a working wlan
adrian [Sat, 2 Feb 2013 02:00:29 +0000 (02:00 +0000)]
Allow IEEE80211_SUPPORT_SUPERG to be defined _and_ have a working wlan
module.

11 years agoWrap this in an #ifdef so IEEE80211_SUPPORT_SUPERG will work correctly
adrian [Sat, 2 Feb 2013 02:00:10 +0000 (02:00 +0000)]
Wrap this in an #ifdef so IEEE80211_SUPPORT_SUPERG will work correctly
in a wlan.ko module.

11 years agoMerge bmake-20130123
sjg [Fri, 1 Feb 2013 22:55:27 +0000 (22:55 +0000)]
Merge bmake-20130123

Approved by: marcel (mentor)

11 years agoRemove support for plip from the GENERIC kernel as no systems in the
eadler [Fri, 1 Feb 2013 20:17:11 +0000 (20:17 +0000)]
Remove support for plip from the GENERIC kernel as no systems in the
last 10 years require this support.

Discussed with: db
Discussed with: kib
Reviewed by: imp
Reviewed by: jhb
Reviewed by: -hackers
Approved by: cperciva (mentor)

11 years agoDisplay MSI-X table and PBA offsets when displaying information about MSI-X
neel [Fri, 1 Feb 2013 19:24:16 +0000 (19:24 +0000)]
Display MSI-X table and PBA offsets when displaying information about MSI-X
capability.

Reviewed by: jhb, jimharris (initial version)

11 years agoThe MSDOSFSMNT_WAITONFAT flag is bogus and broken. It does less than
kib [Fri, 1 Feb 2013 18:30:41 +0000 (18:30 +0000)]
The MSDOSFSMNT_WAITONFAT flag is bogus and broken.  It does less than
track the MNT_SYNCHRONOUS flag.  It is set to the latter at mount time
but not updated by MNT_UPDATE.

Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously.

Submitted by: bde
MFC after: 1 week

11 years agoBackup FATs were sometimes marked dirty by copying their first block
kib [Fri, 1 Feb 2013 18:25:53 +0000 (18:25 +0000)]
Backup FATs were sometimes marked dirty by copying their first block
from the primary FAT, and then they were not marked clean on unmount.
Force marking them clean when appropriate.

Submitted by: bde
MFC after: 1 week

11 years agoThe directory entry for dotdot was corrupted in the FAT32 case when moving
kib [Fri, 1 Feb 2013 18:06:06 +0000 (18:06 +0000)]
The directory entry for dotdot was corrupted in the FAT32 case when moving
a directory to a subdir of the root directory from somewhere else.

For all directory moves that change the parent directory, the dotdot
entry must be fixed up.  For msdosfs, the root directory is magic for
non-FAT32.  It is less magic for FAT32, but needs the same magic for
the dotdot fixup.  It didn't have it.

Both chkdsk and fsck_msdosfs fix the corrupt directory entries with no
problems.

The fix is to use the same magic for dotdot in msdosfs_rename() as in
msdosfs_mkdir().

For msdosfs_mkdir(), document the magic. When writing the dotdot entry
in mkdir, use explicitly set pcl variable instead on relying on the
start cluster of the root directory typically has a value < 65536.

Submitted by: bde
MFC after: 1 week

11 years agoThe mountmsdosfs() function had an insane sanity test, remove it.
kib [Fri, 1 Feb 2013 18:01:03 +0000 (18:01 +0000)]
The mountmsdosfs() function had an insane sanity test, remove it.

Trying FAT32 on a small partition failed to mount because
pmp->pm_Sectors was nonzero.  Normally, FAT32 file systems are so
large that the 16-bit pm_Sectors can't hold the size.  This is
indicated by setting it to 0 and using only pm_HugeSectors.  But at
least old versions of newfs_msdos use the 16-bit field if possible,
and msdosfs supports this except for breaking its own support in the
sanity check.  This is quite different from the handling of pm_FATsecs
-- now the 16-bit value is always ignored for FAT32 except for
checking that it is 0, and newfs_msdos doesn't use the 16-bit value
for FAT32.

Submitted by: bde
MFC after: 1 week

11 years agoFix a backwards comment in markvoldirty().
kib [Fri, 1 Feb 2013 17:58:37 +0000 (17:58 +0000)]
Fix a backwards comment in markvoldirty().

Submitted by: bde
MFC after: 1 week

11 years agoAdd support for MSI-X interrupts in the virtio block device and make that
neel [Fri, 1 Feb 2013 16:58:59 +0000 (16:58 +0000)]
Add support for MSI-X interrupts in the virtio block device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "yes". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by: Gopakumar T
Obtained from: NetApp

11 years agoAssert that the mbuf in the chain has sane length. Proper place for
kib [Fri, 1 Feb 2013 16:57:02 +0000 (16:57 +0000)]
Assert that the mbuf in the chain has sane length.  Proper place for
this check is somewhere in the network code, but this assertion
already proven to be useful in catching what seems to be driver bugs
causing NFS scrambling random memory.

Discussed with: rmacklem
MFC after: 1 week

11 years agoThe change to reduce default smp_tsc_shift caused tsc shift to become
kib [Fri, 1 Feb 2013 16:48:55 +0000 (16:48 +0000)]
The change to reduce default smp_tsc_shift caused tsc shift to become
zero on slower machines, which make the fenced get_timecount methods
not used despite needed.  Remove the (shift > 0) condition when
selecting the get_timecount() implementation.

Rename smp_tsc_shift to tsc_shift, and apply it for the UP case too.
Allow shift to reach value of 31 instead of 30, as it was previously
(should be nop).

Reorganize the tc quality calculation to remove the conditionally
compiled block.  Rename test_smp_tsc() to test_tsc() and provide
separate versions for SMP and UP builds.  The check for virtialized
hardware is more natural to perform in the smp version of the
test_tsc(), since it is only done for smp case.

Noted and reviewed by: bde (previous version)
MFC after: 12 days

11 years agoAdd placeholder constants to reserve a portion of the socket option
jhb [Fri, 1 Feb 2013 15:32:20 +0000 (15:32 +0000)]
Add placeholder constants to reserve a portion of the socket option
name space for use by downstream vendors to add custom options.

MFC after: 2 weeks

11 years agoChange old-style function definition
charnier [Fri, 1 Feb 2013 14:26:54 +0000 (14:26 +0000)]
Change old-style function definition

11 years agouma_zone_set_max() directly returns the rounded effective zone
andre [Fri, 1 Feb 2013 14:21:09 +0000 (14:21 +0000)]
uma_zone_set_max() directly returns the rounded effective zone
limit.  Use the return value directly instead of doing a second
uma_zone_set_max() step.

MFC after: 1 week

11 years agoRemove unused VM_MAX_AUTOTUNE_NMBCLUSTERS define.
andre [Fri, 1 Feb 2013 14:16:37 +0000 (14:16 +0000)]
Remove unused VM_MAX_AUTOTUNE_NMBCLUSTERS define.

11 years ago- Fix more style(9)-related issues (copyright header, spaces after function
gahr [Fri, 1 Feb 2013 13:04:06 +0000 (13:04 +0000)]
- Fix more style(9)-related issues (copyright header, spaces after function
  names, unnecessary casts)
- Change type of boolean variable from char to bool

Suggested by: jhb, zont, jmallett
Reviewed by: cognet
Approved by: cognet

11 years agoGet time of next event from other cores only if SMP is already started.
gber [Fri, 1 Feb 2013 11:39:03 +0000 (11:39 +0000)]
Get time of next event from other cores only if SMP is already started.

Reviewed by: mav
Obtained from: Semihalf

11 years agoAdd VM_KMEM_SIZE_SCALE parameter set to 2 (50%) for all ARM platforms.
andre [Fri, 1 Feb 2013 10:26:31 +0000 (10:26 +0000)]
Add VM_KMEM_SIZE_SCALE parameter set to 2 (50%) for all ARM platforms.

VM_KMEM_SIZE_SCALE specifies which fraction of the available physical
memory, after deduction of the kernel itself and other early statically
allocated memory, can be used for the kmem_map.  The kmem_map provides
for all UMA/malloc allocations in KVM space.

Previously ARM was using a fixed kmem_map size of (12*1024*1024) = 12MB
without regard to effectively available memory.  This is too small for
recent ARM SoC with more than 128MB of RAM.

For reference a description of others related kmem_map parameters:

 VM_KMEM_SIZE default start size of kmem_map if SCALE is
not defined
 VM_KMEM_SIZE_MIN hard floor on the kmem_map size
 VM_KMEM_SIZE_MAX hard ceiling on the kmem_map size
 VM_KMEM_SIZE_SCALE fraction of the available real memory to
be used for the kmem_map, limited by the
MIN and MAX parameters.

Tested by: ian
MFC after: 1 week

11 years agoFix for hardware checksum offloading in SMSC driver.
hselasky [Fri, 1 Feb 2013 07:26:25 +0000 (07:26 +0000)]
Fix for hardware checksum offloading in SMSC driver.
This also fixes IPv6 support for this particular hardware.

Submitted by: Daisuke Aoyama

11 years agoInclude SMSC driver into default kernel build.
hselasky [Fri, 1 Feb 2013 07:19:19 +0000 (07:19 +0000)]
Include SMSC driver into default kernel build.

11 years agoMake use of USB ID sections configurable.
hselasky [Fri, 1 Feb 2013 07:05:43 +0000 (07:05 +0000)]
Make use of USB ID sections configurable.

11 years agoDelete the "blackhole" driver - it is not needed anymore.
neel [Fri, 1 Feb 2013 06:40:53 +0000 (06:40 +0000)]
Delete the "blackhole" driver - it is not needed anymore.

The "blackhole" driver was used in conjunction with bhyve to sequester
pci devices intended for passthru until vmm.ko was loaded. This was
useful at one point because vmm.ko could not be loaded at boot time.

The same functionality can now be achieved by loading vmm.ko via the
loader along with the kernel.

Discussed with: grehan
Obtained from: NetApp

11 years agoPrevent a null pointer dereference in pw userdel when deleting
deischen [Fri, 1 Feb 2013 05:19:49 +0000 (05:19 +0000)]
Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.

11 years agoFix a broken assumption in the passthru implementation that the MSI-X table
neel [Fri, 1 Feb 2013 03:49:09 +0000 (03:49 +0000)]
Fix a broken assumption in the passthru implementation that the MSI-X table
can only be located at the beginning or the end of the BAR.

If the MSI-table is located in the middle of a BAR then we will split the
BAR into two and create two mappings - one before the table and one after
the table - leaving a hole in place of the table so accesses to it can be
trapped and emulated.

Obtained from: NetApp

11 years agoFix a bug in the passthru implementation where it would assume that all
neel [Fri, 1 Feb 2013 02:41:47 +0000 (02:41 +0000)]
Fix a bug in the passthru implementation where it would assume that all
devices are MSI-X capable. This in turn would lead it to treat bar 0 as
the MSI-X table bar even if the underlying device did not support MSI-X.

Fix this by providing an API to query the MSI-X table index of the emulated
device. If the underlying device does not support MSI-X then this API will
return -1.

Obtained from: NetApp

11 years agoIncrease the number of passthru devices supported by bhyve.
neel [Fri, 1 Feb 2013 01:16:26 +0000 (01:16 +0000)]
Increase the number of passthru devices supported by bhyve.

The maximum length of an environment variable puts a limitation on the
number of passthru devices that can be specified via a single variable.
The workaround is to allow user to specify passthru devices via multiple
environment variables instead of a single one.

Obtained from: NetApp

11 years agoNow that MPSAFE flag is gone, we can arrange code a bit better.
pjd [Thu, 31 Jan 2013 22:20:05 +0000 (22:20 +0000)]
Now that MPSAFE flag is gone, we can arrange code a bit better.

11 years agoRemove leftover label after Giant removal from VFS.
pjd [Thu, 31 Jan 2013 22:15:41 +0000 (22:15 +0000)]
Remove leftover label after Giant removal from VFS.

11 years agoRemove label that was accidentally moved during Giant removal from VFS.
pjd [Thu, 31 Jan 2013 22:14:16 +0000 (22:14 +0000)]
Remove label that was accidentally moved during Giant removal from VFS.

11 years agoSimplify code a bit. This is leftover after Giant removal from VFS.
pjd [Thu, 31 Jan 2013 22:12:48 +0000 (22:12 +0000)]
Simplify code a bit. This is leftover after Giant removal from VFS.

11 years agosh: Prefer our character classification functions to <ctype.h>.
jilles [Thu, 31 Jan 2013 22:10:57 +0000 (22:10 +0000)]
sh: Prefer our character classification functions to <ctype.h>.

11 years agoUpdate hwpmc to support the Xeon class of Ivybridge processors.
sbruno [Thu, 31 Jan 2013 22:09:53 +0000 (22:09 +0000)]
Update hwpmc to support the Xeon class of Ivybridge processors.
case 0x3E:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

No support for uncore events at this time.

Submitted by: hiren panchasara <hiren.panchasara@gmail.com>
Reviewed by: davide, jimharris, sbruno
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agosh: Show negated commands (!) in jobs output.
jilles [Thu, 31 Jan 2013 21:50:44 +0000 (21:50 +0000)]
sh: Show negated commands (!) in jobs output.

11 years agoUse pmap_kextract() instead of inlining the page table walk.
kib [Thu, 31 Jan 2013 20:53:31 +0000 (20:53 +0000)]
Use pmap_kextract() instead of inlining the page table walk.
Remove the comment referencing non-existing code.

Reviewed by: cognet, ian (previous version)
Tested by: ian

11 years agoForce commit to mark MFC for r246153.
gjb [Thu, 31 Jan 2013 20:17:02 +0000 (20:17 +0000)]
Force commit to mark MFC for r246153.

MFC after: 2 days
X-MFC-With: r246153

11 years agoUpdate svn port directory in release(7).
gjb [Thu, 31 Jan 2013 20:15:43 +0000 (20:15 +0000)]
Update svn port directory in release(7).

Submitted by: Nikolai Lifanov

11 years agoTag bmake-20130123
sjg [Thu, 31 Jan 2013 16:47:34 +0000 (16:47 +0000)]
Tag bmake-20130123

Approved by: marcel (mentor)

11 years agoImport bmake-20130123
sjg [Thu, 31 Jan 2013 16:44:23 +0000 (16:44 +0000)]
Import bmake-20130123

Approved by: marcel (mentor)

11 years ago- Remove underscores from the internal structure name, as it doesn't collide
gahr [Thu, 31 Jan 2013 16:39:50 +0000 (16:39 +0000)]
- Remove underscores from the internal structure name, as it doesn't collide
  with the user's namespace.

- Correct size and position variables type from long to size_t.

- Do not set errno to ENOMEM on malloc failure, as malloc already does so.

- Implement the concept of "buffer data length", which mandates what SEEK_END
  refers to and the allowed extent for a read.

- Use NULL as read-callback if the buffer is opened in write-only mode.
  Conversely, use NULL as write-callback when opened in read-only mode.

- Implement the handling of the ``b'' character in the mode argument. A binary
  buffer differs from a text buffer (default mode if ``b'' is omitted) in that
  NULL bytes are never appended to writes and that the "buffer data length"
  equals to the size of the buffer.

- Remove shall from the man page. Use indicative instead. Also, specify that
  the ``b'' flag does not conform with POSIX but is supported by glibc.

- Update the regression test so that the ``b'' functionality and the "buffer
  data length" concepts are tested.

- Minor style(9) corrections.

Suggested by: jilles
Reviewed by: cognet
Approved by: cognet

11 years agoWhen in -U mode do avoid setting SUID bits, but do not modify the mode
brooks [Thu, 31 Jan 2013 16:04:40 +0000 (16:04 +0000)]
When in -U mode do avoid setting SUID bits, but do not modify the mode
variable so the intended mode can be logged correctly if -M is specified.

Sponsored by: DARPA, AFRL

11 years agoFormat CDB output as 2 digit hex correcting the length
smh [Thu, 31 Jan 2013 14:07:24 +0000 (14:07 +0000)]
Format CDB output as 2 digit hex correcting the length

Approved by: pjd (mentor)
MFC after: 1 week

11 years agoInitial version of libusbboot, a fully stand-alone, single threaded and
hselasky [Thu, 31 Jan 2013 11:00:57 +0000 (11:00 +0000)]
Initial version of libusbboot, a fully stand-alone, single threaded and
functional compilation of the FreeBSD USB stack for use with boot loaders
and such.

Discussed with: Hiroki Sato, hrs @ EuroBSDCon

11 years ago- Move AUTHORS and ACKNOWLEDGEMENTS to the end of the page.
glebius [Thu, 31 Jan 2013 10:29:22 +0000 (10:29 +0000)]
- Move AUTHORS and ACKNOWLEDGEMENTS to the end of the page.
- Add myself to list of authors.

11 years agoRetire struct sockaddr_inarp.
glebius [Thu, 31 Jan 2013 08:55:21 +0000 (08:55 +0000)]
Retire struct sockaddr_inarp.

Since ARP and routing are separated, "proxy only" entries
don't have any meaning, thus we don't need additional field
in sockaddr to pass SIN_PROXY flag.

New kernel is binary compatible with old tools, since sizes
of sockaddr_inarp and sockaddr_in match, and sa_family are
filled with same value.

The structure declaration is left for compatibility with
third party software, but in tree code no longer use it.

Reviewed by: ru, andre, net@

11 years agoWork around some rather unfortunate race conditions inside net80211.
adrian [Thu, 31 Jan 2013 00:14:25 +0000 (00:14 +0000)]
Work around some rather unfortunate race conditions inside net80211.

Right now, ic_curchan seems to be updated rather quickly (ie, during
the ioctl) and before the driver gets notified of what's going on.
So what I was seeing was:

* NIC was in channel X;
* It generates PHY errors for channel X;
* an ioctl comes along from userland and changes things to channel Y;
* .. this updates ic_curchan, but hasn't yet reset the hardware;
* in parallel, RX is occuring and it looks at ic_curchan;
* .. which is channel Y, so events get stamped with that now.

Sigh.

11 years agoMark tftp_log() as __printflike() (which would have caught the bug
marius [Thu, 31 Jan 2013 00:02:36 +0000 (00:02 +0000)]
Mark tftp_log() as __printflike() (which would have caught the bug
fixed in r246106) and deal with the fallout.

MFC after: 2 weeks

11 years agoDo metadata relocation fixup on all loaded modules, not just the kernel.
ian [Wed, 30 Jan 2013 23:49:36 +0000 (23:49 +0000)]
Do metadata relocation fixup on all loaded modules, not just the kernel.

Approved by: cognet (mentor)

11 years agoImprove devd startup time, by tweaking some string handling routines that are
ian [Wed, 30 Jan 2013 23:37:35 +0000 (23:37 +0000)]
Improve devd startup time, by tweaking some string handling routines that are
heavily used when parsing config files.  Mostly these changes avoid making
temporary copies of the strings, and avoid doing byte at a time append
operations, on the most-used code path.

On a 1.2 GHz ARM processor this reduces the time to parse the config files
from 13 to 6 seconds.

Reviewed by: imp
Approved by: cognet (mentor)

11 years agoFix a problem introduced in r231057: in bsd.own.mk, move the test for
dim [Wed, 30 Jan 2013 19:51:16 +0000 (19:51 +0000)]
Fix a problem introduced in r231057: in bsd.own.mk, move the test for
whether clang is enabled to just after the last place where it could
have been forced to "no".

MFC after: 3 days

11 years agoUtilize m_get2() to get mbuf of appropriate size.
glebius [Wed, 30 Jan 2013 18:40:19 +0000 (18:40 +0000)]
Utilize m_get2() to get mbuf of appropriate size.

11 years agoAllow the address and ports to be separated by a colon or period rather
jhb [Wed, 30 Jan 2013 18:24:29 +0000 (18:24 +0000)]
Allow the address and ports to be separated by a colon or period rather
than a space to permit directly pasting the output of commands such as
netstat and sockstat on the command line.

Reviewed by: net
MFC after: 1 week

11 years agoUse DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_met...
sbz [Wed, 30 Jan 2013 18:01:20 +0000 (18:01 +0000)]
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays

Reviewed by: cognet
Approved by: cognet

11 years agoWhen adding the directory ownership to the METALOG do it by name rather
brooks [Wed, 30 Jan 2013 17:39:43 +0000 (17:39 +0000)]
When adding the directory ownership to the METALOG do it by name rather
than number as is done in install so as to differ binding of names to
ids.

Remove the -W flag from the mtree command so that the correct user and
group is recorded rather than the default.

11 years agoDo not unnecessarily split a string literal, because
hselasky [Wed, 30 Jan 2013 16:08:05 +0000 (16:08 +0000)]
Do not unnecessarily split a string literal, because
splitting it makes it hard to grep.

Submitted by: Christoph Mallon

11 years agoUse string literals in string descriptors for marginally
hselasky [Wed, 30 Jan 2013 16:05:54 +0000 (16:05 +0000)]
Use string literals in string descriptors for marginally
better readability.

Submitted by: Christoph Mallon

11 years agoUse an anonymous struct for generated string descriptors.
hselasky [Wed, 30 Jan 2013 15:49:37 +0000 (15:49 +0000)]
Use an anonymous struct for generated string descriptors.

Submitted by: Christoph Mallon

11 years agoProvide one global language string descriptor for
hselasky [Wed, 30 Jan 2013 15:46:26 +0000 (15:46 +0000)]
Provide one global language string descriptor for
american english instead of giving each module its
own.

Submitted by: Christoph Mallon

11 years agoModify the FreeBSD USB kernel code so that it can be compiled directly
hselasky [Wed, 30 Jan 2013 15:26:04 +0000 (15:26 +0000)]
Modify the FreeBSD USB kernel code so that it can be compiled directly
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems
or embedded platforms. This is also useful for out of the system compilation
of the FreeBSD USB stack for various purposes. The USB kernel files can
now optionally include a global header file which should include all needed
definitions required to compile the FreeBSD USB stack. When the global USB
header file is included, no other USB header files will be included by
default.

Add new file containing the USB stack configuration for the
FreeBSD loader build.

Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all
USB files follow the same style.

Use cases:
 - console in loader via USB
 - loading kernel via USB

Discussed with: Hiroki Sato, hrs @ EuroBSDCon

11 years agoFix a descriptor leak in devd. Clients reading /var/run/devd.pipe can close
ian [Wed, 30 Jan 2013 15:21:18 +0000 (15:21 +0000)]
Fix a descriptor leak in devd.  Clients reading /var/run/devd.pipe can close
their socket connection any time, and devd only notices that when it gets an
error trying to write an event to the client.  On a system with no device
change activity, clients could connect and disappear repeatedly without devd
noticing, leading to an ever-growing list of open socket descriptors in devd.

Now devd uses poll(2) looking for POLLHUP on all existing clients every time
a new client connection is established, and also periodically (once a minute)
to proactively find zombie clients and reap the socket descriptors.  It also
now has a connection limit, configurable with a new -l <num> command line arg.
When the maximum number of connections is reached it stops accepting new
connections until some current clients drop off.

Reviewed by: imp
Approved by: cognet (mentor)

11 years agoAdd fmemopen(3), an interface to get a FILE * from a buffer in memory, along
gahr [Wed, 30 Jan 2013 14:59:26 +0000 (14:59 +0000)]
Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along
with the respective regression test.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html

Reviewed by: cognet
Approved by: cognet

11 years agoRework the handling of the children for the pthread_vfork_test. The
kib [Wed, 30 Jan 2013 13:14:34 +0000 (13:14 +0000)]
Rework the handling of the children for the pthread_vfork_test.  The
trivial handler for SIGCHLD is installed, and SIGCHLD is blocked, to
not abandon our zombies to init(8). This way, the zombies are around
slightly longer, allowing to actually exercise the logic for p_pwait
use by the test.

MFC after: 1 week

11 years agoThe case of pid == WAIT_MYPGRP for the kern_wait() is already handled
kib [Wed, 30 Jan 2013 13:14:15 +0000 (13:14 +0000)]
The case of pid == WAIT_MYPGRP for the kern_wait() is already handled
in kern_wait6(), which is called by kern_wait().  Remove the redundand
check, introduced in r243136, and add a comment noting this, to make
the code less confusing.

The blank lines are added to properly delineate the scope of the
preceeding comments.

Noted by: "Jukka A. Ukkonen" <jau@iki.fi>
MFC after: 1 week

11 years agoRework the __vdso_* symbols attributes to only make the symbols weak,
kib [Wed, 30 Jan 2013 12:48:16 +0000 (12:48 +0000)]
Rework the __vdso_* symbols attributes to only make the symbols weak,
but use normal references instead of weak.  This makes the statically
linked binaries to use fast gettimeofday(2) by forcing the linker to
resolve references and providing the neccessary functions.

Reported by: bde
Tested by: marius (sparc64)
MFC after: 2 weeks

11 years agoReduce default shift used to calculate the max frequency for the TSC
kib [Wed, 30 Jan 2013 12:43:10 +0000 (12:43 +0000)]
Reduce default shift used to calculate the max frequency for the TSC
timecounter to 1, and correspondingly increase the precision of the
gettimeofday(2) and related functions in the default configuration.

The motivation for the TSC-low timecounter, as described in the
r222866, seems to provide a workaround for the non-serializing
behaviour of the RDTSC on some Intel hardware.  Tests demonstrate that
even with the pre-shift of 8, the cross-core non-monotonicity of the
RDTSC is still observed reliably, e.g. on the Nehalems.  The r238755
and r238973 implemented the proper fix for the issue.

The pre-shift of 1 is applied to keep TSC not overflowing for the
frequency of hardclock down to 2 sec/intr.  The pre-shift is made a
tunable to allow the easy debugging of the issues users could see with
the shift being too low.

Reviewed by: bde
MFC after: 2 weeks

11 years agoAdd missing header file inclusion guard.
hselasky [Wed, 30 Jan 2013 10:59:42 +0000 (10:59 +0000)]
Add missing header file inclusion guard.

11 years ago- Fix typo
gabor [Wed, 30 Jan 2013 10:23:38 +0000 (10:23 +0000)]
- Fix typo

Submitted by: jkim

11 years agoAdd missing NULL pointer check.
hselasky [Wed, 30 Jan 2013 07:48:43 +0000 (07:48 +0000)]
Add missing NULL pointer check.

Reported by: Lars Engels
MFC after: 1 week

11 years agoAdd support for MSI-X interrupts in the virtio network device and make that
neel [Wed, 30 Jan 2013 04:30:36 +0000 (04:30 +0000)]
Add support for MSI-X interrupts in the virtio network device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "true". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by: Gopakumar T
Obtained from: NetApp

11 years agoAdd emulation support for instruction "88/r: mov r/m8, r8".
neel [Wed, 30 Jan 2013 04:09:09 +0000 (04:09 +0000)]
Add emulation support for instruction "88/r: mov r/m8, r8".

This instruction moves a byte from a register to a memory location.

Tested by: tycho nightingale at pluribusnetworks com

11 years agoRemove extra %s from debug statement that ends up crashing tftpd if
sbruno [Wed, 30 Jan 2013 01:36:04 +0000 (01:36 +0000)]
Remove extra %s from debug statement that ends up crashing tftpd if
debug is set very high (like -d15 in my case).

Obtained from: Yahoo! Inc
MFC after:      2 weeks

11 years agoLog the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
brooks [Tue, 29 Jan 2013 22:17:58 +0000 (22:17 +0000)]
Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.

Make cat a bootstrap tool to facilitate this.

11 years agoFix installworld when nmtree is not on the host by only adding it to
brooks [Tue, 29 Jan 2013 21:48:10 +0000 (21:48 +0000)]
Fix installworld when nmtree is not on the host by only adding it to
ITOOLS when we will be using the host copy.

Fix installkernel when -DNO_ROOT is set.

11 years agoroute_output() always supplies info with RTAX_GATEWAY member that
glebius [Tue, 29 Jan 2013 21:44:22 +0000 (21:44 +0000)]
route_output() always supplies info with RTAX_GATEWAY member that
points to a sockaddr of AF_LINK family. Assert this instead of
checking.

11 years agoRemove unused file.
glebius [Tue, 29 Jan 2013 21:37:56 +0000 (21:37 +0000)]
Remove unused file.

11 years agoProvide a statistic to track the number of drops in each of the port's
np [Tue, 29 Jan 2013 20:59:22 +0000 (20:59 +0000)]
Provide a statistic to track the number of drops in each of the port's
txq's buf_ring.  The aggregate for all the queues of a port is already
provided in ifnet->if_snd.ifq_drops.

MFC after: 3 days.

11 years agoFix installworld when the host does not need to bootstrap nmtree.
brooks [Tue, 29 Jan 2013 20:28:11 +0000 (20:28 +0000)]
Fix installworld when the host does not need to bootstrap nmtree.

Reported by: lev, jmg

11 years ago - Refresh code with latest OpenBSD revisions.
delphij [Tue, 29 Jan 2013 20:05:16 +0000 (20:05 +0000)]
 - Refresh code with latest OpenBSD revisions.
 - Remove $DragonFly$ tags as they are using git nowadays and VCS tags will
   not help merging.
 - Other changes to Copyright headers to make them consistent with other
   source code, we intend to fork from this point.

Reviewed by: pfg

11 years agoFix date.
joel [Tue, 29 Jan 2013 20:01:47 +0000 (20:01 +0000)]
Fix date.

11 years agoFix typo in debug printf.
glebius [Tue, 29 Jan 2013 19:06:16 +0000 (19:06 +0000)]
Fix typo in debug printf.

11 years agoReduce duplication between i386/linux/linux.h and amd64/linux32/linux.h
jhb [Tue, 29 Jan 2013 18:41:30 +0000 (18:41 +0000)]
Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h
by moving bits that are MI out into headers in compat/linux.

Reviewed by: Chagin Dmitry  dmitry | gmail
MFC after: 2 weeks

11 years agoBump __FreeBSD_version for cat -l (soon to be a bootstrap tool).
brooks [Tue, 29 Jan 2013 18:22:38 +0000 (18:22 +0000)]
Bump __FreeBSD_version for cat -l (soon to be a bootstrap tool).

11 years agoAdd -l option to cat(1). This option causes cat(1) to use fcntl(2) to
brooks [Tue, 29 Jan 2013 18:19:40 +0000 (18:19 +0000)]
Add -l option to cat(1). This option causes cat(1) to use fcntl(2) to
set an exclusive advisory lock on stdout.  This will be used to guarantee
orderly writing to METALOG.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD (mason)

11 years ago- Regen
gabor [Tue, 29 Jan 2013 17:05:21 +0000 (17:05 +0000)]
- Regen

11 years ago- Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
gabor [Tue, 29 Jan 2013 17:03:18 +0000 (17:03 +0000)]
- Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
  DragonflyBSD and install it as bsdpatch.  WITH_BSD_PATCH makes it
  default and installs GNU patch as gnupatch.

Submitted by: pfg
Obtained from: The DragonflyBSD Project