]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoRevert r237842 and switch back to SCHED_ULE. All problems I encountered
marius [Sun, 16 Dec 2012 20:54:07 +0000 (20:54 +0000)]
Revert r237842 and switch back to SCHED_ULE. All problems I encountered
with the latter have been fixed with r241780.

MFC after: 3 days

11 years agoRestore pre-r234898 printing of boot loader and path.
marius [Sun, 16 Dec 2012 20:43:29 +0000 (20:43 +0000)]
Restore pre-r234898 printing of boot loader and path.

MFC after: 3 days

11 years agoMove expand_name() after process lock is released.
pjd [Sun, 16 Dec 2012 14:53:27 +0000 (14:53 +0000)]
Move expand_name() after process lock is released.

This fixed panic where we hold mutex (process lock) and try to obtain sleepable
lock (vnode lock in expand_name()). The panic could occur when %I was used
in kern.corefile.

Additionally we avoid expand_name() overhead when coredumps are disabled.

Obtained from: WHEEL Systems

11 years agoWhen growing a filesystem, don't leave unused space at the end
trasz [Sun, 16 Dec 2012 14:37:25 +0000 (14:37 +0000)]
When growing a filesystem, don't leave unused space at the end
if there is not enough room for a full cylinder group.

Reviewed by: mckusick@

11 years agoDon't add audit record when coredumps are disabled or name cannot be expanded.
pjd [Sun, 16 Dec 2012 14:24:59 +0000 (14:24 +0000)]
Don't add audit record when coredumps are disabled or name cannot be expanded.

Discussed with: rwatson
Obtained from: WHEEL Systems

11 years agoMake the check easier to read.
pjd [Sun, 16 Dec 2012 14:14:18 +0000 (14:14 +0000)]
Make the check easier to read.

Obtained from: WHEEL Systems

11 years agoUse 'cred' variable.
pjd [Sun, 16 Dec 2012 13:56:38 +0000 (13:56 +0000)]
Use 'cred' variable.

Obtained from: WHEEL Systems

11 years agoFix comment to represent actual file purpose
gonzo [Sun, 16 Dec 2012 00:20:16 +0000 (00:20 +0000)]
Fix comment to represent actual file purpose

Spotted by: gavin@

11 years agosbuf_trim() cannot be used on sbuf with drain function set.
pjd [Sat, 15 Dec 2012 22:26:16 +0000 (22:26 +0000)]
sbuf_trim() cannot be used on sbuf with drain function set.
This fixes panic when listing sysctls on INVARIANTS-enabled kernel while
having wbwd loaded.

This panic was not fatal, at worst one additional space was printed.

Also sbuf_trim() makes some sense even if drain function is set. The drain
function is called only when buffer is to be expanded. So we could still trim
existing buffer before drain is called. In this case it worked just fine - the
trailing space was correctly trimmed.

Obtained from: WHEEL Systems
MFC after: 1 week

11 years agoIgnore a warning in ubldr where clang doesn't understand the %D printf
andrew [Sat, 15 Dec 2012 21:47:05 +0000 (21:47 +0000)]
Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.

11 years agoAlso remove -Werror on arm with clang as there are warnings.
andrew [Sat, 15 Dec 2012 21:33:12 +0000 (21:33 +0000)]
Also remove -Werror on arm with clang as there are warnings.

11 years agoDon't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
andrew [Sat, 15 Dec 2012 21:24:31 +0000 (21:24 +0000)]
Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm when
built with clang. When these are defined the lists are defined similar to:

asm(".section .ctors");
STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) };
asm(".section .dtors");
STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };

The problem is clang will move the two arrays out of the .ctors and .dtors
sections causing these sections to contain a single null address. By not
defining these macros we use the version of the code that places the arrays
is their sections by using __attribute__((section(".ctors"))) and similar
for .dtors.

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoRecognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
andrew [Sat, 15 Dec 2012 21:12:13 +0000 (21:12 +0000)]
Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generates
these even when building soft floating-point code

Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>

11 years agoFix a comment in an asm block to work with compilers other than GCC
andrew [Sat, 15 Dec 2012 21:06:14 +0000 (21:06 +0000)]
Fix a comment in an asm block to work with compilers other than GCC

11 years agoIn additional to the tailq of IPv6 addresses add the hash table.
ae [Sat, 15 Dec 2012 20:04:24 +0000 (20:04 +0000)]
In additional to the tailq of IPv6 addresses add the hash table.
For now use 256 buckets and fnv_hash function. Use xor'ed 32-bit
s6_addr32 parts of in6_addr structure as a hash key. Update
in6_localip and in6_is_addr_deprecated to use hash table for fastest
lookup.

Sponsored by: Yandex LLC
Discussed with: dwmalone, glebius, bz

11 years agoChange `iostat -Ix` to display total duration of transactions instead
trociny [Sat, 15 Dec 2012 18:21:09 +0000 (18:21 +0000)]
Change `iostat -Ix` to display total duration of transactions instead
of average duration, and total busy time instead of %.

This looks more useful when one runs `iostat -Ix` periodically to
collect statistics: e.g. now it is possible to calculate busy %
between two runs subtracting total busy times and dividing per time
period.

Average duration and % busy are still available via `iostat -x`.

11 years agoNew devstat metrics for devstat_compute_statistics():
trociny [Sat, 15 Dec 2012 18:19:48 +0000 (18:19 +0000)]
New devstat metrics for devstat_compute_statistics():

  DSM_TOTAL_DURATION
  DSM_TOTAL_DURATION_READ
  DSM_TOTAL_DURATION_WRITE
  DSM_TOTAL_DURATION_FREE
  DSM_TOTAL_DURATION_OTHER
  DSM_TOTAL_BUSY_TIME

11 years agoUpdate to the new and brighter pkg world
phk [Sat, 15 Dec 2012 17:54:29 +0000 (17:54 +0000)]
Update to the new and brighter pkg world

11 years agoIn pfioctl, if the permission checks failed we returned with vnet context
trociny [Sat, 15 Dec 2012 17:19:36 +0000 (17:19 +0000)]
In pfioctl, if the permission checks failed we returned with vnet context
set.

As the checks don't require vnet context, this is fixed by setting
vnet after the checks.

PR: kern/160541
Submitted by: Nikos Vassiliadis (slightly different approach)

11 years agoFour .c files from OpenBSM are used, in modified form, by the kernel to
rwatson [Sat, 15 Dec 2012 15:21:09 +0000 (15:21 +0000)]
Four .c files from OpenBSM are used, in modified form, by the kernel to
implement the BSM audit trail format.  Rename the kernel versions of the
files to match the userspace filenames so that it's easier to work out
what they correspond to, and therefore ensure they are kept in-sync.

Obtained from: TrustedBSD Project

11 years agoMerge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
rwatson [Sat, 15 Dec 2012 14:59:00 +0000 (14:59 +0000)]
Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this version
included various upstreamed patches from the FreeBSD base to make OpenBSM
compile more easily with bmake, higher warning levels, clang, and several
other loose ends.

Obtained from: TrustedBSD Project

11 years agoRegenerate usb.conf
hselasky [Sat, 15 Dec 2012 10:56:16 +0000 (10:56 +0000)]
Regenerate usb.conf

MFC after: 1 week

11 years agoMFV r244245:
mm [Sat, 15 Dec 2012 10:02:11 +0000 (10:02 +0000)]
MFV r244245:

Merge two zdb bugfixes from vendor (illumos)

illumos-gate 13894:f4af77f6bbd2
3397 zdb <pool> <objnum> output is too verbose
3398 zdb can't dump feature flags zap objects

References:
https://www.illumos.org/issues/3397
https://www.illumos.org/issues/3398

MFC after: 1 week

11 years agoFix extending filesystems of weird size by making sure the actual size
trasz [Sat, 15 Dec 2012 08:53:58 +0000 (08:53 +0000)]
Fix extending filesystems of weird size by making sure the actual size
is always multiple of fragment size.

11 years agoWhen mnt_vnode_next_active iterator cannot lock the next vnode and
kib [Sat, 15 Dec 2012 02:04:46 +0000 (02:04 +0000)]
When mnt_vnode_next_active iterator cannot lock the next vnode and
yields, specify the user priority for the yield.  Otherwise, a
higher-priority (kernel) thread could fall into the priority-inversion
with the thread owning the mutex lock.

On single-processor machines or UP kernels, do not loop adaptively
when the next vnode cannot be locked, instead yield unconditionally.

Restructure the iteration initializer and the iterator to remove code
duplication.  Put the code to fetch and lock a vnode next to the
current marker, into the mnt_vnode_next_active() function, and use it
instead of repeating the loop.

Reported by: hrs, rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoFix a typo, resulting in the NULL pointer dereference.
kib [Sat, 15 Dec 2012 02:03:59 +0000 (02:03 +0000)]
Fix a typo, resulting in the NULL pointer dereference.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoLine up the continuation backslashes.
kib [Sat, 15 Dec 2012 02:03:06 +0000 (02:03 +0000)]
Line up the continuation backslashes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoRemove a special case for XEN, which is erronous and makes vfork(2)
kib [Sat, 15 Dec 2012 02:02:11 +0000 (02:02 +0000)]
Remove a special case for XEN, which is erronous and makes vfork(2)
behaviour to differ from the documented, only on XEN.  If there are
any issues with XEN pmap left, they should be fixed in pmap.

MFC after: 2 weeks

11 years agoPut shared library debug info into separate .symbols file
emaste [Sat, 15 Dec 2012 00:03:35 +0000 (00:03 +0000)]
Put shared library debug info into separate .symbols file

Sponsored by: ADARA Networks

11 years agoAdd a guide to upgrading (un)vis(3) imports.
brooks [Fri, 14 Dec 2012 23:07:25 +0000 (23:07 +0000)]
Add a guide to upgrading (un)vis(3) imports.

11 years agoTag 2nd 2012-12-14 import of NetBSD's (un)vis(3)
brooks [Fri, 14 Dec 2012 23:06:31 +0000 (23:06 +0000)]
Tag 2nd 2012-12-14 import of NetBSD's (un)vis(3)

11 years agoVendor import of NetBSD's (un)vis(3) at 2012-12-14 (2nd one)
brooks [Fri, 14 Dec 2012 23:04:56 +0000 (23:04 +0000)]
Vendor import of NetBSD's (un)vis(3) at 2012-12-14 (2nd one)

11 years agoTag 2012-12-14 import of NetBSD's (un)vis(3)
brooks [Fri, 14 Dec 2012 22:47:09 +0000 (22:47 +0000)]
Tag 2012-12-14 import of NetBSD's (un)vis(3)

11 years agoVendor import of NetBSD's (un)vis(3) at 2012-12-14
brooks [Fri, 14 Dec 2012 22:45:03 +0000 (22:45 +0000)]
Vendor import of NetBSD's (un)vis(3) at 2012-12-14

11 years agoThe group list for a non-default export entry (a host/subnet one)
rmacklem [Fri, 14 Dec 2012 21:49:06 +0000 (21:49 +0000)]
The group list for a non-default export entry (a host/subnet one)
was being copied from the wrong place. This patch fixes that.
This could cause access failures for mapped users, when the group
permissions were needed.

PR: 147998
Submitted by: Christopher Key (cjk32 at cam.ac.uk)
MFC after: 2 weeks

11 years agoMinor refactoring prior to .symbols file changes
emaste [Fri, 14 Dec 2012 18:30:01 +0000 (18:30 +0000)]
Minor refactoring prior to .symbols file changes

- Combine .if x and .if !x using .else
- Separate out beforelinking dependency
- Add comments to clarify .if nesting

Sponsored by: ADARA Networks

11 years ago- When checking if a dump exists on the given device there is no need to
pjd [Fri, 14 Dec 2012 15:12:08 +0000 (15:12 +0000)]
- When checking if a dump exists on the given device there is no need to
  provide dump directory. Eliminate this redundant argument. This changes
  the usage, but the only risk here is that a warning will be printed
  about directory given as device.

- Update usage of -C option.

- When clearing dump header from the given device there is also no need to
  provide dump directory, although additional arguments for -c were not
  documented.

- Document that -v can be used with -c and that list of devices can be given.

Obtained from: WHEEL Systems

11 years agoThe clear option (-c) is not compatible with keep (-k) and compress (-z)
pjd [Fri, 14 Dec 2012 15:04:39 +0000 (15:04 +0000)]
The clear option (-c) is not compatible with keep (-k) and compress (-z)
options.

Obtained from: WHEEL Systems

11 years agoIf we are not going to clear the dump (we are either just checking if the dump
pjd [Fri, 14 Dec 2012 15:03:12 +0000 (15:03 +0000)]
If we are not going to clear the dump (we are either just checking if the dump
exists or we want to keep it), open device read-only.

Obtained from: WHEEL Systems

11 years agoWhitespace cleanups.
pjd [Fri, 14 Dec 2012 15:01:23 +0000 (15:01 +0000)]
Whitespace cleanups.

11 years ago Fix error in r235991. No-sleep version of IFNET_RLOCK() should
glebius [Fri, 14 Dec 2012 13:01:16 +0000 (13:01 +0000)]
  Fix error in r235991. No-sleep version of IFNET_RLOCK() should
be used here, since we may hold the main pf rulesets rwlock.

Reported by: Fleuriot Damien <ml my.gd>

11 years agoAdd an #include guard to the sys/fnv_hash.h.
ae [Fri, 14 Dec 2012 12:37:35 +0000 (12:37 +0000)]
Add an #include guard to the sys/fnv_hash.h.

MFC after: 3 days

11 years agoFix VIMAGE build broken in r244185.
glebius [Fri, 14 Dec 2012 08:02:35 +0000 (08:02 +0000)]
Fix VIMAGE build broken in r244185.

Submitted by: Nikolai Lifanov <lifanov mail.lifanov.com>

11 years agovirtio: Start taskqueues threads after attach cannot fail
bryanv [Fri, 14 Dec 2012 05:27:56 +0000 (05:27 +0000)]
virtio: Start taskqueues threads after attach cannot fail

If virtio_setup_intr() failed during boot, we would hang in
taskqueue_free() -> taskqueue_terminate() for all the taskq
threads to terminate. This will never happen since the
scheduler is not running by this point.

Reported by: neel, grehan
Approved by: grehan (mentor)

11 years agoTeach sysctl(8) about parsing a file (while I'm there also give it
delphij [Thu, 13 Dec 2012 23:32:47 +0000 (23:32 +0000)]
Teach sysctl(8) about parsing a file (while I'm there also give it
capability of parsing both = and : formats).

Submitted by: hrs (initial version, bugs are mine)
MFC after: 3 months

11 years agoAdd support for QEMU's version of Versatile Platform Board
gonzo [Thu, 13 Dec 2012 23:19:13 +0000 (23:19 +0000)]
Add support for QEMU's version of Versatile Platform Board

11 years agoAdd driver for PrimeCell Vectored Interrupt Controller (PL190)
gonzo [Thu, 13 Dec 2012 23:03:37 +0000 (23:03 +0000)]
Add driver for PrimeCell Vectored Interrupt Controller (PL190)

11 years agoFixes zfs receive errors caused by snapshot replication being processed in a
smh [Thu, 13 Dec 2012 22:03:07 +0000 (22:03 +0000)]
Fixes zfs receive errors caused by snapshot replication being processed in a
random order instead of creation order.

Eliminates needless filesystem renames caused by removed parent snapshots
which subsequently causes many more errors.

PR: kern/172259
Submitted by: Steven Hartland
Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdd bus_space_read_8 and bus_space_write_8 for amd64.
jimharris [Thu, 13 Dec 2012 21:40:11 +0000 (21:40 +0000)]
Add bus_space_read_8 and bus_space_write_8 for amd64.

Rather than trying to KASSERT for callers that invoke this on
IO tags, either do nothing (for write_8) or return ~0 (for read_8).
Using KASSERT here just makes bus.h too messy from both
polluting bus.h with systm.h (for any number of drivers that include
bus.h without first including systm.h) or ports that use bus.h
directly (i.e. libpciaccess) as reported by zeising@.

Also don't try to implement all of the other bus_space functions for
8 byte access since realistically only these two are needed for some
devices that expose 64-bit memory-mapped registers.

Put the amd64-specific functions here rather than sys/amd64/include/bus.h
so that we can keep this header unified for x86, as requested by mdf@
and tijl@.

Submitted by: Carl Delsey <carl.r.delsey@intel.com>
MFC after: 3 days

11 years agoRevert r243960 based on feedback regarding keeping x86 headers unified
jimharris [Thu, 13 Dec 2012 21:27:20 +0000 (21:27 +0000)]
Revert r243960 based on feedback regarding keeping x86 headers unified
(mdf@, tijl@) and use of KASSERT/systm.h in bus.h (zeising@, bde@).

Alternate implementation will be made in a separate commit.

11 years agoAdded vfs.zfs.vdev.trim_on_init sysctl which allows full vdev trim on
smh [Thu, 13 Dec 2012 17:39:07 +0000 (17:39 +0000)]
Added vfs.zfs.vdev.trim_on_init sysctl which allows full vdev trim on
initialisation to be enabled (1) / disabled (0) defaults to enabled.

This is useful for devices which have a slow trim speed and are either
new or have otherwise already been wiped e.g. secure erase.

PR:     kern/173116
Submitted by:   Steven Hartland
Approved by:    pjd (mentor)

11 years agoUpgrades trim free request sizes before inserting them into to free map,
smh [Thu, 13 Dec 2012 17:06:38 +0000 (17:06 +0000)]
Upgrades trim free request sizes before inserting them into to free map,
making range consolidation much more effective particularly for small
deletes.

This reduces memory used by the free map as well as reducing the number
of bio requests down to geom required to process all deletes.

In tests this achieved a factor of 10 reduction of trim ranges / geom
call downs.

While I'm here correct the description of zio_vdev_io_start.

PR: kern/173254
Submitted by: Steven Hartland
Approved by: pjd (mentor)

11 years agoMerge rev. 1.119 from OpenBSD:
glebius [Thu, 13 Dec 2012 12:51:22 +0000 (12:51 +0000)]
Merge rev. 1.119 from OpenBSD:

  date: 2009/03/31 01:21:29;  author: dlg;  state: Exp;  lines: +9 -16
  ...

  this also firms up some of the input parsing so it handles short frames a
  bit better.

This actually fixes reading beyond mbuf data area in pfsync_input(), that
may happen at certain pfsync datagrams.

11 years ago Initialize state id prior to attaching state to key hash. Otherwise a
glebius [Thu, 13 Dec 2012 12:48:57 +0000 (12:48 +0000)]
  Initialize state id prior to attaching state to key hash. Otherwise a
race can happen, when pf_find_state() finds state via key hash, and locks
id hash slot 0 instead of appropriate to state id slot.

11 years ago Fix problem in r238990. The LLE_LINKED flag should be tested prior to
glebius [Thu, 13 Dec 2012 11:11:15 +0000 (11:11 +0000)]
  Fix problem in r238990. The LLE_LINKED flag should be tested prior to
entering llentry_free(), and in case if we lose the race, we should simply
perform LLE_FREE_LOCKED(). Otherwise, if the race is lost by the thread
performing arptimer(), it will remove two references from the lle instead
of one.

Reported by: Ian FREISLICH <ianf clue.co.za>

11 years agoFixed missing 'n' of \n for my committers line
smh [Thu, 13 Dec 2012 09:55:26 +0000 (09:55 +0000)]
Fixed missing 'n' of \n for my committers line

Approved by: avg (mentor)

11 years agoFix the location of auditdistd configuration file.
pjd [Thu, 13 Dec 2012 09:41:32 +0000 (09:41 +0000)]
Fix the location of auditdistd configuration file.

Reported by: Johan Hendriks <joh.hendriks@gmail.com>

11 years agoBump MAX_COLS to 512 to take advantage of wider terminals.
rpaulo [Thu, 13 Dec 2012 06:45:45 +0000 (06:45 +0000)]
Bump MAX_COLS to 512 to take advantage of wider terminals.

11 years agoAdd the common FreeBSD SVN properties.
rpaulo [Thu, 13 Dec 2012 06:42:44 +0000 (06:42 +0000)]
Add the common FreeBSD SVN properties.

11 years agoPrevent possible usage of uninitialized pbase variable by checking
gonzo [Thu, 13 Dec 2012 03:35:47 +0000 (03:35 +0000)]
Prevent possible usage of uninitialized pbase variable by checking
    return value of fdt_get_range

11 years agoAdd memory barrier macros for ARM
gonzo [Thu, 13 Dec 2012 03:34:24 +0000 (03:34 +0000)]
Add memory barrier macros for ARM

11 years agoDisable interrupts in filter in order to avoid interrupt storm and
gonzo [Thu, 13 Dec 2012 03:33:01 +0000 (03:33 +0000)]
Disable interrupts in filter in order to avoid interrupt storm and
    CPU starvation

11 years agoUse even more conventional conversion routines.
grog [Thu, 13 Dec 2012 02:21:05 +0000 (02:21 +0000)]
Use even more conventional conversion routines.

Reported by: peterj@

11 years agoReluctantly remove one of the most extraordinary numeric conversion
grog [Thu, 13 Dec 2012 01:44:58 +0000 (01:44 +0000)]
Reluctantly remove one of the most extraordinary numeric conversion
routines I have ever seen and replace with something far more boring.

11 years agoChange progress indicator for downloading patches.
alfred [Thu, 13 Dec 2012 01:39:49 +0000 (01:39 +0000)]
Change progress indicator for downloading patches.

Use a percent style indicator instead of emitting one
long line of patch numbers.

11 years agoGive credit where credit is due.
eadler [Thu, 13 Dec 2012 00:44:23 +0000 (00:44 +0000)]
Give credit where credit is due.

Requested by: Álvaro Castillo
Approved by: cperciva (implicit)

11 years agoAdd my ex-mentors.
jimharris [Wed, 12 Dec 2012 22:25:31 +0000 (22:25 +0000)]
Add my ex-mentors.

11 years agosh: Detect and flag write errors on stdout in builtins.
jilles [Wed, 12 Dec 2012 22:01:10 +0000 (22:01 +0000)]
sh: Detect and flag write errors on stdout in builtins.

If there is a write error on stdout, a message will be printed (to stderr)
and the exit status will be changed to 2 if it would have been 0 or 1.

PR: bin/158206

11 years agoFix a regression caused by SVN r222417.
dteske [Wed, 12 Dec 2012 17:49:01 +0000 (17:49 +0000)]
Fix a regression caused by SVN r222417.

Prior to r222417, setting `password' in loader.conf(5) did not prevent boot
but instead only prevented changes to boot options by prompting for password
if autoboot failed or the user interrupted the countdown sequence.
After r222417 the same machine with `password' set in loader.conf(5) would no
longer boot without _always_ entering the password.

This patch restores the old (8.x and older) functionality for password in
loader.conf(5) while adding a new bootlock_password feature to replace the
edge-case should anybody desire the regressed functionality (HINT: great for
PXE servers and/or private distributions).

loader.conf(5) was updated to be more clear with-respect to password setting
(previous text was misleading).

Documentation (loader.conf(5) and check-password.4th(8)) has been updated to
include notes on the new bootlock_password setting.

Special thanks to Alex Verbod for bringing this to my attention and helping to
refine the loader.conf(5) text.

PR: conf/170110
Submitted by: Vitaly Zakharov <ded3axap@gmail.com>
Reviewed by: Alexander Verbod <alexander.verbod@gmail.com>

11 years ago Fix a crash in tcp_input(), that happens when mbuf has a fwd_tag on it,
glebius [Wed, 12 Dec 2012 17:41:21 +0000 (17:41 +0000)]
  Fix a crash in tcp_input(), that happens when mbuf has a fwd_tag on it,
but later after processing and freeing the tag, we need to jump back again
to the findpcb label. Since the fwd_tag pointer wasn't NULL we tried to
process and free the tag for second time.

Reported & tested by: Pawel Tyll <ptyll nitronet.pl>
MFC after: 3 days

11 years agoAdd myself as a new src committer
smh [Wed, 12 Dec 2012 16:59:07 +0000 (16:59 +0000)]
Add myself as a new src committer

Approved by: pjd (mentor)

11 years agoRenamed zfs trim stats removing duplicate zio_trim identifier from the name
smh [Wed, 12 Dec 2012 16:14:14 +0000 (16:14 +0000)]
Renamed zfs trim stats removing duplicate zio_trim identifier from the name
Added description option to kstats.
Added descriptions for zio_trim kstats

PR: kern/173113
Submitted by: Steven Hartland
Reviewed by: pjd
Approved by: pjd
MFC after: 2 weeks

11 years agoUse kern.max_pid sysctl to obtain maximum PID number instead of using local
pjd [Wed, 12 Dec 2012 15:45:03 +0000 (15:45 +0000)]
Use kern.max_pid sysctl to obtain maximum PID number instead of using local
define.

Reviewed by: jhb

11 years agoEliminate redundant variable.
pjd [Wed, 12 Dec 2012 15:27:33 +0000 (15:27 +0000)]
Eliminate redundant variable.

11 years agoAdd IDs for SATA controllers on AMD Hudson-2 series chipsets.
mav [Wed, 12 Dec 2012 11:53:15 +0000 (11:53 +0000)]
Add IDs for SATA controllers on AMD Hudson-2 series chipsets.
I am not exactly sure about the naming due to lack of specs on AMD site,
but it is better to have some identification then none at all.

MFC after: 1 month

11 years agoAdd quirks for AD1984A codec and Lenovo X300 laptop.
mav [Wed, 12 Dec 2012 11:44:20 +0000 (11:44 +0000)]
Add quirks for AD1984A codec and Lenovo X300 laptop.

PR: kern/148741
MFC after: 2 weeks

11 years agoImplement an API to allow a hypervisor to save/restore
grehan [Wed, 12 Dec 2012 08:35:32 +0000 (08:35 +0000)]
Implement an API to allow a hypervisor to save/restore
guest floating point state without having to know the
size of floating-point state.

Unstaticize fpurestore to allow the hypervisor to
save/restore guest state using fpusave/fpurestore
on the allocated FPU state area.

Reviewed by: kib
Obtained from: NetApp/bhyve
MFC after: 1 week

11 years agovirtio_scsi: Remove duplicated lines
bryanv [Wed, 12 Dec 2012 05:01:01 +0000 (05:01 +0000)]
virtio_scsi: Remove duplicated lines

These must have been accidently copied from the if statement a few
lines later. Also remove parameter name from function prototype.

Approved by: grehan (mentor)

11 years agoHandle large negative block counts correctly.
grog [Wed, 12 Dec 2012 04:18:25 +0000 (04:18 +0000)]
Handle large negative block counts correctly.

MFC after:  2 weeks

11 years agoMake Tflag and Wflag filters work for more sysctl options.
alfred [Wed, 12 Dec 2012 02:55:40 +0000 (02:55 +0000)]
Make Tflag and Wflag filters work for more sysctl options.

To do this move the Tflag and Wflag checks earlier in show_var() so
we bail earlier for variables not matching our query.

11 years agoAdd -R, an option to restart all enabled "local" services.
delphij [Wed, 12 Dec 2012 01:50:58 +0000 (01:50 +0000)]
Add -R, an option to restart all enabled "local" services.

Discussed on: -rc@ (in September)
MFC after: 2 months

11 years agolibc: Make various internal file descriptors close-on-exec.
jilles [Tue, 11 Dec 2012 22:52:56 +0000 (22:52 +0000)]
libc: Make various internal file descriptors close-on-exec.

These are obtained via fopen().

11 years agoCleanup a few duplicate llvm libs that snuck in with the recent update.
dim [Tue, 11 Dec 2012 20:08:57 +0000 (20:08 +0000)]
Cleanup a few duplicate llvm libs that snuck in with the recent update.

Noticed by: rdivacky

11 years agoSimilar to CTLFLAG_RDTUN, provide CTLFLAG_RWTUN that defines writable sysctl
pjd [Tue, 11 Dec 2012 19:54:35 +0000 (19:54 +0000)]
Similar to CTLFLAG_RDTUN, provide CTLFLAG_RWTUN that defines writable sysctl
that can also be modified by loader tunable.

11 years agoRemove 'dangerous' instructions from the example make.conf.
eadler [Tue, 11 Dec 2012 18:39:53 +0000 (18:39 +0000)]
Remove 'dangerous' instructions from the example make.conf.
Clarify when and why these might be used and that this isn't a supported
configuration.

PR: docs/144488
Submitted by: amdmi3
Approved by: cperciva (implicit)
MFC after: 2 weeks

11 years agoAdd pci id for the xeon hd4000 (IvyBridge server GT2)
bapt [Tue, 11 Dec 2012 09:38:12 +0000 (09:38 +0000)]
Add pci id for the xeon hd4000 (IvyBridge server GT2)

Submitted by: François Tigeot <ftigeot@wolfpond.org>
Obtained from: dragonfly
MFC after: 3 days

11 years agoMerge 1.127 from OpenBSD, that closes a regression from 1.125 (merged
glebius [Tue, 11 Dec 2012 08:37:08 +0000 (08:37 +0000)]
Merge 1.127 from OpenBSD, that closes a regression from 1.125 (merged
as r242694):
  do better detection of when we have a better version of the tcp sequence
  windows than our peer.

  this resolves the last of the pfsync traffic storm issues ive been able to
  produce, and therefore makes it possible to do usable active-active
  statuful firewalls with pf.

11 years agoCleanup more of the kassert_panic.
alfred [Tue, 11 Dec 2012 07:08:14 +0000 (07:08 +0000)]
Cleanup more of the kassert_panic.

fix compile warnings on !amd64 and NULL derefs that would happen
if kassert_panic() would return.

11 years agoFix WITNESS when INVARIANT_SUPPORT is defined.
alfred [Tue, 11 Dec 2012 05:59:16 +0000 (05:59 +0000)]
Fix WITNESS when INVARIANT_SUPPORT is defined.

This fixes tinderbox breakage from r244105.

Pointed out by: adrian

11 years agoThere's no need to use a TXQ pointer here; we specifically need the
adrian [Tue, 11 Dec 2012 04:19:51 +0000 (04:19 +0000)]
There's no need to use a TXQ pointer here; we specifically need the
hardware queue ID when queuing to EDMA descriptors.

This is a small part of trying to reduce the size of ath_buf entries.

11 years agoAllow sysctl to filter boot and runtime tunables.
alfred [Tue, 11 Dec 2012 01:28:06 +0000 (01:28 +0000)]
Allow sysctl to filter boot and runtime tunables.

Add the following flags to sysctl:
 -W  - show only writable sysctls
 -T  - show only tuneable sysctls

This can be used to create a /var/run/sysctl.boot to
compare set tunables versus booted tunables.

Sponsored by: iXsystems

11 years agoSwitch the hardwired WITNESS panics to kassert_panic.
alfred [Tue, 11 Dec 2012 01:23:50 +0000 (01:23 +0000)]
Switch the hardwired WITNESS panics to kassert_panic.

This is an ongoing effort to provide runtime debug information
useful in the field that does not panic existing installations.

This gives us the flexibility needed when shipping images to a
potentially large audience with WITNESS enabled without worrying
about formerly non-fatal LORs hurting a release.

Sponsored by: iXsystems

11 years agoIn parse():
delphij [Tue, 11 Dec 2012 01:12:29 +0000 (01:12 +0000)]
In parse():

 - Only operate on copy, don't operate on source.
 - Eliminate home-rolled strsep().
 - Constify the parameter.

MFC after: 2 weeks

11 years agoback out half of 244098.
alfred [Tue, 11 Dec 2012 00:10:20 +0000 (00:10 +0000)]
back out half of 244098.

kern.bootfile needs to be rw for installkernel.

Pointed out by: kib, flo

11 years agoAdd CTLFLAG_STATS to sysctl flags
alfred [Mon, 10 Dec 2012 23:17:08 +0000 (23:17 +0000)]
Add CTLFLAG_STATS to sysctl flags

In preparation for sysctl(8) growing the ability to only print
out boot/run-time tunables we need a way to differentiate between
RW sysctl nodes that tune a particular thing, or simply export
a stat that we want to allow the sysadmin to reset to 0 (or some
other value).

To do so, we add the CTLFLAG_STATS which should be OR'd into the
CTLFLAGs when exporting a "writable/resettable" statistic node via
sysctl.

11 years agoAdd constant missed in r244099
alfred [Mon, 10 Dec 2012 23:12:51 +0000 (23:12 +0000)]
Add constant missed in r244099

KDB entered due to KASSERT.

11 years agoallow KASSERT to enter KDB.
alfred [Mon, 10 Dec 2012 23:11:26 +0000 (23:11 +0000)]
allow KASSERT to enter KDB.

11 years agomake sysctls kern.{bootfile,conftxt} read-only
alfred [Mon, 10 Dec 2012 23:09:55 +0000 (23:09 +0000)]
make sysctls kern.{bootfile,conftxt} read-only

MFC after: 1 month

11 years agoSync pf.os with OpenBSD:
delphij [Mon, 10 Dec 2012 20:52:52 +0000 (20:52 +0000)]
Sync pf.os with OpenBSD:

add a handful of linux signatures from p0fv2 and some other
signatures from observation.

MFC after: 2 weeks

11 years agoDo not yield while owning a mutex. The Giant reacquire in the
kib [Mon, 10 Dec 2012 20:44:09 +0000 (20:44 +0000)]
Do not yield while owning a mutex.  The Giant reacquire in the
kern_yield() is problematic than.

The owned mutex is the mount interlock, and it is in fact not needed
to guarantee the stability of the mount list of active vnodes, so fix
the the issue by only taking the mount interlock for MNT_REF and
MNT_REL operations.

While there, augment the unconditional yield by some amount of
spinning [1].

Reported and tested by: pho
Reviewed by: attilio
Submitted by: attilio [1]
MFC after: 3 days