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: 295c812226
head fork: rysto32/freebsd
compare: 00e3b95f43
Commits on Oct 05, 2012
@brooksdavis brooksdavis Vendor import of NetBSD's (un)vis(3) as of 2012-10-05 c488a01
@brooksdavis brooksdavis Tag import of of NetBSD's (un)vis(3) as of 2012-10-05 7c010bb
Commits on Dec 14, 2012
@bryanv bryanv 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)
@glebius glebius Fix VIMAGE build broken in r244185.
Submitted by:	Nikolai Lifanov <lifanov>
ae Add an #include guard to the sys/fnv_hash.h.
MFC after:	3 days
@glebius glebius 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>
pjd Whitespace cleanups. 5116cfd
pjd 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
pjd The clear option (-c) is not compatible with keep (-k) and compress (-z)

Obtained from:	WHEEL Systems
pjd - 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

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

Obtained from:	WHEEL Systems
@emaste emaste 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
rmacklem 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
MFC after:	2 weeks
@brooksdavis brooksdavis Vendor import of NetBSD's (un)vis(3) at 2012-12-14 8513cac
@brooksdavis brooksdavis Tag 2012-12-14 import of NetBSD's (un)vis(3) 43c08d5
@brooksdavis brooksdavis Vendor import of NetBSD's (un)vis(3) at 2012-12-14 (2nd one) c343a07
@brooksdavis brooksdavis Tag 2nd 2012-12-14 import of NetBSD's (un)vis(3) 353ca97
@brooksdavis brooksdavis Add a guide to upgrading (un)vis(3) imports. 8b7c283
Commits on Dec 15, 2012
@emaste emaste Put shared library debug info into separate .symbols file
Sponsored by: ADARA Networks
@kostikbel kostikbel 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
@kostikbel kostikbel Line up the continuation backslashes.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
@kostikbel kostikbel Fix a typo, resulting in the NULL pointer dereference.
Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
@kostikbel kostikbel 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
@trasz trasz Fix extending filesystems of weird size by making sure the actual size
is always multiple of fragment size.
@mmatuska mmatuska 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


MFC after:	1 week
hselasky Regenerate usb.conf
MFC after:	1 week
@rwatson rwatson Merge OpenBSM 1.2-alpha3 from the vendor branch to 10-CURRENT; this v…

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
@rwatson rwatson 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
@trociny trociny In pfioctl, if the permission checks failed we returned with vnet con…


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)
@bsdphk bsdphk Update to the new and brighter pkg world 242473b
@trociny trociny New devstat metrics for devstat_compute_statistics():
@trociny trociny 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

Average duration and % busy are still available via `iostat -x`.
ae 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

Sponsored by:	Yandex LLC
Discussed with:	dwmalone, glebius, bz
andrew Fix a comment in an asm block to work with compilers other than GCC 2ad41fa
andrew Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang gene…

these even when building soft floating-point code

Submitted by:	Daisuke Aoyama <aoyama AT>
andrew 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>
andrew Also remove -Werror on arm with clang as there are warnings. 26fd8ca
andrew Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.
pjd 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
Commits on Dec 16, 2012
gonzo Fix comment to represent actual file purpose
Spotted by: gavin@
pjd Use 'cred' variable.
Obtained from:	WHEEL Systems
pjd Make the check easier to read.
Obtained from:	WHEEL Systems
pjd Don't add audit record when coredumps are disabled or name cannot be …

Discussed with:	rwatson
Obtained from:	WHEEL Systems
@trasz trasz 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@
pjd 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
marius Restore pre-r234898 printing of boot loader and path.
MFC after:	3 days
marius Revert r237842 and switch back to SCHED_ULE. All problems I encountered
with the latter have been fixed with r241780.

MFC after:	3 days
pjd Prefer snprintf() over sprintf().
Obtained from:	WHEEL Systems
pjd Sort flags properly.
Obtained from:	WHEEL Systems
@grimreaper grimreaper Minor wording improvments to some manual pages
Approved by:	bcr (mentor)
Obtained from:	DragonflyBSD (a5294ca835317c68c919ab43936da4f05ab6e926)
MFC after:	3 days
pjd Make use of the fact that we changed working directory to the dump di…


Obtained from:	WHEEL Systems
pjd Implement -m option to savecore(8) that allows to limit number of kernel
dumps stored. Once the limit is reached it restarts from 0.

Reviewed by:	avg
Obtained from:	WHEEL Systems
pjd With rotating kernel dumps the higest dump number is not necessarily the
last one. To make it easier to find the last one create symlinks with 'last'
suffix that will point to the files of the last coredump, eg.:

	info.last -> info.5
	textdump.tar.last.gz -> textdump.tar.5.gz

Reviewed by:	avg
Obtained from:	WHEEL Systems
pjd Use new savecore(8) option and limit number of kernel dumps that will
be kept around to the 10 most recent ones.

Add UPDATING entry with info how to return to the previous behaviour (no

Obtained from:	WHEEL Systems
hrs - Fix strtol() error handling.
- Add a range condition of given FIB number and the related error messages.
- Fix free() problem.

Spotted by:	Artyom Mirgorodskiy
Discussed with:	glebius
Commits on Dec 17, 2012
rmacklem Fix the gssd daemon so that it uses syslog() to report
an error instead of calling err() when it is daemonized,
so that the error gets logged.

Discussed with:	rwatson, jhb
Tested by:	Illias A. Marinos, Herbert Poeckl
MFC after:	2 weeks
@rpaulo rpaulo amd64 only has rela sections. cb834fe
yongari Make sure to stop both TX and RX MACs in ale_stop_mac(). Previously
it used to stop TX MAC only such that MAC reconfiguration after
getting a link didn't work as expected.

PR:	kern/173652
gabor - Use unsigned int for values obtained with sysctlbyname(). This fixes
  sparc64 performance problems.

Submitted by:	Oleg Moskalenko <>
Tested by:	trasz
pjd Warn about reaching various PF limits.
Reviewed by:	glebius
Obtained from:	WHEEL Systems
gabor - Fix handling of .mps files
PR:		bin/161454
Submitted by:	Yamaya Takashi <>
@jillest jillest libc/iconv: Fix race condition with setting FD_CLOEXEC.
A fork/exec could happen between open and fcntl, leaking a file descriptor.
Using O_CLOEXEC fixes this and as a side effect simplifies the code.

NetBSD already had this (I checked this after making the change myself).

Reviewed by:	gabor
pjd Better variables naming in expand_name() to be more consistent with c…

Obtained from:	WHEEL Systems
pjd Minor style tweaks.
Obtained from:	WHEEL Systems
@grimreaper grimreaper Fix warning from valgrind when a failed entry is tested.
PR:		kern/173008
Submitted by:	Zhihao Yuan <>
Reviewed by:	gabor
Approved by:	cperciva (implicit)
MFC after:	1 week
ae Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for

Pointy hat to:	ae
Reported by:	Vadim Goncharov
MFC after:	3 days
ache Fix:
line 11: Malformed conditional
(${TARGET} == "arm" || ${TARGET_ARCH} == "powerpc64")
ae Since we use different flags to detect tcp forwarding, and we share the
same code for IPv4 and IPv6 in tcp_input, we should check both

MFC after:	3 days
@emaste emaste Hide OBJCOPY and others in POSIX mode
Submitted by: Garrett Cooper
Commits on Dec 18, 2012
jimharris Use CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT to report nonexistent
LUNs for the virtual processor device.  This removes lots of CAM warnings,
and follows similar recent changes to tws(4) and twa(4) drivers.

Also fix case where CAM_REQ_CMP was getting OR'd with CAM_DEV_NOT_THERE
in the nonexistent LUN case, resulting in different CAM status (CAM_UA_TERMIO)
getting reported to CAM.  This issue existing previously, but was more subtle
because it changed CAM_SEL_TIMEOUT to CAM_CMD_TIMEOUT.

Sponsored by:	Intel
Reported and tested by:	Willem Jan Withagen <>
MFC after:	1 week
rmacklem Piete.Brooks at reported via email a crash which was
caused by use of an invalid kgss_gssd_handle during an upcall to
the gssd daemon when it has exited. This patch seems to avoid the
crashes by holding a reference count on the kgss_gssd_handle until
the upcall is done. It also adds a new mutex kgss_gssd_lock used to
make manipulation of kgss_gssd_handle SMP safe.

Tested by:	Illias A. Marinos, Herbert Poeckl
Reviewed by:	jhb
MFC after:	2 weeks
ache More correct version of prev. fix. b55b637
kevlo Fix typo in comment.
Reviewed by:	thompsa
andrew Get libcompiler-rt and libgcc building on ARM with clang.
* Don't provide clear_cache or the __sync_* functions on ARM with clang as
  they are provided by clang as builtin functions.
* Tell clang it is aloud to compile some libgcc code using heinous GCC
@z0nt z0nt - Set memorylocked limit to 64Kb for default login class.
  This prevents unprivileged users to lock too much memory.
- Set memorylocked limit to 64Mb for daemon login class.
  Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on
  startup, they are run from init(8) which uses daemon login class.
- Set memorylocked limit to unlimited for root login class.

Suggested by:	avg
Approved by:	kib (mentor)
MFC after:	1 week
@z0nt z0nt - Fix locked memory accounting for maps with MAP_WIREFUTURE flag.
- Add sysctl vm.old_mlock which may turn such accounting off.

Reviewed by:	avg, trasz
Approved by:	kib (mentor)
MFC after:	1 week
@z0nt z0nt - Add sysctl to allow unprivileged users to call mlock(2)-family system
  calls and turn it on.
- Do not allow to call them inside jail. [1]

Pointed out by:	trasz [1]
Reviewed by:	avg
Approved by:	kib (mentor)
MFC after:	1 week
@glebius glebius Clear correct flag in INET6 case. b5e0ad2
@glebius glebius Fix !INET6 build after r244365. d4b855a
monthadar wtap: fix clang warning.
* The warning message was:
    'warning error: format string is not a string literal';
* Changed how make_dev is called, now a string literal
  for formatting is used;

Approved by: adrian (mentor)
monthadar wtap should check if ieee80211_vap_setup fails.
* If ieee80211_vap_setup fails, we free allocated M_80211_VAP
  memory and return NULL;

Approved by: adrian (mentor)
monthadar wtap fix malloc/free.
* Remove malloc/free pointer cast;
* Check return value from malloc;

Submitted by: glebius
Approved by: adrian (mentor)
monthadar wtap should not set the IEEE80211_F_DATAPAD flag;
Approved by: adrian (mentor)
@brooksdavis brooksdavis Replace our implementation of the vis(3) and unvis(3) APIs with
NetBSD's.  This output size limited versions of vis and unvis functions
as well as a set of vis variants that allow arbitrary characters to be
specified for encoding.

Finally, MIME Quoted-Printable encoding as described in RFC 2045 is
@mjguzik mjguzik prison_racct_detach can be called for not fully initialized jail, so …
…make it check that the jail has racct before doing anything

PR:		kern/174436
Reviewed by:	trasz
MFC after:	3 days
@dumbbell dumbbell psm: Support detection of Synaptics touchpad v7.5 and above
Starting with firmware v7.5, the "Read TouchPad Modes" ($01) and "Read
Capabilities" ($02) commands changed: previously constant bytes now
carry variable information.

We now compare those bytes to expected constants only for firmware prior
to v7.5.

Tested by:	Zeus Panchenko <>
MFC after:	1 week
@delphij delphij Update arcmsr(4) to vendor version, this adds
support for their new RAID adapter ARC-1214.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 Ching-Lung Huang <ching2048 areca com tw>
MFC after:	2 weeks
@grimreaper grimreaper POSIX requires that non-existent or null arguments be treated as if a
zero argument were supplied.

Add a regression test to catch this case as well.

PR:		bin/174521
Submitted by:	Daniel Shahaf <> (pr)
Submitted by:	Mark Johnston <> (initial patch)
Reviewed by:	jilles
Approved by:	cperciva (implicit)
MFC after:	3 weeks
@emaste emaste No reason to install debug data with the schg flag 2a88c38
@grimreaper grimreaper Add an additional regression tests for other cases to ensure these do…
… not get fixed by accident.
jimharris Do not use taskqueue to defer completion work when using INTx. INTx now
matches MSI-X behavior.

Sponsored by:	Intel
jimharris Simplify module definition by adding nvme_modevent to DRIVER_MODULE()

Submitted by:   Carl Delsey <>
gonzo Add sysctls for changing GPIO pins function
Submitted by:	Luiz Otavio O Souza
jimharris Map BAR 4/5, because NVMe spec says devices may place the MSI-X table
behind BAR 4/5, rather than in BAR 0/1 with the control/doorbell registers.

Sponsored by:	Intel
Commits on Dec 19, 2012
cognet Properly implement pmap_[get|set]_memattr
Submitted by:	Ian Lepore <>