]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoAdd support for netmap in GENERIC by default.
gnn [Wed, 5 Nov 2014 06:22:37 +0000 (06:22 +0000)]
Add support for netmap in GENERIC by default.

9 years agoIn alloc_pread() and kern_pread(), print errors only when DEBUG is
marcel [Wed, 5 Nov 2014 04:18:41 +0000 (04:18 +0000)]
In alloc_pread() and kern_pread(), print errors only when DEBUG is
defined. An error is not fatal and is supposed to be handled by the
caller.

Obtained from: Juniper Networks, Inc.

9 years agoDocument that wc(1) supports libxo(3).
marcel [Wed, 5 Nov 2014 04:09:10 +0000 (04:09 +0000)]
Document that wc(1) supports libxo(3).

9 years agoConvert to use libxo.
marcel [Wed, 5 Nov 2014 04:02:25 +0000 (04:02 +0000)]
Convert to use libxo.

Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.

9 years agoTemporarily _disable_ compilation of dpv(3) and dpv(1).
dteske [Wed, 5 Nov 2014 02:58:02 +0000 (02:58 +0000)]
Temporarily _disable_ compilation of dpv(3) and dpv(1).
Will revisit this to find out how to solve the ordering
issue in buildworld (potentially `make -j' specific).

Reviewed by: shurd

9 years agoFix buildworld by adding DPADD= to libdpv [dpv(3)] Makefile
dteske [Wed, 5 Nov 2014 02:36:28 +0000 (02:36 +0000)]
Fix buildworld by adding DPADD= to libdpv [dpv(3)] Makefile
NB: Should also address `make -j' building
Remove "+" from "+=" in assignments to DPADD/LDADD while here.
NB: Also move CFLAGS for style measure.

Reviewed by: shurd
MFC after: 21 days
X-MFC-to: stable/10 stable/9
X-MFC-with: 274116 274120 274121

9 years agoExtend struct ucred with group table.
mjg [Wed, 5 Nov 2014 02:08:37 +0000 (02:08 +0000)]
Extend struct ucred with group table.

This saves one malloc + free with typical cases and better utilizes
memory.

Submitted by: Tiwei Bie <btw mail.ustc.edu.cn> (slightly modified)
X-Additional: JuniorJobs project

9 years agoMake libdpv [dpv(3)] WARNS=6 clean for clang on -CURRENT.
dteske [Wed, 5 Nov 2014 01:57:32 +0000 (01:57 +0000)]
Make libdpv [dpv(3)] WARNS=6 clean for clang on -CURRENT.
NB: aka unbreak the build

Reviewed by: shurd
MFC after: 21 days
X-MFC-to: stable/10 stable/9
X-MFC-with: 274116 274120

9 years agoFix build-error (pointy hat; didn't merge full up-to-date code)
dteske [Wed, 5 Nov 2014 01:47:25 +0000 (01:47 +0000)]
Fix build-error (pointy hat; didn't merge full up-to-date code)

MFC after: 21 days
X-MFC-to: stable/10 stable/9
X-MFC-with: 274116

9 years agoAdd EXAMPLES-section entry for new key+=append syntax of sysrc(8).
dteske [Wed, 5 Nov 2014 01:24:44 +0000 (01:24 +0000)]
Add EXAMPLES-section entry for new key+=append syntax of sysrc(8).

MFC after: 3 days
X-MFC-to: stable/10 stable/9
X-MFC-with: 274068
Thanks to: @SeanChittenden

9 years agoRemove old hack abusing domattach from NFS code.
melifaro [Wed, 5 Nov 2014 00:58:01 +0000 (00:58 +0000)]
Remove old hack abusing domattach from NFS code.

According to IANA RPC uaddr registry, there are no AFs
except IPv4 and IPv6, so it's not worth being too abstract here.

Remove ne_rtable[AF_MAX+1] and use explicit per-AF radix tries.
Use own initialization without relying on domattach code.

While I admit that this was one of the rare places in kernel
networking code which really was capable of doing multi-AF
without any AF-depended code, it is not possible anymore to
rely on dom* code.

While here, change terrifying "Invalid radix node head, rn:" message,
to different non-understandable "netcred already exists for given addr/mask",
but less terrifying. Since we know that rn_addaddr() returns NULL if
the same record already exists, we should provide more friendly error.

MFC after: 1 month

9 years agovt(4): Support syscons' SC_HISTORY_SIZE to configure history size
dumbbell [Tue, 4 Nov 2014 23:51:35 +0000 (23:51 +0000)]
vt(4): Support syscons' SC_HISTORY_SIZE to configure history size

Therefore, to set histry size to 2000 lines, add the following line to
your kernel configuration file:
    options SC_HISTORY_SIZE=2000

The default history remains at 500 lines.

MFC after: 1 week

9 years agoAdd new libraries/utilities for data throughput visualization.
dteske [Tue, 4 Nov 2014 23:46:01 +0000 (23:46 +0000)]
Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

Reviews: D714
Reviewed by: jelischer, shurd
Discussed at: MeetBSD California 2014 Vendor/Dev Summit
Discussed on: -current
MFC after: 21 days
X-MFC-to: stable/10 stable/9

9 years ago[SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
des [Tue, 4 Nov 2014 23:29:29 +0000 (23:29 +0000)]
[SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
[SA-14:26] Fix remote command execution in ftp(1).

Approved by: so (des)

9 years agoPartially fix indentation issues to improve readability helping cooperation with
bapt [Tue, 4 Nov 2014 23:10:58 +0000 (23:10 +0000)]
Partially fix indentation issues to improve readability helping cooperation with
Dragonfly folks

PR: 194785
Submitted by: François Tigeot (ftigeot@wolfpond.org)

9 years agoWhen reseeding the DPRNG, we're supposed to hash the current key and
des [Tue, 4 Nov 2014 23:02:19 +0000 (23:02 +0000)]
When reseeding the DPRNG, we're supposed to hash the current key and
some accumulated entropy twice and use that as the new key.  Due to a
typo, we were using the output of the first hash round instead of the
second.  Correct this, but eliminate temp[] since we can reuse hash[].
Also add comments explaining what is going on and why.

Noticed by: Sami Farin <sami.farin@gmail.com>
Reviewed by: markm@
Approved by: so (des)

9 years agoFix mis-spelling of bits and types names in the
kib [Tue, 4 Nov 2014 19:56:04 +0000 (19:56 +0000)]
Fix mis-spelling of bits and types names in the
default_pager_putpages() and swap_pager_putpages().
It is the same fix as was done for vnode_pager_putpages()
in r271586.

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

9 years agoEliminate a stale, i386-specific comment.
alc [Tue, 4 Nov 2014 18:52:59 +0000 (18:52 +0000)]
Eliminate a stale, i386-specific comment.

9 years agoFix VOLUME_LABEL when BRANCH contains non-alpha
gjb [Tue, 4 Nov 2014 17:24:13 +0000 (17:24 +0000)]
Fix VOLUME_LABEL when BRANCH contains non-alpha
characters, in particular '-' and '.'.

Submitted by: des
Tested by: des
MFC after: 3 days
X-MFC-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoAdd a new thread state "spinning" to schedgraph and add tracepoints at the
jhb [Tue, 4 Nov 2014 16:35:56 +0000 (16:35 +0000)]
Add a new thread state "spinning" to schedgraph and add tracepoints at the
start and stop of spinning waits in lock primitives.

9 years agoBind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close
jhb [Tue, 4 Nov 2014 16:30:42 +0000 (16:30 +0000)]
Bind Ctrl-Q as a global hotkey to exit.  Bind Ctrl-W as a hotkey to close
dialogs.

9 years agoFix the Jenkins test run by skipping the negative testcases earlier
ngie [Tue, 4 Nov 2014 16:02:46 +0000 (16:02 +0000)]
Fix the Jenkins test run by skipping the negative testcases earlier

The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

% kyua report-junit > ~/report.junit
% python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13

9 years agoSimplify logic a bit. Ensure data buffer is properly aligned,
hselasky [Tue, 4 Nov 2014 11:29:49 +0000 (11:29 +0000)]
Simplify logic a bit. Ensure data buffer is properly aligned,
especially for platforms where unaligned access is not allowed. Make
it possible to override the small buffer size.

A simple continuous read string test using libusb showed a reduction
in CPU usage from roughly 10% to less than 1% using a dual-core GHz
CPU, when the malloc() operation was skipped for small buffers.

MFC after: 2 weeks

9 years agoRemove unused variable.
melifaro [Tue, 4 Nov 2014 10:25:52 +0000 (10:25 +0000)]
Remove unused variable.

Found by: Coverity
CID: 1245739

9 years agoPut "break" after err() to please coverity.
melifaro [Tue, 4 Nov 2014 10:21:34 +0000 (10:21 +0000)]
Put "break" after err() to please coverity.

Reported by: Coverity
CID: 1250795

9 years agoEnable vt(4) by default
dumbbell [Tue, 4 Nov 2014 10:18:03 +0000 (10:18 +0000)]
Enable vt(4) by default

vt(4) is a new console driver which brings features such as:
    o  Support for Unicode and double-width characters
    o  Integration with the KMS kernel video drivers
    o  Support for UEFI

You may need to update your console settings in /etc/rc.conf, most
probably the keymap. During boot, /etc/rc.d/syscons will indicate what
you need to do.

vt(4) still has issues and lacks some features compared to syscons(4).
See the wiki for up-to-date information:
    https://wiki.freebsd.org/Newcons

If you want to keep using syscons(4), you can do so by adding the
following line to /boot/loader.conf:
    kern.vty=sc

Differential Revision: https://reviews.freebsd.org/D1005
Discussed with: emaste@, nwhitehorn@, ray@
Relnotes: yes

9 years agoRevert agp_intel.c part of the r274040 for now. There is a confusion
kib [Tue, 4 Nov 2014 09:56:58 +0000 (09:56 +0000)]
Revert agp_intel.c part of the r274040 for now.  There is a confusion
on my part about north bridge/GPU pci ids and use of aperture.

Leave the agp_intel.c out of static compilation on amd64, it makes the
things consistent with agp.ko.

Pointed out by: tijl
Sponsored by: The FreeBSD Foundation
MFC after: 13 days

9 years agoconvert .Nm to proper .Xr's...
jmg [Tue, 4 Nov 2014 08:22:08 +0000 (08:22 +0000)]
convert .Nm to proper .Xr's...

9 years agoFix residual copy/paste in r274080.
mav [Tue, 4 Nov 2014 07:50:20 +0000 (07:50 +0000)]
Fix residual copy/paste in r274080.

MFC after: 1 week

9 years agoImprove error handling around duplicate lun and port enable.
mav [Tue, 4 Nov 2014 07:44:24 +0000 (07:44 +0000)]
Improve error handling around duplicate lun and port enable.

This fixes kernel panic if port enabled twice and then disabled.

MFC after: 1 week

9 years agoImport proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
ngie [Tue, 4 Nov 2014 05:02:22 +0000 (05:02 +0000)]
Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
was removed from the build

Pointyhat to: me (again, for not running make delete-old after running test builds)

9 years agoCommit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386
ngie [Tue, 4 Nov 2014 02:00:07 +0000 (02:00 +0000)]
Commit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386
build

Pointyhat to: me (forgot to svn add it sooner)

9 years agoAs an optimization (in simple, well used cases) only call cat ${.ALLSRC} when
ngie [Tue, 4 Nov 2014 01:57:31 +0000 (01:57 +0000)]
As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when
generating files from various sources instead of calling cat ${.ALLSRC} | sed

The perl case was skipped because it's not being used in the tree at this time

9 years agoImprove the ability to cancel an in-flight request by using an
tychon [Tue, 4 Nov 2014 01:06:33 +0000 (01:06 +0000)]
Improve the ability to cancel an in-flight request by using an
interrupt, via SIGCONT, to force the read or write system call to
return prematurely.

Reviewed by: grehan

9 years agoAdd reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately
ngie [Tue, 4 Nov 2014 00:56:25 +0000 (00:56 +0000)]
Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately
500 new testcases

Various TODOs have been sprinkled around the Makefiles for items that even need
to be ported (missing features), testcases have issues with building/linking, or
issues at runtime.

A variant of this code has been tested extensively on amd64 and i386
10-STABLE/11-CURRENT for several months without issue. It builds on other
architectures, but the code will remain off until I have prove it works on
virtual hardware or real hardware on other architectures

In collaboration with: pho, Casey Peel <casey.peel@isilon.com>
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd Makefile snippet to ease porting NetBSD testcases to FreeBSD from
ngie [Tue, 4 Nov 2014 00:19:10 +0000 (00:19 +0000)]
Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
contrib/netbsd-tests

This Makefile snippet handles polluting testcases with -lnetbsd, specific
headers for ATF version differences, and does necessary rewriting for the
testcases to match the format discussed on the TestSuite wiki page
(t_<foo> -> <foo>_test)

One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
(e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet

Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH

C++ analogs aren't currently implemented.

The imported testcases will be cleaned up to use this Makefile snippet pseudo
"API".

9 years agoFollow-up to r255036; remove beforeinstall directives from bsdconfig(8)
dteske [Tue, 4 Nov 2014 00:14:38 +0000 (00:14 +0000)]
Follow-up to r255036; remove beforeinstall directives from bsdconfig(8)
Makefile's, fixing concurrent installworld (`make -j17 installworld').

Thanks to: delphij, emaste
Reviewed by: delphij
MFC after: 3 days
X-MFC-to: stable/10, stable/9

9 years agoFinish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
ngie [Tue, 4 Nov 2014 00:04:36 +0000 (00:04 +0000)]
Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
FreeBSD, and always assume long long double exists on FreeBSD

Submitted by: pho

9 years agoAdd key+=append syntax to sysrc(8).
dteske [Mon, 3 Nov 2014 23:43:41 +0000 (23:43 +0000)]
Add key+=append syntax to sysrc(8).

Reviewed by: shurd
MFC after: 3 days
X-MFC-to: stable/10 stable/9

9 years agorpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
ngie [Mon, 3 Nov 2014 23:37:51 +0000 (23:37 +0000)]
rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
like NetBSD

Submitted by: pho

9 years agoPort lib/libc/ssp to FreeBSD
ngie [Mon, 3 Nov 2014 23:36:41 +0000 (23:36 +0000)]
Port lib/libc/ssp to FreeBSD

In most cases, the buffers and data were resized, but when dealing with the
helpers, some of the code was adjusted to fail more reliably

Submitted by: pho

9 years agoAdd VirtIO console to the x86 NOTES and files
bryanv [Mon, 3 Nov 2014 22:37:10 +0000 (22:37 +0000)]
Add VirtIO console to the x86 NOTES and files

Requested by: jhb

9 years agoRemove MAINTAINER line for binutils. It has not been maintained by
bdrewery [Mon, 3 Nov 2014 22:19:44 +0000 (22:19 +0000)]
Remove MAINTAINER line for binutils. It has not been maintained by
obrien since 2008.

Approved by: core

9 years agoCreate the tty device after the port is completely initialized
bryanv [Mon, 3 Nov 2014 22:17:25 +0000 (22:17 +0000)]
Create the tty device after the port is completely initialized

This fixes a race with a tty open before the host is the ready.

MFC after: 1 month

9 years agoinet_network on FreeBSD returns NULL when provided "0x" to inet_network
ngie [Mon, 3 Nov 2014 21:26:11 +0000 (21:26 +0000)]
inet_network on FreeBSD returns NULL when provided "0x" to inet_network

Submitted by: pho

9 years agoPort t_db.sh to FreeBSD
ngie [Mon, 3 Nov 2014 21:21:08 +0000 (21:21 +0000)]
Port t_db.sh to FreeBSD

- The blocksize on FreeBSD is 32kB, not 64kB
- Add some detection for MK_DICT == no; /nonexistent is echoed along with
  atf_skip to ensure that the test will fail if dict(..) is called in the
  non-final stage of the pipeline

Submitted by: pho

9 years agoswitch from spaces to tabs to match style and awk...
jmg [Mon, 3 Nov 2014 21:03:54 +0000 (21:03 +0000)]
switch from spaces to tabs to match style and awk...

Pointed out by: brooks

9 years agouse tab instead of spaces like the rest of the file..
jmg [Mon, 3 Nov 2014 19:23:49 +0000 (19:23 +0000)]
use tab instead of spaces like the rest of the file..

9 years agoMove all of the XSAVE support under #ifdef I686_CPU and fix the build
jhb [Mon, 3 Nov 2014 19:16:25 +0000 (19:16 +0000)]
Move all of the XSAVE support under #ifdef I686_CPU and fix the build
without I686_CPU.

9 years agoAdd support for the multiport feature and fix hot plug races
bryanv [Mon, 3 Nov 2014 16:57:01 +0000 (16:57 +0000)]
Add support for the multiport feature and fix hot plug races

MFC after: 1 month

9 years agoFix XEN kernel build.
jhb [Mon, 3 Nov 2014 16:31:31 +0000 (16:31 +0000)]
Fix XEN kernel build.

Pointy hat to: jhb

9 years agovt(4): Start new sentences on their own lines
dumbbell [Mon, 3 Nov 2014 16:01:44 +0000 (16:01 +0000)]
vt(4): Start new sentences on their own lines

Submitted by: brueffer@
MFC after: 1 week

9 years agoRemove unused tests/lib directory
ngie [Mon, 3 Nov 2014 15:40:49 +0000 (15:40 +0000)]
Remove unused tests/lib directory

MFC after: 1 week

9 years agovt(4): Improve the description of kern.vt.fb.modes.$connector
dumbbell [Mon, 3 Nov 2014 15:25:48 +0000 (15:25 +0000)]
vt(4): Improve the description of kern.vt.fb.modes.$connector

Differential Revision: https://reviews.freebsd.org/D1098
Submitted by: emaste@
MFC after: 1 week

9 years agovt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*
dumbbell [Mon, 3 Nov 2014 14:57:41 +0000 (14:57 +0000)]
vt(4): Document kern.vt.fb.default_mode and kern.vt.fb.modes.*

Those tunables are used to set a specific mode in vt(4) instead of using
the default mode.

Differential Revision: https://reviews.freebsd.org/D1098
Reviewed by: ak@, emaste@, kwm@
MFC after: 1 week

9 years agodrm: When reading connector mode tunables, list connectors
dumbbell [Mon, 3 Nov 2014 14:35:07 +0000 (14:35 +0000)]
drm: When reading connector mode tunables, list connectors

... and their associated tunables. This gives a way to know the list of
available connectors, no matter the driver.

The problem is that xrandr(1) can list connectors but it uses a
different naming.

MFC after: 1 week

9 years agoFix misplaced read memory barrier in seq.
mjg [Mon, 3 Nov 2014 13:14:34 +0000 (13:14 +0000)]
Fix misplaced read memory barrier in seq.

Impact on capability races was small: it was possible to get a spurious
ENOTCAPABLE (early return), but it was not possible to bypass checks.

Tidy up some comments.

9 years agoClarify TSO segment limit comment and remove two TABs to make lines a
hselasky [Mon, 3 Nov 2014 13:02:58 +0000 (13:02 +0000)]
Clarify TSO segment limit comment and remove two TABs to make lines a
bit shorter.

Sponsored by: Mellanox Technologies

9 years agoRestore spares used in "struct tcpcb" and bump "__FreeBSD_version" to
hselasky [Mon, 3 Nov 2014 13:01:58 +0000 (13:01 +0000)]
Restore spares used in "struct tcpcb" and bump "__FreeBSD_version" to
indicate need for kernel module re-compilation.

Sponsored by: Mellanox Technologies

9 years agoIf the start bit, PxCMD.ST, is cleared and nothing is in-flight then
tychon [Mon, 3 Nov 2014 12:55:31 +0000 (12:55 +0000)]
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

Reviewed by: grehan

9 years agoagp_intel.c provides support for AGP on Intel chipsets from 440/BX to
kib [Mon, 3 Nov 2014 11:49:35 +0000 (11:49 +0000)]
agp_intel.c provides support for AGP on Intel chipsets from 440/BX to
875.  This intersects with the agp_i810.c, which supports all Intels
from i810 to Core i5/7.  Both agp_intel.c and agp_i810.c are compiled
into kernel when device agp is specified in config, and agp_i810
attach seems to be selected by chance due to linking order.

Strip support for 810 and later from agp_intel.c.  Since 440-class
chipsets do not support any long-mode capable CPUs, remove agp_intel.c
from amd64 kernel file list.  Note that agp_intel.c is not compiled
into agp.ko on amd64 already.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoClean up confusing comment. Move it to the place of code which is
kib [Mon, 3 Nov 2014 11:29:08 +0000 (11:29 +0000)]
Clean up confusing comment.  Move it to the place of code which is
talked about.  Explain where the mentioned trampoline located
(usermode), and the fact that attempt to exit last thread is denied in
kernel (by delegating the work to usermode).

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agos/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
trasz [Mon, 3 Nov 2014 11:15:51 +0000 (11:15 +0000)]
s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
nicer code.

Sponsored by: The FreeBSD Foundation

9 years agoRemove check for obsolete FreeBSD versions
bapt [Mon, 3 Nov 2014 11:11:45 +0000 (11:11 +0000)]
Remove check for obsolete FreeBSD versions

PR: 194517
Submitted by: François Tigeot <ftigeot@wolfpond.org>

9 years agos/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.
trasz [Mon, 3 Nov 2014 11:05:23 +0000 (11:05 +0000)]
s/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.

Sponsored by: The FreeBSD Foundation

9 years agodrm: Take vt(4) default mode from loader tunables
dumbbell [Mon, 3 Nov 2014 10:42:27 +0000 (10:42 +0000)]
drm: Take vt(4) default mode from loader tunables

By default, vt(4) gets the "preferred mode" from DRM, when using a DRM
video driver as its backend. The preferred mode is usually the native
screen resolution.

Now, if this mode isn't appropriate, a user can use loader tunables to
select a mode. The tunables are read in the following order:
    1. kern.vt.fb.modes.$connector_name
    2. kern.vt.fb.default_mode

For example, to set a 1024x768 mode, no matter the connector:
    kern.vt.fb.default_mode="1024x768"

To set a 800x600 mode only on the laptop builtin screen:
    kern.vt.fb.modes.LVDS-1="800x600"

MFC after: 1 week

9 years agoWhen other end of the pipe closed during the write, but some bytes
kib [Mon, 3 Nov 2014 10:01:56 +0000 (10:01 +0000)]
When other end of the pipe closed during the write, but some bytes
were written, return short write instead of EPIPE.

Update comment.

Discussed with: bde (long time ago)
MFC after: 2 weeks

9 years agoRequire root when running the pw_delete and pw_modify test programs (pw(8)
ngie [Mon, 3 Nov 2014 09:26:39 +0000 (09:26 +0000)]
Require root when running the pw_delete and pw_modify test programs (pw(8)
requires it)

9 years agoRemove explicit KYUAFILE=yes from tests/sys/Makefile
ngie [Mon, 3 Nov 2014 09:17:09 +0000 (09:17 +0000)]
Remove explicit KYUAFILE=yes from tests/sys/Makefile

This causes the directory traversing Kyuafile to be installed, which in turn
causes tests/sys/pjdfstest to always be run from /usr/tests/sys

Let KYUAFILE default to auto, so the file generated by suite.test.mk gets
installed instead

MFC after: 1 week

9 years agoReduce boot verbosity.
hselasky [Mon, 3 Nov 2014 09:02:09 +0000 (09:02 +0000)]
Reduce boot verbosity.

MFC: 3 days

9 years agoProvide an on-stack temporary buffer for small ioctl requests.
mjg [Mon, 3 Nov 2014 07:46:51 +0000 (07:46 +0000)]
Provide an on-stack temporary buffer for small ioctl requests.

9 years agoIntegrate pjdfstest test suite execution into kyua
ngie [Mon, 3 Nov 2014 07:18:42 +0000 (07:18 +0000)]
Integrate pjdfstest test suite execution into kyua

pjdfstest execution is opt-in and must be done as root due to some of the
assumptions made by the test suite and lack of error checking in the non-root
case

A description of how to execute pjdfstest with kyua is provided in
share/pjdfstest/README

Phabric: D824 (an earlier prototype patch)
MFC after: 1 month
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division

9 years agofiledesc: plus sys/kdb.h include which crept in with r274007
mjg [Mon, 3 Nov 2014 06:24:43 +0000 (06:24 +0000)]
filedesc: plus sys/kdb.h include which crept in with r274007

9 years agoIntegrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test
ngie [Mon, 3 Nov 2014 06:07:55 +0000 (06:07 +0000)]
Integrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test

- Suffix useradd/userdel commands with pw
- Remove the atf_expect_fail for bin/39546

Phabric: D921
Reviewed by: brd
Sponsored by: EMC / Isilon Storage Division

9 years agofiledesc: plug unnecessary fdp NULL checks in fdescfreee and fdcopy
mjg [Mon, 3 Nov 2014 05:12:17 +0000 (05:12 +0000)]
filedesc: plug unnecessary fdp NULL checks in fdescfreee and fdcopy

Anything reaching these functions has fd table.

9 years agoDon't assert random_adaptors_lock in random_adaptor_read_rate().
delphij [Mon, 3 Nov 2014 04:41:29 +0000 (04:41 +0000)]
Don't assert random_adaptors_lock in random_adaptor_read_rate().

Reported by: many
Pointy hat to: delphij (for not testing the commit with WITNESS)
Approved by: so

9 years agofiledesc: create a dedicated zone for struct filedesc0
mjg [Mon, 3 Nov 2014 04:16:04 +0000 (04:16 +0000)]
filedesc: create a dedicated zone for struct filedesc0

Currently sizeof(struct filedesc0) is 1096 bytes, which means allocations from
malloc use 2048 bytes.

There is no easy way to shrink the structure <= 1024 an it is likely to grow in
the future.

9 years agoFix up some session-related races in devfs.
mjg [Mon, 3 Nov 2014 03:12:15 +0000 (03:12 +0000)]
Fix up some session-related races in devfs.

One was introduced with r272596, the rest was there to begin with.

Noted by: jhb

9 years agoDo not try to create a /dev/log symlink in a jail.
hrs [Mon, 3 Nov 2014 00:37:39 +0000 (00:37 +0000)]
Do not try to create a /dev/log symlink in a jail.

PR: 179828

9 years ago - Make sure random_adaptor accesses happen only when
delphij [Sun, 2 Nov 2014 23:30:50 +0000 (23:30 +0000)]
 - Make sure random_adaptor accesses happen only when
   random_adaptors_lock is held.
 - Use sx_sleep instead of tsleep in read and write path to allow
   another thread that registers a new random adapter when waiting.
   Assert that random_adaptor is not NULL after reacquiring the lock.
 - Capture EINTR/ERESTART from sx_sleep to allow the blocking cycle be
   stopped when user requests so, while there also make short
   read/write's return 0.
 - Move M_WAITOK allocations out of lock scope.

In collobration with: kib, markm, ian, jilles
Reviewed by: kib, markm
Approved by: so

9 years agoMFamd64: Add support for extended FPU states on i386. This includes
jhb [Sun, 2 Nov 2014 22:58:30 +0000 (22:58 +0000)]
MFamd64: Add support for extended FPU states on i386.  This includes
support for AVX on i386.
- Similar to amd64, move the FPU save area out of the PCB and instead
  store saved FPU state in a variable-sized buffer after the PCB on the
  stack.
- To support the variable PCB location, alter the locore code to only use
  the bottom-most page of proc0stack for init386().  init386() returns
  the correct stack pointer to locore which adjusts the stack for thread0
  before calling mi_startup().
- Don't bother setting cr3 in thread0's pcb in locore before calling
  init386().  It wasn't used (init386() overwrote it at the end) and
  it doesn't work with the variable-sized FPU save area.
- Remove the new-bus attachment from npx.  This was only ever useful for
  external co-processors using IRQ13, but those have not been supported
  for several years.  npxinit() is now called much earlier during boot
  (init386()) similar to amd64.
- Implement PT_{GET,SET}XSTATE and I386_GET_XFPUSTATE.
- npxsave() is now only called from context switch contexts so it can
  use XSAVEOPT.

Differential Revision: https://reviews.freebsd.org/D1058
Reviewed by: kib
Tested on: FreeBSD/i386 VM under bhyve on Intel i5-2520

9 years agoFix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
hrs [Sun, 2 Nov 2014 21:58:31 +0000 (21:58 +0000)]
Fix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
the newly-added IPv6 address was /128.

PR: 188032

9 years agoMFamd64: Move extern declaration of _ucodesel and _udatasel to
jhb [Sun, 2 Nov 2014 21:40:32 +0000 (21:40 +0000)]
MFamd64: Move extern declaration of _ucodesel and _udatasel to
<machine/md_var.h>

9 years agoMFamd64: Explicitly initialize the mxcsr during npxinit().
jhb [Sun, 2 Nov 2014 21:34:24 +0000 (21:34 +0000)]
MFamd64: Explicitly initialize the mxcsr during npxinit().

9 years agoRemove the FP_SOFTFP flag. It wasn't used but was leftover from the
jhb [Sun, 2 Nov 2014 20:57:19 +0000 (20:57 +0000)]
Remove the FP_SOFTFP flag.  It wasn't used but was leftover from the
software x86 math emulator.

9 years agoDon't check for a NULL curthread. curthread hasn't been NULL after early
jhb [Sun, 2 Nov 2014 19:54:10 +0000 (19:54 +0000)]
Don't check for a NULL curthread.  curthread hasn't been NULL after early
boot since 5.0.

9 years agoFollowup to r273966. Fix the build with ADAPTIVE_LOCKMGRS kernel option.
kib [Sun, 2 Nov 2014 19:51:33 +0000 (19:51 +0000)]
Followup to r273966.  Fix the build with ADAPTIVE_LOCKMGRS kernel option.

Note that the option is currently not used in any in-tree kernel
configs, including LINTs.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoAdd the less-ambiguous freebsd-version command.
wblock [Sun, 2 Nov 2014 19:25:31 +0000 (19:25 +0000)]
Add the less-ambiguous freebsd-version command.

Reviewed by: -stable
MFC after: 3 days

9 years agovt(4): Fix keyboard allocation when kbdmux(4) isn't used
dumbbell [Sun, 2 Nov 2014 16:04:48 +0000 (16:04 +0000)]
vt(4): Fix keyboard allocation when kbdmux(4) isn't used

The problem was that only the kbdmux keyboard index was saved in
vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this
case, the keyboard was correctly allocated, but the returned index was
discarded.

PR: 194718
MFC after: 1 week

9 years agofiledesc: move freeing old tables to fdescfree
mjg [Sun, 2 Nov 2014 14:12:03 +0000 (14:12 +0000)]
filedesc: move freeing old tables to fdescfree

They cannot be accessed by anyone and hold count only protects the structure
from being freed.

9 years agoUse default memory type for TTM buffer objects that may be cached.
tijl [Sun, 2 Nov 2014 14:08:54 +0000 (14:08 +0000)]
Use default memory type for TTM buffer objects that may be cached.

MFC after: 1 week

9 years agofiledesc: factor out some code out of fdescfree
mjg [Sun, 2 Nov 2014 13:43:04 +0000 (13:43 +0000)]
filedesc: factor out some code out of fdescfree

Previously it had a huge self-contained chunk dedicated to dealing with shared
tables.

No functional changes.

9 years agoWhen non-forced unmount or remount rw->ro is performed, writes on UFS
kib [Sun, 2 Nov 2014 13:14:55 +0000 (13:14 +0000)]
When non-forced unmount or remount rw->ro is performed, writes on UFS
are not suspended.  In particular, on the SU-enabled vulumes, there is
no reason why, between the call to softdep_flushfiles() and
softdep_waitidle(), SU work items cannot be queued.

Correct the condition to trigger the panic by only checking when
forced operation is done.  Convert direct panic() call into KASSERT(),
there is no invalid on-disk data structures directly involved, so
follow the usual debugging vs. non-debugging approach.

Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoFix two issues with lockmgr(9) LK_CAN_SHARE() test, which determines
kib [Sun, 2 Nov 2014 13:10:31 +0000 (13:10 +0000)]
Fix two issues with lockmgr(9) LK_CAN_SHARE() test, which determines
whether the shared request for already shared-locked lock could be
granted.  Both problems result in the exclusive locker starvation.

The concurrent exclusive request is indicated by either
LK_EXCLUSIVE_WAITERS or LK_EXCLUSIVE_SPINNERS flags.  The reverse
condition, i.e. no exclusive waiters, must check that both flags are
cleared.

Add a flag LK_NODDLKTREAT for shared lock request to indicate that
current thread guarantees that it does not own the lock in shared
mode.  This turns back the exclusive lock starvation avoidance code;
see man page update for detailed description.

Use LK_NODDLKTREAT when doing lookup(9).

Reported and tested by: pho
No objections from: attilio
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years ago- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
tijl [Sun, 2 Nov 2014 11:47:40 +0000 (11:47 +0000)]
- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
- agp_bind_pages: assert that pages have been wired down

MFC after: 1 month

9 years agoIn agp_amd_bind_page don't flush the AGP TLB. It's done by the calling
tijl [Sun, 2 Nov 2014 11:28:15 +0000 (11:28 +0000)]
In agp_amd_bind_page don't flush the AGP TLB.  It's done by the calling
function.

9 years agoIn agp(4) avoid the need to flush all cpu caches with wbinvd between
tijl [Sun, 2 Nov 2014 11:26:37 +0000 (11:26 +0000)]
In agp(4) avoid the need to flush all cpu caches with wbinvd between
updating the GTT and flushing the AGP TLB by storing the GTT in
write-combining memory.

On x86 flushing the AGP TLB is done by an I/O operation or a store to a
MMIO register in uncacheable memory.  Both cases imply that WC buffers are
flushed so no memory barriers are needed.

On powerpc there is no WC memory type.  It maps to uncacheable memory and
two stores to uncacheable memory, such as to the GTT and then to an MMIO
register, are strongly ordered, so no memory barriers are needed either.

MFC after: 1 month

9 years agodrm: Lower priority of two messages related to invalid EDID
dumbbell [Sun, 2 Nov 2014 09:52:22 +0000 (09:52 +0000)]
drm: Lower priority of two messages related to invalid EDID

Like in r259717, the prority goes from "error" to "debug" to avoid
spamming logs when the connectors are polled.

MFC after: 1 week

9 years agoAdd pkg-config file for libarchive
mm [Sun, 2 Nov 2014 09:37:45 +0000 (09:37 +0000)]
Add pkg-config file for libarchive

Requested by: bapt
MFC after: 1 week

9 years agoNG_NODE_NAME(node) is always not NULL. Use correct macro.
glebius [Sun, 2 Nov 2014 05:51:31 +0000 (05:51 +0000)]
NG_NODE_NAME(node) is always not NULL. Use correct macro.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>