]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix a typo: s/iff/if/
hiren [Mon, 22 Jun 2015 21:53:55 +0000 (21:53 +0000)]
Fix a typo: s/iff/if/

Sponsored by:     Limelight Networks

9 years agoCall /etc/crontab the "system crontab", not "root's crontab". While
wblock [Mon, 22 Jun 2015 20:24:59 +0000 (20:24 +0000)]
Call /etc/crontab the "system crontab", not "root's crontab".  While
here, fix some other wording issues

PR: 201048
Submitted by: teksimian@gmail.com
MFC after: 1 week

9 years agoFix generation of src.conf.5
sjg [Mon, 22 Jun 2015 20:21:57 +0000 (20:21 +0000)]
Fix generation of src.conf.5

Since makeman turns all options on, we need to guard somethings from
make(showconfig)

9 years agoAdd a workaround to correctly align the stack before calling into C code.
andrew [Mon, 22 Jun 2015 19:43:08 +0000 (19:43 +0000)]
Add a workaround to correctly align the stack before calling into C code.
When enough time has passed for users to update their userland the kernel
fix will be applied. This will change the ABI to have x0 point to the args
and sp be correctly aligned.

It is expected this compatibility code can be removed when the kernel and
qemu usermode emulation have both been updated for the new ABI.

This fixes clang failures, and most likely other crashes.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

9 years agoAppy := to dependent opts once value determined.
sjg [Mon, 22 Jun 2015 19:01:09 +0000 (19:01 +0000)]
Appy := to dependent opts once value determined.

This is needed to fix output from 'make showconfig'

9 years agoReport failing value from 'make showconfig' in build option script
emaste [Mon, 22 Jun 2015 17:23:36 +0000 (17:23 +0000)]
Report failing value from 'make showconfig' in build option script

Sponsored by: The FreeBSD Foundation

9 years agoAdd new UART device presented on newer AMT enabled systems/laptops.
sbruno [Mon, 22 Jun 2015 17:16:09 +0000 (17:16 +0000)]
Add new UART device presented on newer AMT enabled systems/laptops.

Tested on Dell Latitude E7240.

MFC after: 2 weeks
Relnotes: yes

9 years agoMake imgact_binmisc_exec() static.
sbruno [Mon, 22 Jun 2015 17:04:24 +0000 (17:04 +0000)]
Make imgact_binmisc_exec() static.

Submitted by: kib
Reviewed by: sson

9 years agotargets now needs .PHONY
sjg [Mon, 22 Jun 2015 16:13:17 +0000 (16:13 +0000)]
targets now needs .PHONY

9 years agoDump additional config bytes for INIT_FIRMWARE_MULTI_ID.
mav [Mon, 22 Jun 2015 08:26:28 +0000 (08:26 +0000)]
Dump additional config bytes for INIT_FIRMWARE_MULTI_ID.

9 years agoAdd logging of executed mailbox command names.
mav [Mon, 22 Jun 2015 06:30:02 +0000 (06:30 +0000)]
Add logging of executed mailbox command names.

Previously those commands were logged only as part of register dump,
that is not very readable.

9 years agoInstall ncurses html documentation again after r284345
antoine [Mon, 22 Jun 2015 05:41:13 +0000 (05:41 +0000)]
Install ncurses html documentation again after r284345

9 years agoremove 16 rules and replace by 2 by using a table
julian [Mon, 22 Jun 2015 04:25:41 +0000 (04:25 +0000)]
remove 16 rules and replace by 2 by using a table
I've been doing this ever since there were tables
coudl make more efficient by using "in recv"  and "out xmit" instead of via
but I'll leave that.

MFC after: 1 week

9 years agoChange the probe to what was intended: attach to devices with
marcel [Mon, 22 Jun 2015 00:34:29 +0000 (00:34 +0000)]
Change the probe to what was intended: attach to devices with
a type 0 header and not to function 0 devices.

9 years agoFix a regression in "movs" emulation after r284539. The regression was caused
neel [Mon, 22 Jun 2015 00:30:34 +0000 (00:30 +0000)]
Fix a regression in "movs" emulation after r284539. The regression was caused
due to a change in behavior of the 'vm_map_gpa()'.

Prior to r284539 if 'vm_map_gpa()' was called to map an address range in the
guest MMIO region then it would return NULL. This was used by the "movs"
emulation to detect if the 'src' or 'dst' operand was in MMIO space.

Post r284539 'vm_map_gpa()' started returning a non-NULL pointer even when
mapping the guest MMIO region.

Fix this by returning non-NULL only if [gaddr, gaddr+len) is entirely
within the 'lowmem' or 'highmem' regions and NULL otherwise.

Pointy hat to: neel
Reviewed by: grehan
Reported by: tychon, Ben Perrault (ben.perrault@gmail.com)
MFC after: 1 week

9 years agoOnly build gperf as a bootstrap tool if gcc is going to be built
bapt [Sun, 21 Jun 2015 22:45:53 +0000 (22:45 +0000)]
Only build gperf as a bootstrap tool if gcc is going to be built

9 years agoSimplify code to install manpages and it symlinks
bapt [Sun, 21 Jun 2015 22:42:55 +0000 (22:42 +0000)]
Simplify code to install manpages and it symlinks

Use the bmake's .for multi variable loops to simplify and make the code more
readable

9 years agoSimplify symlinks on include files by using bmake's multivariable .for loops
bapt [Sun, 21 Jun 2015 22:27:52 +0000 (22:27 +0000)]
Simplify symlinks on include files by using bmake's multivariable .for loops

9 years agoEnable ttyu1, ttyu2, ttyu3 for arm installations.
gjb [Sun, 21 Jun 2015 19:50:02 +0000 (19:50 +0000)]
Enable ttyu1, ttyu2, ttyu3 for arm installations.

This should make all consoles available, whether it
is VGA, HDMI, serial, or JTAG, but more importantly
enables all consoles when ttyu0 is not predictable.
For example, the Pandaboard ES apparently has three
consoles available, but the DB9/RS232 serial port is
ttyu2, so not available by default after the system
boots.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoExpand sysctls descriptions for iscsi(4) and ctl(4).
trasz [Sun, 21 Jun 2015 14:21:38 +0000 (14:21 +0000)]
Expand sysctls descriptions for iscsi(4) and ctl(4).

Differential Revision: https://reviews.freebsd.org/D2876
Reviewed by: wblock@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoRewrite port database handling for target mode.
mav [Sun, 21 Jun 2015 14:18:54 +0000 (14:18 +0000)]
Rewrite port database handling for target mode.

Previous implementation was too fragile to initiator parameters changes.
In case of port role change it could not survive different handle assigned
to the same initiator by firmware, even though initiator was logged out.
The new implementation should be more resillient to this kind of problems,
trying to work in any situation and only warn user about suspisious events.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

9 years agoAppend the hour and minute to the snapshot suffix for EC2
gjb [Sun, 21 Jun 2015 12:37:31 +0000 (12:37 +0000)]
Append the hour and minute to the snapshot suffix for EC2
AMIs and Azure VM images.  This is particularly helpful for
testing to avoid name collisions, but also useful for cases
where a necessary rebuild is done before the date changes.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoAdd more obsolete files
antoine [Sun, 21 Jun 2015 06:57:40 +0000 (06:57 +0000)]
Add more obsolete files

9 years agoInstall version.4th.8 again
antoine [Sun, 21 Jun 2015 06:56:29 +0000 (06:56 +0000)]
Install version.4th.8 again
It was disconnected from installation in r281081, but was never removed
from the tree or added to ObsoleteFiles.inc

9 years agoGarbage collect comments and a macro which related to the pre-r284296
cperciva [Sun, 21 Jun 2015 06:52:03 +0000 (06:52 +0000)]
Garbage collect comments and a macro which related to the pre-r284296
support for a "segment block" extension in FreeBSD's Xen blkfront/blkback
drivers.

This commit should not result in any functional changes.

9 years agoGarbage collect comments which related to the pre-r284296 support for a
cperciva [Sun, 21 Jun 2015 06:05:33 +0000 (06:05 +0000)]
Garbage collect comments which related to the pre-r284296 support for a
"segment block" extension in FreeBSD's Xen blkfront/blkback drivers.

Since this commit only affects comments, it should have no functional
effect.

9 years agoMove the bus_dma_tag creation and per-transaction data allocation from
cperciva [Sun, 21 Jun 2015 05:36:58 +0000 (05:36 +0000)]
Move the bus_dma_tag creation and per-transaction data allocation from
xbd_initialize to xbd_connect.  Both of these initialization steps need
to know what the maximum possible I/O size will be, and when we gain
support for indirect segment I/Os we won't know that value until we
reach xbd_connect.  Since none of this data is used before xbd_connect
completes, moving the initialization is harmless.

This commit should not result in any functional changes.

9 years agoIf we fail to allocate memory, pass ENOMEM as the error code, not the
cperciva [Sun, 21 Jun 2015 05:32:56 +0000 (05:32 +0000)]
If we fail to allocate memory, pass ENOMEM as the error code, not the
"error" variable (which is always zero at this point).

9 years agoChase r284656 and r284658:
gjb [Sun, 21 Jun 2015 04:34:57 +0000 (04:34 +0000)]
Chase r284656 and r284658:

Remove the Azure-local vm_extra_create_disk(), since we no longer
need qemu-img to convert the final VHD image to an Azure-compatible
format.

Although the waagent utility is installed from ports, create the
symlink to /usr/sbin, pending investigation on where this is
hard-coded, so it can be reported upstream.  In the meantime, this
is good enough.

MFC after: 3 days
X-MFC-Needs: r284269, r284270, r284271, r284655,
r284656, r284657, r284658, r284659
X-MFC-Note: Required for 10.2-RELEASE, marcel@ has
implicit approval for the required changes
Sponsored by: The FreeBSD Foundation

9 years agoRebase after r284658:
marcel [Sun, 21 Jun 2015 02:55:25 +0000 (02:55 +0000)]
Rebase after r284658:
1.  Change creator OS to "wi2k"
2.  Bump tool version to 2.0

9 years agoMicrosoft Azure expects the creator OS to be "Wi2k" and not "FBSD".
marcel [Sun, 21 Jun 2015 02:45:31 +0000 (02:45 +0000)]
Microsoft Azure expects the creator OS to be "Wi2k" and not "FBSD".
The image is not accepted for provisioning otherwise. Bump the
VHD creator tool version and the version of mkimg to signify our
success in provisioning.

Note that this also imapcts the dynamic VHD images.

Tested by: gjb@

9 years agoRebase the fixed VHD images after the rounding fix.
marcel [Sun, 21 Jun 2015 01:55:01 +0000 (01:55 +0000)]
Rebase the fixed VHD images after the rounding fix.

9 years agoMicrosoft Azure demands that fixed VHD images are a whole number
marcel [Sun, 21 Jun 2015 01:44:27 +0000 (01:44 +0000)]
Microsoft Azure demands that fixed VHD images are a whole number
of megabytes. This is on top of having the image rounded to the
matching geometry of the image size.
By rounding up to the next MB after rounding to the geometry, we
lost idempotency. Subsequent calls to resize the image will keep
increasing the image size.

Tested by: gjb@

9 years agoDon't resize again prior to writing. Resizing may not be idempotent
marcel [Sun, 21 Jun 2015 01:35:32 +0000 (01:35 +0000)]
Don't resize again prior to writing. Resizing may not be idempotent
and no scheme adjusts the size after the format resized the image
the first time.

9 years agoAvoid pmap_is_modified() on pages that can't be mapped.
alc [Sun, 21 Jun 2015 01:22:35 +0000 (01:22 +0000)]
Avoid pmap_is_modified() on pages that can't be mapped.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoSimplified implementation of bxe_set_mc_list()
davidcs [Sat, 20 Jun 2015 22:24:44 +0000 (22:24 +0000)]
Simplified implementation of bxe_set_mc_list()
removed bxe_free_mcast_macs_list() and bxe_init_mcast_macs_list()
fixed bug where copy of multicast list mta was deleted prior to passing the list to firmware

MFC after:5 days

9 years agoDeal with MAKEOBJDIRPREFIX
sjg [Sat, 20 Jun 2015 21:48:07 +0000 (21:48 +0000)]
Deal with MAKEOBJDIRPREFIX

MAKEOBJDIRPREFIX does not really fit our model.
Use it to set OBJROOT to about where user expects
and set MAKEOBJDIR to do what we want.

9 years agofts_children: preserve errno after running close/fchdir
jilles [Sat, 20 Jun 2015 20:54:05 +0000 (20:54 +0000)]
fts_children: preserve errno after running close/fchdir

PR: 200942
Submitted by: Conrad Meyer
Differential Revision: https://reviews.freebsd.org/D2852
MFC after: 1 week

9 years agoThe barriers, provided by _acq and _rel atomics, are acquire and
kib [Sat, 20 Jun 2015 17:18:46 +0000 (17:18 +0000)]
The barriers, provided by _acq and _rel atomics, are acquire and
release barriers, not read and write barriers.  They fence all memory
accesses from the respective side, not limited by the kind of
operation.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix the build for gcc by lowering the WARNS level
allanjude [Sat, 20 Jun 2015 15:03:02 +0000 (15:03 +0000)]
Fix the build for gcc by lowering the WARNS level

Approved by: sbruno
X-MFC-With: r284589

9 years agoFix REPORT LUNS command output for the case when same LUN mapped to same
mav [Sat, 20 Jun 2015 13:02:57 +0000 (13:02 +0000)]
Fix REPORT LUNS command output for the case when same LUN mapped to same
port several times.  While it is unusual configuration, it is not illegal.

MFC after: 1 week

9 years agoBring per-port LUN enable/disable code up to date:
mav [Sat, 20 Jun 2015 12:43:54 +0000 (12:43 +0000)]
Bring per-port LUN enable/disable code up to date:
 - remove last remnants of never implemented multiple targets support;
 - implement missing support for LUN mapping in this area.

Due to existing locking constraints LUN mapping code is practically
unlocked at this point.  Hopefully it is not racy enough to live until
somebody get idea how to call sleeping fronend methods under lock also
taken by the same frontend in non-sleepable context. :(

9 years agoIntroduce separate lock for tokens to reduce ctl_lock scope.
mav [Sat, 20 Jun 2015 11:20:25 +0000 (11:20 +0000)]
Introduce separate lock for tokens to reduce ctl_lock scope.

9 years agoRemove temporary changes that crept in r284417 when it should not have
bapt [Sat, 20 Jun 2015 11:11:13 +0000 (11:11 +0000)]
Remove temporary changes that crept in r284417 when it should not have

Reported by: antoine, jbeich

9 years agoAdd more obsolete files
antoine [Sat, 20 Jun 2015 09:06:48 +0000 (09:06 +0000)]
Add more obsolete files

9 years ago- Add SOCK_SEQPACKET support in UNIX-domain socket.
hrs [Sat, 20 Jun 2015 08:59:50 +0000 (08:59 +0000)]
- Add SOCK_SEQPACKET support in UNIX-domain socket.
- Display zoneid using % notation in an IPv6 address.
- Use nitems().
- Use sstos{in,in6,un} macros to simplify casts.
- style(9).

9 years agoAdd more obsolete files
antoine [Sat, 20 Jun 2015 08:52:44 +0000 (08:52 +0000)]
Add more obsolete files

9 years agoAdd miscellaneous obsolete files
antoine [Sat, 20 Jun 2015 08:24:17 +0000 (08:24 +0000)]
Add miscellaneous obsolete files

9 years agoAdd more nvlist man pages to obsolete files
antoine [Sat, 20 Jun 2015 07:58:09 +0000 (07:58 +0000)]
Add more nvlist man pages to obsolete files

9 years agoadd SO_REUSEADDR when starting debug port, lets you still bind when
jmg [Sat, 20 Jun 2015 07:49:08 +0000 (07:49 +0000)]
add SO_REUSEADDR when starting debug port, lets you still bind when
a TIME_WAIT socket is still around...

Reviewed by: grehan
Review: https://reviews.freebsd.org/D2875

9 years agoFix a few obsolete files entries, man pages must be listed compressed
antoine [Sat, 20 Jun 2015 07:42:54 +0000 (07:42 +0000)]
Fix a few obsolete files entries, man pages must be listed compressed

9 years agoAdd some files to remove when MK_BSD_GREP=no
antoine [Sat, 20 Jun 2015 07:35:02 +0000 (07:35 +0000)]
Add some files to remove when MK_BSD_GREP=no

9 years agoRemove some dead and duplicate LUN enabling code.
mav [Sat, 20 Jun 2015 07:33:06 +0000 (07:33 +0000)]
Remove some dead and duplicate LUN enabling code.

9 years agoAdd EPOLLRDHUP support.
dchagin [Sat, 20 Jun 2015 05:40:35 +0000 (05:40 +0000)]
Add EPOLLRDHUP support.

Tested by: abi at abinet dot ru

9 years agoUse ofw_bus_find_child_device_by_phandle to see if the child we're
imp [Sat, 20 Jun 2015 04:48:53 +0000 (04:48 +0000)]
Use ofw_bus_find_child_device_by_phandle to see if the child we're
adding already exists and if so just return that. The typical use case
is from identify routines, which shouldn't be adding multiple copies
of the same phandle_t to the gpiobus. Only one per phandle_t is needed
(or expected by the current code).

Differential Revision: https://reviews.freebsd.org/D2871

9 years agoAdd ofw_bus_find_child_by_phandle, a helper routine to find a device_t
imp [Sat, 20 Jun 2015 04:48:48 +0000 (04:48 +0000)]
Add ofw_bus_find_child_by_phandle, a helper routine to find a device_t
child matchig a given phandle_t.

Differential Revision: https://reviews.freebsd.org/D2871

9 years agoAdd support for the Intel Atom E3800 series SoC (aka Bay Trail).
marcel [Sat, 20 Jun 2015 04:02:33 +0000 (04:02 +0000)]
Add support for the Intel Atom E3800 series SoC (aka Bay Trail).

Sponsored by: XipLink, Inc

9 years agoRemove device queue freeze handling and replace it with dummy.
mav [Sat, 20 Jun 2015 03:40:19 +0000 (03:40 +0000)]
Remove device queue freeze handling and replace it with dummy.

At this point CTL has no known use case for device queue freezes.
Same time existing (considered to be broken) code was found to cause
modify-after-free issues.

Discussed with: ken
MFC after: 1 week

9 years agoUse .CURDIR in soelim's include path instead of SRCDIR
bapt [Sat, 20 Jun 2015 00:17:57 +0000 (00:17 +0000)]
Use .CURDIR in soelim's include path instead of SRCDIR
This fixes build when a user has defined SRCDIR in make.conf as required by
some ports

9 years agoReadd merge.awk forgotten while importing the old vi documentation directly into
bapt [Sat, 20 Jun 2015 00:13:28 +0000 (00:13 +0000)]
Readd merge.awk forgotten while importing the old vi documentation directly into
the tree.

Do not rely on SRCDIR to find the merge.awk script but use .CURDIR
Fix a long standing bug making the generated documents never including the index

9 years agoRefactor xbd_queue_cb, extracting the code which converts bus_dma segments
cperciva [Sat, 20 Jun 2015 00:02:03 +0000 (00:02 +0000)]
Refactor xbd_queue_cb, extracting the code which converts bus_dma segments
into blkif segments, and moving it into a new function.  This will be used
by upcoming support for indirect-segment blkif requests.

This commit should not result in any functional changes.

9 years agoFix path to waagent.
gjb [Fri, 19 Jun 2015 23:03:05 +0000 (23:03 +0000)]
Fix path to waagent.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agochange the KASSERT so it is meaningful, var is unsigned, so even
jmg [Fri, 19 Jun 2015 22:42:26 +0000 (22:42 +0000)]
change the KASSERT so it is meaningful, var is unsigned, so even
when it wraps, it's still >= 0...

Reported by: Coverity
CID: 1017564

9 years agoMinor clean up to xbd_queue_cb:
cperciva [Fri, 19 Jun 2015 22:40:58 +0000 (22:40 +0000)]
Minor clean up to xbd_queue_cb:
* nsegs must be at most BLKIF_MAX_SEGMENTS_PER_REQUEST (since we specify
  that limit to bus_dma_tag_create), so KASSERT that rather than silently
  adjusting the request.
* block_segs is now a synonym for nsegs, so garbage collect that variable.
* nsegs is never read during or after the while loop, so remove the dead
  decrement from the loop.

These were all left behind from the pre-r284296 support for a "segment
block" extension.

9 years agoProvide bug4bug workaround for certain dumbiness of the u-boot's API_env_enum
sobomax [Fri, 19 Jun 2015 22:24:58 +0000 (22:24 +0000)]
Provide bug4bug workaround for certain dumbiness of the u-boot's API_env_enum
function, which is expected to set returned env to NULL upon reaching the end
of the environment list but fails to do so in certain cases. The respective
u-boot code looks like the following (HEAD at the time of this commit):

--- api.c ---
 496 static int API_env_enum(va_list ap)
 ...
 510                 *next = last;
 511
 512                 for (i = 0; env_get_char(i) != '\0'; i = n + 1) {
 513                         for (n = i; env_get_char(n) != '\0'; ++n) {
 514                                 if (n >= CONFIG_ENV_SIZE) {
 515                                         /* XXX shouldn't we set *next = NULL?? */
 516                                         return 0;
 517                                 }
 518                         }
-------------

The net result is that any unfortunate user of the loader's ub_env_enum()
function hitting this condition would be trapped in the infinite loop, as
the main use pattern of ub_env_enum() is basically the following:

while ((env = ub_env_enum(env)) != NULL) { DO STUFF }

Which would stuck forever with the last element.

9 years agoFix two KTRACE related bugs.
tuexen [Fri, 19 Jun 2015 21:55:12 +0000 (21:55 +0000)]
Fix two KTRACE related bugs.

Reported by: Coverity
CID: 10180581018060

MFC after: 3 days

9 years agoFix typo in baudrate initialization that was causing ixl to be seen as
gallatin [Fri, 19 Jun 2015 21:40:26 +0000 (21:40 +0000)]
Fix typo in baudrate initialization that was causing ixl to be seen as
a 4GbE NIC, rather than a 40GbE NIC.

Reviewed by: Eric Joyner <eric.joyner@intel.com>
MFC after: 3 days
Sponsored by: Netflix

9 years agoFix markups and change e.g./eg. to e.g.,.
delphij [Fri, 19 Jun 2015 21:35:56 +0000 (21:35 +0000)]
Fix markups and change e.g./eg. to e.g.,.

MFC after: 2 weeks

9 years agoFix markups.
delphij [Fri, 19 Jun 2015 21:35:24 +0000 (21:35 +0000)]
Fix markups.

MFC after: 2 weeks

9 years agoInterim fix for "Login not found" error.
dteske [Fri, 19 Jun 2015 21:32:20 +0000 (21:32 +0000)]
Interim fix for "Login not found" error.

PR: bin/196514
MFC after: 3 days
X-MFC-to: stable/10

9 years agoBack out contested change until dispute is resolved. This proved to be
imp [Fri, 19 Jun 2015 21:30:45 +0000 (21:30 +0000)]
Back out contested change until dispute is resolved. This proved to be
more contentious than I expected.

9 years agoDocument kern.cam.ada.legacy_aliases, while I'm there also fix some typos.
delphij [Fri, 19 Jun 2015 21:26:06 +0000 (21:26 +0000)]
Document kern.cam.ada.legacy_aliases, while I'm there also fix some typos.

MFC after: 2 weeks

9 years agoRemove uneeded NULL check since malloc the malloc is now M_WAITOK
sbruno [Fri, 19 Jun 2015 20:35:17 +0000 (20:35 +0000)]
Remove uneeded NULL check since malloc the malloc is now M_WAITOK

Submitted by: mjg

9 years agoMust have one of either M_WAITOK or M_NOWAIT, read the man page bruno.
sbruno [Fri, 19 Jun 2015 19:57:39 +0000 (19:57 +0000)]
Must have one of either M_WAITOK or M_NOWAIT, read the man page bruno.

Submitted by: mjg

9 years agoDon't leak sockets.
tuexen [Fri, 19 Jun 2015 19:36:29 +0000 (19:36 +0000)]
Don't leak sockets.

Reported by: Coverity
CID: 1306785

MFC after: 3 days

9 years agoFeedback from commit r284535
sbruno [Fri, 19 Jun 2015 18:57:36 +0000 (18:57 +0000)]
Feedback from commit r284535

davide:  imgact_binmisc_clear_entry() needs to use atomic ops to remove
the enable bit.

kib:  M_NOWAIT is not warranted and comment is invalid.

9 years agosx_sunlock for sx_slock
sjg [Fri, 19 Jun 2015 17:34:59 +0000 (17:34 +0000)]
sx_sunlock for sx_slock

9 years agofilemon_pid_check needs to hold proctree_lock
sjg [Fri, 19 Jun 2015 17:19:20 +0000 (17:19 +0000)]
filemon_pid_check needs to hold proctree_lock

Reviewed by: kib
MFC after: few days

9 years agoFix bug in the ubldr introduced in the rev.283035. The new code
sobomax [Fri, 19 Jun 2015 17:00:36 +0000 (17:00 +0000)]
Fix bug in the ubldr introduced in the rev.283035. The new code
fails to properly consider memory regions when the loader is
located below of those regions or engulfs their lower limit. This
results in "not enough RAM to load kernel" panic, which is totally
bogus. On top of that, there are some variables that can be left
unitialized in those cases, which might cause it fail with memory
access violation instead of panic while trying to load kernel to
a wrong or non-existing address of memory.

Augment the code to properly deal with the loader being below or
at the lower bound of the memory region in question. Also, don't
leave ununitialized variables behind.

Reviewed by: ian

9 years agoMove include of make.conf back to its old position.
sjg [Fri, 19 Jun 2015 14:56:24 +0000 (14:56 +0000)]
Move include of make.conf back to its old position.

This means moving include of local.sys.mk and src.sys.mk too.
Introduce new includes to take the early slot, for the purpose
of being able to influence toolchains and the like.

Differential Revision: D2860
Reviewed by: imp

9 years agoFix fallouts from r284590
bapt [Fri, 19 Jun 2015 14:20:21 +0000 (14:20 +0000)]
Fix fallouts from r284590

Reported by: kib

9 years agoWhen setting the primary address, return an error whenever it fails.
tuexen [Fri, 19 Jun 2015 12:48:22 +0000 (12:48 +0000)]
When setting the primary address, return an error whenever it fails.

MFC after: 3 days

9 years agoRegenerate usb.conf .
hselasky [Fri, 19 Jun 2015 09:37:37 +0000 (09:37 +0000)]
Regenerate usb.conf .

MFC after: 1 week

9 years agoRestore the td_cookie value for the tmpfs directory entry which was a
kib [Fri, 19 Jun 2015 07:25:15 +0000 (07:25 +0000)]
Restore the td_cookie value for the tmpfs directory entry which was a
dup entry, upon detach from the parent directory.  If the node is
renamed, the entry is re-attached at the different directory, and
invalud cookie value triggers assert (or corrupts directory rb tree,
it seems).

Reported by: clusteradm (gjb, antoine)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMFV r284412: 5911 ZFS "hangs" while deleting file
avg [Fri, 19 Jun 2015 06:58:05 +0000 (06:58 +0000)]
MFV r284412: 5911 ZFS "hangs" while deleting file

Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@46e1baa6cf6d5432f5fd231bb588df8f9570c858

https://www.illumos.org/issues/5911
Sometimes ZFS appears to hang while deleting a file. It is actually
making slow progress at the file deletion, but other operations
(administrative and writes via the data path) "hang" until the file
removal completes, which can take a long time if the file has many
blocks. The deletion (or most of it) happens in a single txg, and the
sync thread spends most of its time reading indirect blocks via this
stack trace:
swtch+0x141()
cv_wait+0x70()
zio_wait+0x5b()
dbuf_read+0x2c0()
free_children+0x50()
free_children+0x12a()
free_children+0x12a()
free_children+0x12a()
dnode_sync_free_range_impl+0xdf()
dnode_sync_free_range+0x52()
range_tree_vacate+0x65()
dnode_sync+0x1d8()
dmu_objset_sync_dnodes+0x77()
dmu_objset_sync+0x19f()
dsl_dataset_sync+0x51()
dsl_pool_sync+0x9a()
spa_sync+0x2ff()
txg_sync_thread+0x21f()
thread_start+8()
One way to reproduce the problem is if we are over the arc_meta_limit,
e.g. because lots of indirect blocks are pinned because we have L0
dbufs under them.  It could be that most of the L1 indirects are cached,
in which case when dmu_free_long_range_impl() calls dmu_tx_hold_free(),
it will complete very quickly. This allows dmu_free_long_range_impl() to
put many (perhaps all of its) transactions in the same TXG. However,
dmu_free_long_range_impl() calls dnode_evict_dbufs (and
dnode_free_range()), which removes the L0 dbufs, thus reducing the hold
count on the L1 indirect blocks above it, allowing them to be evicted.
Because we are over the arc_meta_limit(), these L1 blocks will be
evicted ASAP. Thus when we get to syncing context, the L1 indirects are
no longer cached and must be read in.

Obtained from: illumos
MFC after: 15 days

9 years agoAdd USB gold driver to default kernel build.
hselasky [Fri, 19 Jun 2015 06:48:55 +0000 (06:48 +0000)]
Add USB gold driver to default kernel build.

9 years agoillums compat: use flsl/flsll for highbit/highbit64
avg [Fri, 19 Jun 2015 06:41:53 +0000 (06:41 +0000)]
illums compat: use flsl/flsll for highbit/highbit64

Do that only when when fast inline versions are available.
At the moment that can be the case only in the kernel and not for all
platforms.

The original code uses the binary search and that's kept as a fallback.
This is a micro optimization.

Differential Revision: https://reviews.freebsd.org/D2839
Reviewed by: delphij, mahrens, mav
MFC after: 17 days

9 years agoInstall loader(8) and zfsloader(8) only once
bapt [Fri, 19 Jun 2015 05:42:24 +0000 (05:42 +0000)]
Install loader(8) and zfsloader(8) only once

Differential Revision: https://reviews.freebsd.org/D2841
Reviewed by: imp

9 years agoAdd the ability to detect ZFS and GELI encrypted file systems to fstyp(8)
allanjude [Fri, 19 Jun 2015 05:09:02 +0000 (05:09 +0000)]
Add the ability to detect ZFS and GELI encrypted file systems to fstyp(8)

Functionality is hidden behind the -u flag to avoid confusing automounters

PR: 200823
Reviewed by: asomers, eadler, wblock (man page)
Approved by: trasz
MFC after: 10 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D2045

9 years agoFirst cut at attempting to buffer frames until we see a beacon.
adrian [Fri, 19 Jun 2015 01:44:17 +0000 (01:44 +0000)]
First cut at attempting to buffer frames until we see a beacon.

The iwn(4) firmware forgets most of its channel state after an RXON
command.  This means that any beacons its seen on passive 5GHz channels
are forgotten upon an association/authorisation request.
This unfortuantely means that 5GHz association almost always fails -
the assoc and/or auth frames are dropped with a status of "passive
channel, haven't seen a beacon yet." (0x90.)

So:

* add an xmit queue, global, to buffer frames
* modify the xmit path to use the mbuf tag from net80211
  to specify raw frame details
* buffer xmit frames from both raw and non-raw paths
* if a beacon is seen in the RX path, schedule a taskqueue to
  send said frames and un-buffer things.
* flush frames during state change back to INIT, or NIC
  down/up/detach.

This isn't the final shape I'd like this to be in but it certainly
is better than 5GHz "not working at all".

Tested:

* Intel 5100, STA mode (before spilling coffee)
* Intel 5300, STA mode (after spilling coffee)

Story:

* This has been bugging me at work for months, which I just
  worked around by throwing an ath(4) into my Lenovo T400 cardbus
  slot.

* Our ops director discovered indeed FreeBSD runs well on the
  Lenovo T420p, except for that pesky 5GHz thing.  So now developers
  also can have a T420p running FreeBSD to do work with.
  Their #1 feedback to me - "boy it'd be nice if 5GHz wifi worked."

* .. then, I was at NANOG but stuck with 5GHz only wifi and no ath(4)
  NIC to put in a laptop - and I snapped.

Thus, the reason this is actually work related.

MFC after: 2 weeks
Sponsored by: Norse Corp, Inc.

9 years agoAdd in library routines not supplied by gcc-4.9 but required by the kernel.
adrian [Fri, 19 Jun 2015 01:21:10 +0000 (01:21 +0000)]
Add in library routines not supplied by gcc-4.9 but required by the kernel.

Reviewed by: imp

9 years agoSynaptics: fix a problem with trackpoint passthrough.
rpaulo [Fri, 19 Jun 2015 00:10:30 +0000 (00:10 +0000)]
Synaptics: fix a problem with trackpoint passthrough.

There was a inconsistency which led to enable passthrough commands
being interpreted as actual touchpad commands.

Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after: 1 week

9 years agoMerge ACPICA 20150619.
jkim [Thu, 18 Jun 2015 23:14:45 +0000 (23:14 +0000)]
Merge ACPICA 20150619.

9 years agoFix off-by-one error in fstyp(8) and geom_label(4) that made them use
trasz [Thu, 18 Jun 2015 21:55:55 +0000 (21:55 +0000)]
Fix off-by-one error in fstyp(8) and geom_label(4) that made them use
a single space (" ") as a CD9660 label name when no label was present.
Similar problem was also present in msdosfs label recognition.

PR: 200828
Differential Revision: https://reviews.freebsd.org/D2830
Reviewed by: asomers@, emaste@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoFix a typo introduced in r262209.
jkim [Thu, 18 Jun 2015 21:18:43 +0000 (21:18 +0000)]
Fix a typo introduced in r262209.

MFC after: 3 days

9 years agoAdd Makefile.azure, used to upload VHD images to the
gjb [Thu, 18 Jun 2015 19:20:00 +0000 (19:20 +0000)]
Add Makefile.azure, used to upload VHD images to the
Microsoft Azure environment, similar to the EC2 AMIs.

MFC after: 3 days
Tested with: stable/10@r284517 (patched)
Sponsored by: The FreeBSD Foundation

9 years agoFix possible use after free in encap[46]_input().
ae [Thu, 18 Jun 2015 18:28:38 +0000 (18:28 +0000)]
Fix possible use after free in encap[46]_input().
There is small window, when encap_detach() can free matched entry
directly after we release encapmtx. Instead of use pointer to the
matched entry, save pointers to needed variables from this entry
and use them after release mutex.

Pass argument stored in the encaptab entry to encap_fillarg(), instead
of pointer to matched entry. Also do not allocate new mbuf tag, when
argument that we plan to save in this tag is NULL.

Also make encaptab variable static.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoImport ACPICA 20150619.
jkim [Thu, 18 Jun 2015 17:27:40 +0000 (17:27 +0000)]
Import ACPICA 20150619.

9 years agoAdd missing driver for TDA19988 HDMI framer
gonzo [Thu, 18 Jun 2015 16:51:49 +0000 (16:51 +0000)]
Add missing driver for TDA19988 HDMI framer

9 years agoDocument title should be in CAPS.
brueffer [Thu, 18 Jun 2015 16:31:32 +0000 (16:31 +0000)]
Document title should be in CAPS.