Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rysto32/freebsd
base: a53bd25cdf
head fork: rysto32/freebsd
compare: 295c812226
Commits on Dec 09, 2012
@devinteske devinteske Use ASCII characters for box/line characters in frames.4th
Committed with changes to support the following from loader.conf(5):
+ console="vidconsole comconsole" (not just console="comconsole")
+ boot_serial="anything" (not just boot_serial="YES")
+ boot_multicons="anything" (unsupported in originally-submitted patch)

PR:		conf/121064
Submitted by:	koitsu
Reviewed by:	gcooper, adrian (co-mentor)
Approved by:	adrian (co-mentor)
adrian Atheros SuperG bug fixes, as part of hunting down kern/174283.
The stageqdepth (global, over all staging queues) was being kept
incorrectly.  It was being incremented whenever things were added,
but only decremented during a flush.  During active fast frames activity
it wasn't being decremented, resulting in it always having a non-zero
value during normal fast-frames operation.

It was only used when checking if the aging queue should be checked;
we may as well just defer to each of those staging queue counters (which
look correct, thankfully.)

Whilst I'm here, add locking assertions in the staging queue add/remove
functions.  The current crash shows that the staging queue has one frame,
but only has a tail pointer set (the head pointer being set to NULL.)
I'd like to grab a few more crashes where these locking assertions are
in place so I can narrow down the issue between "somehow locking is
messed up and things are racy" and "the stage queue head/tail pointer
manipulation logic is subtly wrong."


* AR5416 STA, AR5413 AP; with FastFrames enabled in the AR5416 HAL.

PR:		kern/174283
ken Fix a couple of CTL locking issues and clean up some duplicated code.
ctl_frontend_cam_sim.c:	Coalesce cfcs_online() and cfcs_offline()
			into a single function since these were
			identical except for one line.

			Make sure we hold the SIM lock around path
			creation, and calling xpt_rescan().

scsi_ctl.c:		In ctlfe_onoffline(), make sure we hold the
			SIM lock around path creation and free
			calls, as well as xpt_action().

			In ctlfe_lun_enable(), hold the SIM lock
			around path and peripheral operations that
			require it.

Sponsored by:	Spectra Logic Corporation
MFC after:	1 week
@kostikbel kostikbel Fix typo.
MFC after:	3 days
@kostikbel kostikbel Remove useless comment.
MFC after:	3 days
rmacklem Document the new NFS mount options added by r244042.
This is a content change.
rmacklem Add "nfsstat -m" support for the two new NFS mount options
added by r244042.
gjb Get 'uname -r' earlier, so it can be used to determine what branch is
being run to set BSDINSTALL_DISTSITE accordingly.  This change allows
non-RELEASE branches to use the FTP snapshots directory for bootonly.iso

Approved by:	simon
andre Fix bandwidth reporting when doing a restarted download with "-r".
The offset is already accounted for in xs->lastrcvd and doesn't
have to be subtracted again.

Reported by:	Florian Smeets <>
Submitted by:	Mateusz Guzik <>
Tested by:	Florian Smeets <>
MFC after:	1 week
gjb Add missed BETA* to list.
Approved by:	simon (implicit)
MFC after:	3 days
X-MFC-With:	r244058
adrian Handle ath-specific and WME IE's in adhoc mode.
The Adhoc support wasn't parsing and handling the ath specific and WME
IEs, thus the atheros vendor support and WME TXOP parameters aren't being
copied from the peer.

It copies the WME parameters from whichever adhoc node it decides to
associate to, rather than just having them be statically configured
per adhoc node.  This may or may not be exactly "right", but it's certainly
going to be more convienent for people - they just have to ensure their
adhoc nodes are setup with correct WME parameters.

Since WME parameters aren't per-node but are configured on hardware TX
queues, if some nodes support WME and some don't - or perhaps, have
different WME parameters - things will get quite quirky.

So ensure that you configure your adhoc nodes with the same WME

Secondly - the Atheros Vendor IE is parsed and operated on per-node, so
this should work out ok between nodes that do and don't do Atheros
extensions.  Once you see a becaon from that node and you setup the
association state, it _should_ parse things correctly.


* I do need to ensure that both adhoc setup paths are correctly updating
  the IE stuff.  Ie, if the adhoc node is created by a data frame instead
  of a beacon frame, it'll come up with no WME/ath IE config.  The next
  beacon frame that it receives from that node will update the state.
  I just need to sit down and better understand how that's suppose to
  work in IBSS mode.


* AR5416 <-> AR9280 - fast frames and the WME configuration both popped
  up. (This is with a local HAL patch that enables the fast frames
  capability on the AR5416 chipsets.)

PR:		kern/165969
adrian Undo the previous adhoc commit - doing the WME IE handling here
is totally wrong.

If we parse the WME IE here, we'll be constantly updating the WME
configuration from each WME enabled IBSS node we see.

There's a separate issue where the WME configuration is blanked out
when the interface is brought up; the WME parameters aren't "sticky."

Also, ieee80211_init_neighbor() parses the ath IE, so doing it here
isn't required.

Sorry about the noise.

PR:		kern/165969
Commits on Dec 10, 2012
adrian Update the aggressive mode logic to also enable aggressive mode
parameters in IBSSes.

IBSS was just being plainly ignored here even though aggressive mode
was 'on'.

This still doesn't fix the "why are the WME parameters reset upon
interface down/up" issue.

PR:		kern/165969
@grimreaper grimreaper Give users a hint when their locate database is too small.
Reviewed by:	wblock, gcooper
Reviewed by:	"Lowell Gilbert" <>
Approved by:	cperciva (implicit)
MFC after:	3 weeks
@kostikbel kostikbel Do not ignore zero address, possibly returned by the vm_map_find()
call.  The function indicates a failure by the TRUE return value.  To
be extra safe, assert that the return value from the following
vm_map_insert() indicates success.

Fix style issues in the nearby lines, reformulate the comment.

Reviewed by:	alc (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
@kostikbel kostikbel Add amd64-specific ddb command "show pte". The command displays the
hierarchy of the page table entries which map the specified address.

Reviewed by:	alc (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
adrian Adjust the channel to correctly setup the HT flags when transitioning

An 11n IBSS was beaconing HTINFO/HTCAP IE's that didn't have any HT
information setup (like the HT TX/RX MCS bitmask.)


* AR9280, IBSS - both a statically setup channel and a scanned channel

PR:		kern/172955
andre Prevent long type overflow of realmem calculation on ILP32 by forcing
calculation to be in quad_t space.  Fix style issue with second parameter
to qmin().

Reported by:	alc
Reviewed by:	bde, alc
@glebius glebius NGM_NETFLOW_SHOW reports IPv6 flows as well.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov>
@devinteske devinteske Add support for comma-separated values (whitespace-separated still su…

PR:		conf/121064
Submitted by:	koitsu
Reviewed by:	jh
@ghelmer ghelmer Changes to resolve races in bpfread() and catchpacket() that, at worst,
cause kernel panics.

Add a flag to the bpf descriptor to indicate whether the hold buffer
is in use. In bpfread(), set the "hold buffer in use" flag before
dropping the descriptor lock during the call to bpf_uiomove().
Everywhere else the hold buffer is used or changed, wait while
the hold buffer is in use by bpfread(). Add a KASSERT in bpfread()
after re-acquiring the descriptor lock to assist uncovering any
additional hold buffer races.
@brooksdavis brooksdavis Improve style(9) compliance of function declarations. dc3d3a9
@jillest jillest libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
@kostikbel kostikbel 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
@delphij delphij Sync pf.os with OpenBSD:
add a handful of linux signatures from p0fv2 and some other
signatures from observation.

MFC after:	2 weeks
@splbio splbio make sysctls kern.{bootfile,conftxt} read-only
MFC after:	1 month
@splbio splbio allow KASSERT to enter KDB. 2c7fa7b
@splbio splbio Add constant missed in r244099
KDB entered due to KASSERT.
@splbio splbio 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
Commits on Dec 11, 2012
@splbio splbio back out half of 244098.
kern.bootfile needs to be rw for installkernel.

Pointed out by: kib, flo
@delphij delphij In parse():
 - Only operate on copy, don't operate on source.
 - Eliminate home-rolled strsep().
 - Constify the parameter.

MFC after:	2 weeks
@splbio splbio 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
@splbio splbio 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
adrian 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.
@splbio splbio Fix WITNESS when INVARIANT_SUPPORT is defined.
This fixes tinderbox breakage from r244105.

Pointed out by: adrian
@splbio splbio Cleanup more of the kassert_panic.
fix compile warnings on !amd64 and NULL derefs that would happen
if kassert_panic() would return.
@glebius glebius 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.
@bapt bapt Add pci id for the xeon hd4000 (IvyBridge server GT2)
Submitted by:	François Tigeot <>
Obtained from:	dragonfly
MFC after:	3 days
@grimreaper grimreaper Remove 'dangerous' instructions from the example make.conf.
Clarify when and why these might be used and that this isn't a supported

PR:		docs/144488
Submitted by:	amdmi3
Approved by:	cperciva (implicit)
MFC after:	2 weeks
pjd Similar to CTLFLAG_RDTUN, provide CTLFLAG_RWTUN that defines writable…
… sysctl

that can also be modified by loader tunable.
@DimitryAndric DimitryAndric Cleanup a few duplicate llvm libs that snuck in with the recent update.
Noticed by:	rdivacky
@jillest jillest libc: Make various internal file descriptors close-on-exec.
These are obtained via fopen().
Commits on Dec 12, 2012
@delphij delphij Add -R, an option to restart all enabled "local" services.
Discussed on:	-rc@ (in September)
MFC after:	2 months
@splbio splbio 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.
grog Handle large negative block counts correctly.
MFC after:	 2 weeks
@bryanv bryanv 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)
@grehan-freebsd grehan-freebsd 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
@amotin amotin Add quirks for AD1984A codec and Lenovo X300 laptop.
PR:		kern/148741
MFC after:	2 weeks
@amotin amotin 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
pjd Eliminate redundant variable. bf8108c
pjd Use kern.max_pid sysctl to obtain maximum PID number instead of using…
… local


Reviewed by:	jhb
smh Renamed zfs trim stats removing duplicate zio_trim identifier from th…
…e 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
smh Add myself as a new src committer
Approved by:	pjd (mentor)
@glebius glebius 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>
MFC after:		3 days
@devinteske devinteske 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 <>
Reviewed by:	Alexander Verbod <>
@jillest jillest 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
jimharris Add my ex-mentors. 9a5e6ff
Commits on Dec 13, 2012
@grimreaper grimreaper Give credit where credit is due.
Requested by:	Álvaro Castillo
Approved by:	cperciva (implicit)
@splbio splbio Change progress indicator for downloading patches.
Use a percent style indicator instead of emitting one
long line of patch numbers.
grog Reluctantly remove one of the most extraordinary numeric conversion
routines I have ever seen and replace with something far more boring.
grog Use even more conventional conversion routines.
Reported by: peterj@
gonzo Disable interrupts in filter in order to avoid interrupt storm and
    CPU starvation
gonzo Add memory barrier macros for ARM 28f810b
gonzo Prevent possible usage of uninitialized pbase variable by checking
    return value of fdt_get_range
@rpaulo rpaulo Add the common FreeBSD SVN properties. 3598f21
@rpaulo rpaulo Bump MAX_COLS to 512 to take advantage of wider terminals. 22d7e26
pjd Fix the location of auditdistd configuration file.
Reported by:	Johan Hendriks <>
smh Fixed missing 'n' of \n for my committers line
Approved by:	avg (mentor)
@glebius glebius 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>
@glebius glebius 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.
@glebius glebius 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.
smh Upgrades trim free request sizes before inserting them into to free map,
making range consolidation much more effective particularly for small

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)
smh 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)
jimharris 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.
jimharris 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 <>
MFC after:	3 days
smh Fixes zfs receive errors caused by snapshot replication being process…
…ed 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
gonzo Add driver for PrimeCell Vectored Interrupt Controller (PL190) 8ca6807
gonzo Add support for QEMU's version of Versatile Platform Board 583c571
@delphij delphij 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