]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
9 years agoMFC r270668:
gjb [Fri, 29 Aug 2014 01:21:08 +0000 (01:21 +0000)]
MFC r270668:
  Add gnugrep.1 to CLEANFILES.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@270777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r270510:
truckman [Thu, 28 Aug 2014 01:14:30 +0000 (01:14 +0000)]
MFC r270510:

Catch up to gcc 3.3 -> 3.4 upgrade.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270735 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r261491 (by ambrisko):
markj [Wed, 27 Aug 2014 21:11:19 +0000 (21:11 +0000)]
MFC r261491 (by ambrisko):
Add a tunable "hw.mfi.mrsas_enable" to allow mfi(4) to drop priority and
allow mrsas(4) from LSI to attach to newer LSI cards that are support by
mrsas(4).  If mrsas(4) is not loaded into the system at boot then mfi(4)
will always attach.  If a modified mrsas(4) is loaded in the system.  That
modification is return "-30" in it's probe since that is between
BUS_PROBE_DEFAULT and BUS_PROBE_LOW_PRIORITY.

This option is controller by a new probe flag "MFI_FLAGS_MRSAS" in mfi_ident
that denotes cards that should work with mrsas(4).  New entries that should
have this option.

This is the first step to get mrsas(4) checked into FreeBSD and to avoid
collision with people that use mrsas(4) from LSI.  Since mfi(4) takes
priority, then mrsas(4) users need to rebuild GENERIC.  Using the
.disabled="1" method doesn't work since that blocks attaching and the
probe gave it to mfi(4).

MFC r267451 (by delphij):
Correct variable for loader tunable variable hw.mfi.mrsas_enable.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270733 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265255, r270506:
markj [Wed, 27 Aug 2014 19:51:07 +0000 (19:51 +0000)]
MFC r265255, r270506:
Allow "a.out" as an alias for the executable if no other matching entries
are found.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r270134:
hselasky [Wed, 27 Aug 2014 14:24:00 +0000 (14:24 +0000)]
MFC r270134:
Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR: 192755

git-svn-id: svn://svn.freebsd.org/base/stable/9@270718 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r270133:
hselasky [Wed, 27 Aug 2014 14:18:48 +0000 (14:18 +0000)]
MFC r270133:
Add more USB class codes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270715 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269777:
hselasky [Wed, 27 Aug 2014 14:11:25 +0000 (14:11 +0000)]
MFC r269777:
Fix string length argument passed to "sysctl_handle_string()" so that
the complete string is returned by the function and not just only one
byte.

PR: 192544

git-svn-id: svn://svn.freebsd.org/base/stable/9@270712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r270455, r270457:
gjb [Wed, 27 Aug 2014 00:57:45 +0000 (00:57 +0000)]
MFC r270455, r270457:

r270455:
  Set OSREL and UNAME_r in release/release.sh when building
  ports to prevent ports build failures from killing the
  release build.

r270457:
  Wrap a long line.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@270690 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269743:
wblock [Tue, 26 Aug 2014 20:01:18 +0000 (20:01 +0000)]
MFC r269743:

Update the comments in exec.h with help from jilles.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265778 (by melifaro):
ae [Tue, 26 Aug 2014 10:35:32 +0000 (10:35 +0000)]
MFC r265778 (by melifaro):
  Fix ndp(8) -f flag parsing

  PR:           bin/136661

MFC r268827 (by peter):
  Fix "ndp -d hostname".

git-svn-id: svn://svn.freebsd.org/base/stable/9@270656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r270416:
dim [Tue, 26 Aug 2014 06:31:52 +0000 (06:31 +0000)]
MFC r270416:

In r260015, I renamed several identifiers to avoid -Wsystem-header
warnings.  In r261283, I imported libc++ 3.4 release, but this contained
one identifier that had not been renamed yet, leading to a compilation
error when using -std=c++1y.  Fix the compilation error by correctly
renaming the identifier.

Reported by: rcarter@pinyon.org
PR: base/192139

git-svn-id: svn://svn.freebsd.org/base/stable/9@270646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty
des [Sun, 24 Aug 2014 14:04:23 +0000 (14:04 +0000)]
MFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty

git-svn-id: svn://svn.freebsd.org/base/stable/9@270461 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r270458): print numeric file mode unless -r was specified
des [Sun, 24 Aug 2014 14:00:44 +0000 (14:00 +0000)]
MFH (r270458): print numeric file mode unless -r was specified

git-svn-id: svn://svn.freebsd.org/base/stable/9@270459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268726
rmacklem [Sun, 24 Aug 2014 13:03:51 +0000 (13:03 +0000)]
MFC: r268726
Move the "retry:" label so that the calls to m_pullup() are
not done after the call to m_defrag(). This fixes a problem
where m_pullup() would prepend an mbuf to the list created
by m_defrag() making the chain greater than 32 again.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270458 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r268273
rmacklem [Sat, 23 Aug 2014 22:03:15 +0000 (22:03 +0000)]
MFC: r268273
The new NFSv3 server did not generate directory postop attributes for
the reply to ReaddirPlus when the server failed within the loop
that calls VFS_VGET(). This failure is most likely an error
return from VFS_VGET() caused by a bogus d_fileno that was
truncated to 32bits.
This patch fixes the server so that it will return directory postop
attributes for the failure. It does not fix the underlying issue caused
by d_fileno being uint32_t when a file system like ZFS generates
a fileno that is greater than 32bits.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270435 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r263160): remove lukemftpd
des [Sat, 23 Aug 2014 15:07:02 +0000 (15:07 +0000)]
MFH (r263160): remove lukemftpd

git-svn-id: svn://svn.freebsd.org/base/stable/9@270414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r268877, r268921): use -o instead of a redirect.
des [Sat, 23 Aug 2014 14:42:53 +0000 (14:42 +0000)]
MFH (r268877, r268921): use -o instead of a redirect.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r268888): fix false negative for empty groups
des [Sat, 23 Aug 2014 11:40:18 +0000 (11:40 +0000)]
MFH (r268888): fix false negative for empty groups
PR: 109416

MFH (r268890): add support for "account" facility
PR: 115164

git-svn-id: svn://svn.freebsd.org/base/stable/9@270400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r269115): remove useless getpwnam() call
des [Sat, 23 Aug 2014 11:34:55 +0000 (11:34 +0000)]
MFH (r269115): remove useless getpwnam() call

git-svn-id: svn://svn.freebsd.org/base/stable/9@270397 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r269074): strip patch level from release name
des [Sat, 23 Aug 2014 11:32:48 +0000 (11:32 +0000)]
MFH (r269074): strip patch level from release name

git-svn-id: svn://svn.freebsd.org/base/stable/9@270396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC bsd-family tree up to r269882 (from the stable/9 creation time),
marck [Fri, 22 Aug 2014 11:50:34 +0000 (11:50 +0000)]
MFC bsd-family tree up to r269882 (from the stable/9 creation time),
thus documenting many defferent releases up to date.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoif_carp.ko depends on sha1.c.
glebius [Fri, 22 Aug 2014 10:31:57 +0000 (10:31 +0000)]
if_carp.ko depends on sha1.c.

This is direct commit to stable/9, since modern carp is
diverged a lot from it. Relevant commit to head was r228576.

Submitted by: Damir Bikmuhametov <boco ufanet.ru>

git-svn-id: svn://svn.freebsd.org/base/stable/9@270323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269525:
markj [Thu, 21 Aug 2014 19:45:54 +0000 (19:45 +0000)]
MFC r269525:
Return 0 for the PPID of threads in process 0, as process 0 doesn't have a
parent process.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agovt(4): Colors are indexed against a console palette, not a VGA palette
dumbbell [Thu, 21 Aug 2014 10:25:35 +0000 (10:25 +0000)]
vt(4): Colors are indexed against a console palette, not a VGA palette

Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

This is an MFC of r269783 and r269791.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r262872: fts: Don't abort if an empty pathname is given.
jilles [Wed, 20 Aug 2014 20:12:05 +0000 (20:12 +0000)]
MFC r262872: fts: Don't abort if an empty pathname is given.

Make fts_open(3) treat an empty pathname like any other pathname that cannot
be lstatted because of [ENOENT].

It is rather confusing if  rm -rf file1 "" file2  does not remove file1 and
file2.

PR: 187264

git-svn-id: svn://svn.freebsd.org/base/stable/9@270245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269524:
markj [Wed, 20 Aug 2014 14:57:21 +0000 (14:57 +0000)]
MFC r269524:
Preserve the errno value of an ioctl before calling free(3). Previously,
errno was very occasionally being clobbered, resulting in a bogus error from
dt_consume() and thus an error from dtrace(1).

git-svn-id: svn://svn.freebsd.org/base/stable/9@270213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agovt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice
dumbbell [Tue, 19 Aug 2014 21:31:32 +0000 (21:31 +0000)]
vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice

In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
    1. once by the said functions;
    2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
    o  On amd64, with vt_vga:
        - before: 1.0"
        - after:  0.5"
    o  On sparc64, with creator_vt:
        - before: 13.6"
        - after:  10.5"

This is an MFC of r269780.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoBump __FreeBSD_version after r269789 so ports can use it.
bdrewery [Tue, 19 Aug 2014 15:51:43 +0000 (15:51 +0000)]
Bump __FreeBSD_version after r269789 so ports can use it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269859:
hselasky [Tue, 19 Aug 2014 11:06:21 +0000 (11:06 +0000)]
MFC r269859:
Fix for memory leak.

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/9@270167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269954:
dim [Sun, 17 Aug 2014 13:12:07 +0000 (13:12 +0000)]
MFC r269954:

Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

git-svn-id: svn://svn.freebsd.org/base/stable/9@270100 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269948:
dim [Sun, 17 Aug 2014 13:08:15 +0000 (13:08 +0000)]
MFC r269948:

Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by: Jos Chrispijn <ports@webrz.net>

git-svn-id: svn://svn.freebsd.org/base/stable/9@270099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269888:
gjb [Fri, 15 Aug 2014 03:52:40 +0000 (03:52 +0000)]
MFC r269888:
  Fix a typo in a comment: s/interprete/interpret/

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@270009 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r257877:
markj [Thu, 14 Aug 2014 16:45:02 +0000 (16:45 +0000)]
MFC r257877:
Don't try to use the 32-bit drti.o unless the data model is explicitly set
to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't
determine which data model to use, which happens when -64 is omitted and
no object files are provided, e.g. with

# dtrace -G -n BEGIN

This would result in a linker error, but now works properly.

Also remove an unnecessary #ifdef.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269987 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r267859 (by bapt), r268998 from head:
gavin [Wed, 13 Aug 2014 12:58:15 +0000 (12:58 +0000)]
Merge r267859 (by bapt), r268998 from head:

o Mark send-pr info page as an obsolete file

o /usr/bin/sendbug and the sendbug(1) man page were part of send-pr and
  are no longer installed since r267486 (r267734 in stable/10).  Add them
  to ObsoleteFiles.inc1, which should have been done in r267486.

PR: 192010 (partial)
Submitted by: Vick Khera (partial)

git-svn-id: svn://svn.freebsd.org/base/stable/9@269941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r268728 from head:
gavin [Wed, 13 Aug 2014 12:45:25 +0000 (12:45 +0000)]
Merge r268728 from head:

  When we fail to extract the pkg binaries (for example, / is read-only),
  give a more helpful error message.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r268725 from head:
gavin [Wed, 13 Aug 2014 12:42:15 +0000 (12:42 +0000)]
Merge r268725 from head:

  Since r202933, kthread_suspend_check() takes no arguments.  Update the
  example to match.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r268637 from head:
gavin [Wed, 13 Aug 2014 12:38:08 +0000 (12:38 +0000)]
Merge r268637 from head:

  fortune(8): Search fortune files installed by ports/packages as well as
  those supplied by the base system.

PR: 191800
Submitted by: Andy Kosela

git-svn-id: svn://svn.freebsd.org/base/stable/9@269934 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269565:
hselasky [Wed, 13 Aug 2014 08:24:48 +0000 (08:24 +0000)]
MFC r269565:
Rename driver name a bit to avoid unit number confusion in dmesg.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269923 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269566:
hselasky [Wed, 13 Aug 2014 07:08:03 +0000 (07:08 +0000)]
MFC r269566:
Fix for deadlock in USB device side mode.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264417: realpath(): Properly fail "." or ".." components after
jilles [Tue, 12 Aug 2014 19:57:12 +0000 (19:57 +0000)]
MFC r264417: realpath(): Properly fail "." or ".." components after
non-directories.

If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR: kern/82980

git-svn-id: svn://svn.freebsd.org/base/stable/9@269890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r258162 and r257594:
hselasky [Tue, 12 Aug 2014 12:26:12 +0000 (12:26 +0000)]
MFC r258162 and r257594:
Add some more IDs for Intel ATA, AHCI and USB controllers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269866 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268316:
hselasky [Tue, 12 Aug 2014 12:18:43 +0000 (12:18 +0000)]
MFC r268316:
Fix OFED startup order: All SYSINIT()'s and modules should be loaded
prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx"
scripts. Else there can be a race configuring the interfaces via
"/etc/rc.conf".

Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/9@269863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269302:
jlh [Mon, 11 Aug 2014 21:38:41 +0000 (21:38 +0000)]
MFC r269302:

  Fix relative numerical addressing (addr,+N).

  As a bonus the patch untangles a bit the logic and makes the code
  easier to grasp.

  PR:           192108

git-svn-id: svn://svn.freebsd.org/base/stable/9@269841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269740:
dim [Mon, 11 Aug 2014 20:37:03 +0000 (20:37 +0000)]
MFC r269740:

Pull in r214736 from upstream libc++ trunk (by Marshall Clow):

  Fix PR#20520 - predicate called too many times in list::remove_if.
  Add tests for list, forward_list, and the std::remove_if algorithm

This fixes an issue where std::list<>::remove_if() and remove() could
erroneously visit elements twice.

Reported by: Dominic Fandrey <kamikaze@bsdforen.de>
PR: 192303

git-svn-id: svn://svn.freebsd.org/base/stable/9@269836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269180:
delphij [Mon, 11 Aug 2014 07:00:57 +0000 (07:00 +0000)]
MFC r269180:

When interval is set to very small value with limited amount of packets,
ping6(8) would quit before the remote side gets a chance to respond.

Solve this by resetting the itimer when we have reached the maximum packet
number have reached, but let the other handling to continue.

PR:        bin/151023
Submitted by:    tjmao at tjmao.net

git-svn-id: svn://svn.freebsd.org/base/stable/9@269802 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r269489 from head (by peter):
gavin [Sun, 10 Aug 2014 21:17:19 +0000 (21:17 +0000)]
Merge r269489 from head (by peter):

  r262867 was described as fixing socket buffer checks for SOCK_SEQPACKET,
  but also changed one of the SOCK_DGRAM code paths to use the new
  sbappendaddr_nospacecheck_locked() function.  This lead to SOCK_DGRAM
  bypassing socket buffer limits.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r259211:
markj [Sat, 9 Aug 2014 15:03:56 +0000 (15:03 +0000)]
MFC r259211:
Correct the check for errors from proc_rwmem().

git-svn-id: svn://svn.freebsd.org/base/stable/9@269757 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265308:
markj [Sat, 9 Aug 2014 15:00:05 +0000 (15:00 +0000)]
MFC r265308:
If the traced process stops because it received a signal, libproc needs
to ensure that the signal is forwarded when proc_continue() is called.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269755 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265631:
markj [Fri, 8 Aug 2014 15:21:42 +0000 (15:21 +0000)]
MFC r265631:
Re-apply r248644. This fixes an annoying problem which caused dtrace -c to
fail to attach to stripped binaries. With the _r_debug_postinit symbol,
dtrace(1) can now set a breakpoint in the victim process after it has
registered its DOF table(s) with the kernel. r_debug_state cannot be used
for this purpose since it is called before DOF is made available, in which
case dtrace(1) cannot create USDT probes before the program begins
execution.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269470: Avoid divide-by-zero panic when setting baudrate to 0.
joerg [Fri, 8 Aug 2014 14:56:04 +0000 (14:56 +0000)]
MFC r269470: Avoid divide-by-zero panic when setting baudrate to 0.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265629, r265630
markj [Fri, 8 Aug 2014 14:52:59 +0000 (14:52 +0000)]
MFC r265629, r265630

MFC r265629:
Handle the different event types properly in rd_event_addr(). In particular,
with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1)
uses r_debug_state for dl state transitions, so we use its address for
RD_DLACTIVITY events.

MFC r265630:
Fix the rd_event_addr prototype and slightly clarify the use of the "event"
parameter.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge OpenSSL 0.9.8zb.
jkim [Thu, 7 Aug 2014 21:06:34 +0000 (21:06 +0000)]
Merge OpenSSL 0.9.8zb.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265456, r265578:
markj [Thu, 7 Aug 2014 18:37:15 +0000 (18:37 +0000)]
MFC r265456, r265578:
Add a postinit debugger hook to rtld. This will be used by dtrace(1) to halt
the victim process before its entry point is called, at which point probes
and DOF data are registered with the kernel. The r_debug_state hook cannot
be used for this purpose, as it is called before the program's init routines
are invoked and in particular before DOF data is registered (via drti.o).

git-svn-id: svn://svn.freebsd.org/base/stable/9@269681 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix amd64 LINT.
pluknet [Thu, 7 Aug 2014 12:19:42 +0000 (12:19 +0000)]
Fix amd64 LINT.

hyperv is not in stable/9, thus partially revert MFC r257277.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of r269303:
mckusick [Thu, 7 Aug 2014 00:32:23 +0000 (00:32 +0000)]
MFC of r269303:

When restoring a UFS dump onto a ZFS filesystem, an assertion in
restore was failing because ZFS was reporting a blocksize that was
not a multiple of 1024.  Replace restore's failed assertion with
code that writes restored files in a blocksize that works for
restore (a multiple of 1024) despite being non-optimal for ZFS.

Submitted by: Dmitry Morozovsky
Tested by:    Dmitry Morozovsky

git-svn-id: svn://svn.freebsd.org/base/stable/9@269652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC of the r267935
jfv [Wed, 6 Aug 2014 22:15:01 +0000 (22:15 +0000)]
MFC of the r267935
- Shared code update
- em driver support for i218 devices
- igb brought up to the 2.4.0 level

git-svn-id: svn://svn.freebsd.org/base/stable/9@269647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269091:
wblock [Wed, 6 Aug 2014 17:40:11 +0000 (17:40 +0000)]
MFC r269091:

Fix spelling of Camellia algorithm.  While here, replace blank lines
between examples with actual .Pp breaks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269633 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r260457
marius [Tue, 5 Aug 2014 16:30:13 +0000 (16:30 +0000)]
MFC: r260457

The changes in r233781 (MFCed to stable/9 in r235515) attempted to make
logging during a machine check exception more readable.  In practice they
prevented all logging during a machine check exception on at least some
systems.  Specifically, when an uncorrected ECC error is detected in a DIMM
on a Nehalem/Westmere class machine, all CPUs receive a machine check
exception, but only CPUs on the same package as the memory controller for
the erroring DIMM log an error.  The CPUs on the other package would complete
the scan of their machine check banks and panic before the first set of CPUs
could log an error.  The end result was a clearer display during the panic
(no interleaved messages), but a crashdump without any useful info about
the error that occurred.

To handle this case, make all CPUs spin in the machine check handler
once they have completed their scan of their machine check banks until
at least one machine check error is logged.  I tried using a DELAY()
instead so that the CPUs would not potentially hang forever, but that
was not reliable in testing.

While here, don't clear MCIP from MSR_MCG_STATUS before invoking panic.
Only clear it if the machine check handler does not panic and returns
to the interrupted thread.

MFC: r263113

Correct type for malloc().

Submitted by: "Conrad Meyer" <conrad.meyer@isilon.com>

MFC: r269052, r269239, r269242

Intel desktop Haswell CPUs may report benign corrected parity errors (see
HSD131 erratum in [1]) at a considerable rate. So filter these (default),
unless logging is enabled. Unfortunately, there really is no better way to
reasonably implement suppressing these errors than to just skipping them
in mca_log(). Given that they are reported for bank 0, they'd need to be
masked in MSR_MC0_CTL. However, P6 family processors require that register
to be set to either all 0s or all 1s, disabling way more than the one error
in question when using all 0s there. Alternatively, it could be masked for
the corresponding CMCI, but that still wouldn't keep the periodic scanner
from detecting these spurious errors. Apart from that, register contents of
MSR_MC0_CTL{,2} don't seem to be publicly documented, neither in the Intel
Architectures Developer's Manual nor in the Haswell datasheets.

Note that while HSD131 actually is only about C0-stepping as of revision
014 of the Intel desktop 4th generation processor family specification
update, these corrected errors also have been observed with D0-stepping
aka "Haswell Refresh".

1: http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf

Reviewed by: jhb
Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/9@269593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267759, r267761
markj [Tue, 5 Aug 2014 01:53:14 +0000 (01:53 +0000)]
MFC r267759, r267761

r267759:
Fix a couple of bugs on amd64 when fetching probe arguments beyond the
first five for probes entered through a UD fault (i.e. FBT probes).

Specifically, handle the fact that dtrace_invop_callsite must be
16 byte-aligned and thus may not immediately follow the call to
dtrace_invop() in dtrace_invop_start(). Also fetch register arguments and
the stack pointer through a struct trapframe instead of a struct reg.

r267761:
Fix some bugs when fetching probe arguments in i386. Firstly ensure that
the 4 byte-aligned dtrace_invop_callsite can be found and that it
immediately follows the call to dtrace_invop(). Secondly, fix some pointer
arithmetic to account for differences between struct i386_frame and illumos'
struct frame. Finally, ensure that dtrace_getarg() isn't inlined. It works
by following a fixed number of frame pointers to the probe site, so inlining
breaks it.

PR: 191260

git-svn-id: svn://svn.freebsd.org/base/stable/9@269556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268584:
markj [Tue, 5 Aug 2014 01:03:11 +0000 (01:03 +0000)]
MFC r268584:
Add a headphone redirection quirk for the Lenovo G580.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267706:
markj [Tue, 5 Aug 2014 00:25:19 +0000 (00:25 +0000)]
MFC r267706:
Allow creation of SDT probes from a module in which no providers are
defined. This ensures that the sdt:zfs:: probes appear despite the fact
the sdt provider is defined in the kernel rather than in zfs.ko.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r256822:
markj [Mon, 4 Aug 2014 21:41:01 +0000 (21:41 +0000)]
MFC r256822:
When fetching function arguments out of a frame on amd64, explicitly select
the register based on the argument index rather than relying on the fields
in struct reg to be in the right order. This assumption is incorrect on
FreeBSD and generally led to bogus argument values for the sixth argument
of PID and USDT probes; the first five are passed directly to dtrace_probe()
via the fasttrap trap handler and so were correctly handled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r256571:
markj [Mon, 4 Aug 2014 15:36:23 +0000 (15:36 +0000)]
MFC r256571:
Add a function, memstr, which can be used to convert a buffer of
null-separated strings to a single string. This can be used to print the
full arguments of a process using execsnoop (from the DTrace toolkit) or
with the following one-liner:

dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}'

Note that this relies on the process arguments being cached via the struct
proc, which means that it will not work for argvs longer than
kern.ps_arg_cache_limit. However, the following rather non-portable
script can be used to extract any argv at exec time:

fbt::kern_execve:entry
{
    printf("%s", memstr(args[1]->begin_argv, ' ',
        args[1]->begin_envv - args[1]->begin_argv));
}

The debug.dtrace.memstr_max sysctl limits the maximum argument size to
memstr().

git-svn-id: svn://svn.freebsd.org/base/stable/9@269521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269290, r269291, r269293:
gjb [Mon, 4 Aug 2014 04:00:48 +0000 (04:00 +0000)]
MFC r269290, r269291, r269293:

r269290:
  acpi_wmi(4): Remove trailing comma from standalone Xref.

r269291:
  hptiop(4): Remove trailing comma from ending Xref.

r269293:
  kernel_mount(9): Remove trailing comma from ending Xref.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@269499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269189:
kib [Mon, 4 Aug 2014 01:16:08 +0000 (01:16 +0000)]
MFC r269189:
Initialize zfs vnode v_hash when the vnode is allocated.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268780
truckman [Fri, 1 Aug 2014 15:08:47 +0000 (15:08 +0000)]
MFC r268780

Nuke the never-used RF_TIMESHARE feature, reducing the complexity of the
code.  The consensus on arch@ is that this feature might have been useful
in the distant past, but is now just unnecessary bloat.

The int_rman_activate_resource() and int_rman_deactivate_resource()
functions become trivial, so manually inline them.

The special deferred handling of RF_ACTIVE is no longer needed in
reserve_resource_bound(), so eliminate the associated code at the
end of the function.

These changes reduce the object file size by more than 500 bytes on i386.

Update the rman.9 man page to reflect the removal of the RF_TIMESHARE
feature.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269106:
np [Thu, 31 Jul 2014 23:17:59 +0000 (23:17 +0000)]
MFC r269106:
Add a 'raw' parameter to the 'modinfo' subcommand.  This is handy when
trying to figure out why a QSFP+/SFP+ connector or cable wasn't
identified correctly by cxgbe(4).  Its output looks like this:

# cxgbetool t5nex0 modinfo 0 raw
00:  03 04 21 00  00 00 00 00  ..!. ....
08:  04 00 00 00  67 00 00 00  .... g...
10:  00 00 05 00  41 6d 70 68  .... Amph
18:  65 6e 6f 6c  20 20 20 20  enol
20:  20 20 20 20  00 41 50 48       .APH
28:  35 37 31 35  34 30 30 30  5715 4000
30:  33 20 20 20  20 20 20 20  3
38:  4b 20 20 20  01 00 00 fa  K    ....
40:  00 00 00 00  41 50 46 31  .... APF1
48:  30 30 34 30  30 33 30 30  0040 0300
50:  30 33 20 20  31 30 30 31  03   1001
58:  33 30 20 20  00 00 00 97  30   ....

git-svn-id: svn://svn.freebsd.org/base/stable/9@269359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268971:
np [Thu, 31 Jul 2014 23:14:59 +0000 (23:14 +0000)]
MFC r268971:
Simplify r267600, there's no need to distinguish between allocated and
inlined mbufs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264434:
markj [Thu, 31 Jul 2014 17:10:04 +0000 (17:10 +0000)]
MFC r264434:
DTrace's pid provider works by inserting breakpoint instructions at probe
sites and installing a hook at the kernel's trap handler. The fasttrap code
will emulate the overwritten instruction in some common cases, but otherwise
copies it out into some scratch space in the traced process' address space
and ensures that it's executed after returning from the trap.

In Solaris and illumos, this (per-thread) scratch space comes from some
reserved space in TLS, accessible via the fs segment register. This
approach is somewhat unappealing on FreeBSD since it would require some
modifications to rtld and jemalloc (for static TLS) to ensure that TLS is
executable, and would thus introduce dependencies on their implementation
details. I think it would also be impossible to safely trace static binaries
compiled without these modifications.

This change implements the functionality in a different way, by having
fasttrap map pages into the target process' address space on demand. Each
page is divided into 64-byte chunks for use by individual threads, and
fasttrap's process descriptor struct has been extended to keep track of
any scratch space allocated for the corresponding process.

With this change it's possible to trace all libc functions in a program,
e.g. with

  pid$target:libc.so.*::entry {@[probefunc] = count();}

Previously this would generally cause the victim process to crash, as
tracing memcpy on amd64 requires the functionality described above.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269160:
kib [Wed, 30 Jul 2014 04:09:20 +0000 (04:09 +0000)]
MFC r269160:
Remove man page for non-existent VOPs.

MFC r269240 (by pluknet):
Add VOP_GETVOBJECT.9 to obsolete files, un-xref.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269159:
kib [Wed, 30 Jul 2014 04:05:19 +0000 (04:05 +0000)]
MFC r269159:
Correct the locking statement.

MFC r269161:
Explicitely mention that inactivated or reclaimed vnode is locked
exclusively.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269287 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r265276:
markj [Tue, 29 Jul 2014 22:29:32 +0000 (22:29 +0000)]
MFC r265276:
Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264435:
markj [Tue, 29 Jul 2014 22:26:42 +0000 (22:26 +0000)]
MFC r264435:
Ensure that all eight syscall arguments are available to dtrace_probe(),
rather than just the first five.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268929:
hselasky [Tue, 29 Jul 2014 22:04:06 +0000 (22:04 +0000)]
MFC r268929:
Add new device ID.

PR: 191959

git-svn-id: svn://svn.freebsd.org/base/stable/9@269269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269127:
hselasky [Tue, 29 Jul 2014 22:00:54 +0000 (22:00 +0000)]
MFC r269127:
Fix for division by zero.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264486:
markj [Tue, 29 Jul 2014 21:21:15 +0000 (21:21 +0000)]
MFC r264486:
Use the correct format specifiers for wide characters and strings of wide
characters.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268446:
markj [Tue, 29 Jul 2014 21:15:24 +0000 (21:15 +0000)]
MFC r268446:
Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r264363:
markj [Tue, 29 Jul 2014 20:38:08 +0000 (20:38 +0000)]
MFC r264363:
Update the SDT(9) examples to reflect the removal of the sname parameter
in r258622.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r263329:
markj [Tue, 29 Jul 2014 20:34:10 +0000 (20:34 +0000)]
MFC r263329:
Only invoke fasttrap hooks for traps from user mode, and ensure that they're
called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts
disabled can lead to deadlock if fasttrap writes to the process' address
space.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r262669:
markj [Tue, 29 Jul 2014 18:31:44 +0000 (18:31 +0000)]
MFC r262669:
When our linker merges .SUNW_dof sections from multiple files, it simply
concatenates the DOF tables into one section. Previously, the USDT init
code in drti.o would only look at the first table in the DOF section; with
this change, it iterates over all the tables, passing each DOF table to
the kernel.

PR: 186821

git-svn-id: svn://svn.freebsd.org/base/stable/9@269246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r269050
marius [Tue, 29 Jul 2014 13:08:46 +0000 (13:08 +0000)]
MFC: r269050

- Copying and zeroing pages via temporary mappings involves updating the
  corresponding page tables followed by accesses to the pages in question.
  This sequence is subject to the situation exactly described in the "AMD64
  Architecture Programmer's Manual Volume 2: System Programming" rev. 3.23,
  "7.3.1 Special Coherency Considerations" [1, p. 171 f.]. Therefore, issuing
  the INVLPG right after modifying the PTE bits is crucial.
  For pmap_copy_page(), this has been broken in r124956 and later on carried
  over to pmap_copy_pages() derived from the former, while all other places
  in the i386 PMAP code use the correct order of instructions in this regard.
  Fixing the latter breakage solves the problem of data corruption seen with
  unmapped I/O enabled when running at least bare metal on AMD R-268D APUs.
  However, this might also fix similar corruption reported for virtualized
  environments.
- In pmap_copy_pages(), correctly set the cache bits on the source page being
  copied. This change is thought to be a NOP for the real world, though. [2]

1: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf

Submitted by: kib [2]
Reviewed by: alc, kib
Sponsored by: Bally Wulff Games & Entertainment GmbH

git-svn-id: svn://svn.freebsd.org/base/stable/9@269236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268979:
delphij [Tue, 29 Jul 2014 06:00:48 +0000 (06:00 +0000)]
MFC r268979:

Don't save entropy inside jails.

As of r126744, we no longer feed the entropy device in jails upon
start, and collecting them is no longer useful.

PR: conf/126744
Submitted by: Eugene Grosbein <eugen grosbein net> (with minor changes)
Approved by: so (des)

git-svn-id: svn://svn.freebsd.org/base/stable/9@269221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r269081:
kib [Sun, 27 Jul 2014 18:10:07 +0000 (18:10 +0000)]
MFC r269081:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoPartial MFC of r268466:
kib [Fri, 25 Jul 2014 15:07:07 +0000 (15:07 +0000)]
Partial MFC of r268466:
Add a knob to disable the residency calculation for kern.proc.vmmap.

Tested by: "Ivan A. Kosarev" <ikosarev@accesssoftek.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@269090 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268640 and r268989.
np [Fri, 25 Jul 2014 00:35:43 +0000 (00:35 +0000)]
MFC r268640 and r268989.

r268640:
Allow multi-byte reads in the private CHELSIO_T4_GET_I2C ioctl.  The
firmware allows up to 48B to be read this way but the driver limits
itself to 8B at a time to remain compatible with old cxgbetool
binaries.

r268989:
Add missing newline to an error message.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268420:
mav [Thu, 24 Jul 2014 14:57:58 +0000 (14:57 +0000)]
MFC r268420:
Remove IO_SYNC flag when writing extended file attributes on ZFS.

While it is possible to create and write file, modify its permissions, etc.
without ever doing sync, it looks odd that it is required for setting
extended file attributes on ZFS.  UFS does not do sync there too.

Samba uses those extended attributes to store some its data, and doing it
synchronously by many times reduces file creation performance for systems
without SLOG device.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269062 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268384:
kib [Thu, 24 Jul 2014 11:17:26 +0000 (11:17 +0000)]
MFC r268384:
When the lock was stolen from us, retry the whole lock sequence in kernel,
instead of returning EINTR.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269057 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoSync with 2014060201 which adds IPv6 to b.root-servers.net
erwin [Thu, 24 Jul 2014 09:40:31 +0000 (09:40 +0000)]
Sync with 2014060201 which adds IPv6 to b.root-servers.net

Note that this is a direct commit to stable/9 as this file
is no longer in HEAD.

Sponsored by: DK Hostmaster A/S

git-svn-id: svn://svn.freebsd.org/base/stable/9@269049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r262329:
markj [Thu, 24 Jul 2014 01:08:02 +0000 (01:08 +0000)]
MFC r262329:
Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some
upstream DTrace code.

MFC r262330:
1452 DTrace buffer autoscaling should be less violent

illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706

git-svn-id: svn://svn.freebsd.org/base/stable/9@269040 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 267883:
jhb [Thu, 24 Jul 2014 00:02:39 +0000 (00:02 +0000)]
MFC 267883:
Expand r261243 even further and ignore any I/O port resources assigned to
PCI root bridges except for the one known-valid case on x86 where bridges
claim the I/O port registers used for PCI config space access.

git-svn-id: svn://svn.freebsd.org/base/stable/9@269038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r266475 (rea): Fix warning messages after r252015
dteske [Wed, 23 Jul 2014 22:41:07 +0000 (22:41 +0000)]
MFC r266475 (rea): Fix warning messages after r252015

$alias used to hold alias number, but now it carries full variable name,
so messages were tuned to account for that.

Other fixes:
 - eliminate unneeded double spaces;
 - tell user where inet/inet6 keywords are expected to be.

Reviewed by: hrs

git-svn-id: svn://svn.freebsd.org/base/stable/9@269034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r267812 (hrs): Fix ifname normalization. ifconfig_IF_alias{es,N} did not
dteske [Wed, 23 Jul 2014 22:10:34 +0000 (22:10 +0000)]
MFC r267812 (hrs): Fix ifname normalization. ifconfig_IF_alias{es,N} did not
work if ifname has any of [.-/+].

PR: conf/191961
Spotted by: jhay
MFC after: 3 days

git-svn-id: svn://svn.freebsd.org/base/stable/9@269028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268798, r268799, r268801:
pfg [Mon, 21 Jul 2014 23:00:26 +0000 (23:00 +0000)]
MFC r268798, r268799, r268801:
grep: Fix type.
grep: fix some memory leaks.

queue.c (CVS Rev. 1.4. 1.5)
Fix memory leaks.
NULL does not need a cast.

grep.c (CVS Rev. 1.6)
Use the more portable getline.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@268967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268644:
pfg [Mon, 21 Jul 2014 22:48:38 +0000 (22:48 +0000)]
MFC r268644:
libc/stdlib: Minor cleanups to code originating in NetBSD

Mostly ANSIfication and typos.

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@268965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268642:
pfg [Mon, 21 Jul 2014 22:44:06 +0000 (22:44 +0000)]
MFC r268642:
libc/gen: small updates to code originating at OpenBSD

arc4random.c
- CVS rev. 1.22
Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as
``-upper_bound % upper_bound''. Simplifies the code and makes it the
same on both ILP32 and LP64 architectures, and also slightly faster on
LP64 architectures by using a 32-bit remainder instead of a 64-bit
remainder.
- CVS rev. 1.23
Spacing

readpassphrase.c
-CVS rev. v 1.24
most obvious unsigned char casts for ctype

Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@268963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268460 by ray:
emaste [Mon, 21 Jul 2014 14:36:35 +0000 (14:36 +0000)]
MFC r268460 by ray:

  Fix inconsistent token parameters for kbd_allocate() and kbd_release()
  in vt(4).

PR: 191306
Submitted by: jau789 at gmail.com
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@268942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r263650, r263686
bapt [Sun, 20 Jul 2014 11:00:51 +0000 (11:00 +0000)]
MFC: r263650, r263686

Add missing dependency on libm

git-svn-id: svn://svn.freebsd.org/base/stable/9@268919 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r250764
hiren [Sun, 20 Jul 2014 02:38:58 +0000 (02:38 +0000)]
MFC r250764

Fix rte leak introduced in r248070.

git-svn-id: svn://svn.freebsd.org/base/stable/9@268906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r268790
hiren [Sun, 20 Jul 2014 02:20:03 +0000 (02:20 +0000)]
MFC r268790

Fix a typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@268905 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r267131, r267132, r267133, r268493, r268671
bapt [Sun, 20 Jul 2014 00:30:28 +0000 (00:30 +0000)]
MFC: r267131, r267132, r267133, r268493, r268671

Use NULL instead of 0 (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Remove unnecessary semicolons (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Add support for arbitrary http requests [1]
Support EAGAIN in fetch_writev

Submitted by: Alex Hornung <alex at alexhornung.com> [1]
Reviewed by: des

git-svn-id: svn://svn.freebsd.org/base/stable/9@268901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f