]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoDuring module unload unlock rules before destroying UMA zones, which
glebius [Tue, 19 May 2015 14:02:40 +0000 (14:02 +0000)]
During module unload unlock rules before destroying UMA zones, which
may sleep in uma_drain(). It is safe to unlock here, since we are already
dehooked from pfil(9) and all pf threads had quit.

Sponsored by: Nginx, Inc.

9 years agoOnly several years late, catch the psignal man page up to the
julian [Tue, 19 May 2015 11:33:04 +0000 (11:33 +0000)]
Only several years late, catch the psignal man page up to the
fact that psignal has been renamed to kern_psignal since 9.0.

MFC after: 1 week

9 years agoRead GEOM_UNCOMPRESS metadata using several requests that fit into
ae [Tue, 19 May 2015 09:28:52 +0000 (09:28 +0000)]
Read GEOM_UNCOMPRESS metadata using several requests that fit into
MAXPHYS. For large compressed images the metadata size can be bigger
than MAXPHYS and this triggers KASSERT in g_read_data().
Also use g_free() to free memory allocated by g_read_data().

PR: 199476
MFC after: 2 weeks

9 years agoFix for DWC OTG device side isochronous transfers. The even or odd
hselasky [Tue, 19 May 2015 09:22:06 +0000 (09:22 +0000)]
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.

MFC after: 3 days

9 years agoChange SA's state before sending SADB_EXPIRE message. This state will
ae [Tue, 19 May 2015 08:37:03 +0000 (08:37 +0000)]
Change SA's state before sending SADB_EXPIRE message. This state will
be reported to keying daemon.

MFC after: 2 weeks

9 years agoTeach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
ae [Tue, 19 May 2015 08:30:04 +0000 (08:30 +0000)]
Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
extension header type. The key_flush_sad() now will send SADB_EXPIRE
message when HARD lifetime expires. This is required by RFC 2367 and some
keying daemons rely on these messages. HARD lifetime messages have
precedence over SOFT lifetime messages, so now they will be checked first.
Also now SADB_EXPIRE messages will be send even the SA has not been used,
because keying daemons might want to rekey such SA.

PR: 200282, 200283
Submitted by: Tobias Brunner <tobias at strongswan dot org>
MFC after: 2 weeks

9 years agoConvert routerstation to use geom_uncompress.
adrian [Tue, 19 May 2015 06:45:56 +0000 (06:45 +0000)]
Convert routerstation to use geom_uncompress.

9 years agoMigrate RSPRO to use the uncompress module, not uzip.
adrian [Tue, 19 May 2015 06:45:06 +0000 (06:45 +0000)]
Migrate RSPRO to use the uncompress module, not uzip.

(This is hand-in-hand with what I'm about to do with freebsd-wifi-build.)

9 years agoQCA955x / AP135 platform tidyups.
adrian [Tue, 19 May 2015 05:41:00 +0000 (05:41 +0000)]
QCA955x / AP135 platform tidyups.

* Change mips24k -> mips74k for hwpmc, but leave it disabled for now.
* don't build pci by default.
* build pci and qca955x_pci for AP135, as theres a PCIe NIC.
* don't build a hwpmc module, it doesn't really work out well
  for the mips boards at the moment.
* add ipfw and DEFAULT_TO_ACCEPT.

9 years agoThe AP135 PCIe NIC isn't an ath device, it's an 11ac part (linux ath10k.)
adrian [Tue, 19 May 2015 05:33:07 +0000 (05:33 +0000)]
The AP135 PCIe NIC isn't an ath device, it's an 11ac part (linux ath10k.)
So, don't try to attach hints to it here.

9 years agoAdd initial support for the QCA955x PCIe host controller.
adrian [Tue, 19 May 2015 05:31:58 +0000 (05:31 +0000)]
Add initial support for the QCA955x PCIe host controller.

The QCA955x looks a lot like the AR724x PCIe controller, except it
supports two root complexes.  Unfortunately I only have one, so
although this code has started down the path of supporting more than
one, it's definitely not yet ready.

Tested:

* AP135 board (QCA9558 SoC), with the 11ac NIC swapped for an AR9380
  PCIe NIC.

Notes:

* Yes, this driver isn't very pretty.  I decided to commit what I have
  versus holding onto something that isn't yet finished.  It is enough
  to bring up the above NIC and interrupt routing works, so it's a good
  start.

* However, yes, the DDR flush routine hooks need to be fixed up.
  I don't think I'm firing the right one at the moment.

9 years agoAdd mv / expr ; these are used by the updated freebsd-wifi-build environment.
adrian [Tue, 19 May 2015 03:02:52 +0000 (03:02 +0000)]
Add mv / expr ; these are used by the updated freebsd-wifi-build environment.

9 years agoAdded description of POSIX-specified behavior when invoked on a key from within that...
pkelsey [Tue, 19 May 2015 02:24:55 +0000 (02:24 +0000)]
Added description of POSIX-specified behavior when invoked on a key from within that key's destructor.

Reviewed by: jhb, -doc
Approved by: jmallett (mentor)
MFC after: 3 days
Sponsored by: Norse Corp, Inc.

9 years agoMerge ACPICA 20150515.
jkim [Mon, 18 May 2015 23:46:11 +0000 (23:46 +0000)]
Merge ACPICA 20150515.

9 years agoImport ACPICA 20150515.
jkim [Mon, 18 May 2015 23:17:05 +0000 (23:17 +0000)]
Import ACPICA 20150515.

9 years agoSynchronize with OpenBSD
bapt [Mon, 18 May 2015 22:40:12 +0000 (22:40 +0000)]
Synchronize with OpenBSD

Obtained from: OpenBSD

9 years agoddb: stop boolean screaming.
pfg [Mon, 18 May 2015 22:27:46 +0000 (22:27 +0000)]
ddb: stop boolean screaming.

TRUE --> true
FALSE--> false

Hinted by: NetBSD

9 years agoSynchronize libedit with NetBSD
bapt [Mon, 18 May 2015 22:03:05 +0000 (22:03 +0000)]
Synchronize libedit with NetBSD

It incorporates and fixes our patches to get el_gets return the proper count of
characters in unicode mode.

9 years agoMFV of 283077,tzdata2015d
edwin [Mon, 18 May 2015 21:05:11 +0000 (21:05 +0000)]
MFV of 283077,tzdata2015d

Update to tzdata2015d:

Release 2015d - 2015-04-24 08:09:46 -0700

  Changes affecting future time stamps

    Egypt will not observe DST in 2015 and will consider canceling it
    permanently.  For now, assume no DST indefinitely.
    (Thanks to Ahmed Nazmy and Tim Parenti.)

  Change affecting past and future time zone abbreviations

    The abbreviations for Hawaii-Aleutian standard and daylight times
    have been changed from HAST/HADT to HST/HDT, as per US Government
    Printing Office style.  This affects only America/Adak since 1983,
    as America/Honolulu was already using the new style.

9 years agoFix off-by-one in array index bounds check
allanjude [Mon, 18 May 2015 19:45:46 +0000 (19:45 +0000)]
Fix off-by-one in array index bounds check

bhyveload would allow you to create 33 entries on an array that only has 32 slots

Differential Revision: https://reviews.freebsd.org/D2569
Reviewed by: araujo
Approved by: neel
MFC after: 1 week
Sponsored by: ScaleEngine Inc.

9 years agoFix error in gmountver(8) man page
allanjude [Mon, 18 May 2015 19:37:55 +0000 (19:37 +0000)]
Fix error in gmountver(8) man page

Also fixes the usage statement for the binary to use the correct terms (provider and geom name, rather than dev and prov, which is incorrect in the latter case)
Sync the man page summary with the new usage statement

PR: 199540
Differential Revision: https://reviews.freebsd.org/D2329
Submitted by: Fabian Keil
Reviewed by: trasz
Approved by: eadler (mentor)
Obtained from: ElectroBSD (original)
MFC after: 1 week
Sponsored by: ScaleEngine Inc.

9 years agoDon't do things we aren't allowed to do in a signal handler... Defer
jmg [Mon, 18 May 2015 19:18:42 +0000 (19:18 +0000)]
Don't do things we aren't allowed to do in a signal handler...  Defer
the work to the main thread...  This fixes a possible crash if SIGINFO
is delivered at the wrong time...

This still leaves getrusage broken for some reason, but I believe that
is a kernel issue and cannot be fixed here...

9 years agoRemove unnecessary devices from allwinner kernels.
loos [Mon, 18 May 2015 18:25:38 +0000 (18:25 +0000)]
Remove unnecessary devices from allwinner kernels.

9 years agoProperly align the header and the data columns for netstat -r with and
loos [Mon, 18 May 2015 18:03:47 +0000 (18:03 +0000)]
Properly align the header and the data columns for netstat -r with and
without the -W flag.

9 years agoGarbage collect GNU soelim Makefiles which are not in used anymore
bapt [Mon, 18 May 2015 16:51:05 +0000 (16:51 +0000)]
Garbage collect GNU soelim Makefiles which are not in used anymore

9 years agoEnable the NETIF_OPEN_CLOSE_ONCE option for ubldr. This keeps the network
ian [Mon, 18 May 2015 16:43:21 +0000 (16:43 +0000)]
Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.  This keeps the network
interface open continuously instead of closing it after each filesystem
access and reopening it before the next (causing it to re-obtain network
params each time).  This vastly speeds up netbooting.

9 years agoDrop some unnecessary casts.
pfg [Mon, 18 May 2015 16:28:13 +0000 (16:28 +0000)]
Drop some unnecessary casts.

Reported by: Clang static analyzer
Obtained from: NetBSD

9 years agoMake the FIFO configuration a bit more flexible for the DWC OTG in
hselasky [Mon, 18 May 2015 16:18:04 +0000 (16:18 +0000)]
Make the FIFO configuration a bit more flexible for the DWC OTG in
device side mode.

9 years agoAdd a routine to obtain netboot parameters from the U-Boot env vars. Call
ian [Mon, 18 May 2015 16:12:41 +0000 (16:12 +0000)]
Add a routine to obtain netboot parameters from the U-Boot env vars.  Call
it from the uboot net_init() implementation.  The routine uses the standard
U-Boot env vars plus a freebsd-specific variable named "rootpath" (the
corresponding u-boot variable for that would be "bootfile" except that it
refers to ubldr, so a new name was needed to communicate the path to ubldr).

This allows ubldr to load a kernel from nfs without requiring a dhcp or
bootp server to provide the server ip and rootpath parameters.

9 years agoOnly build libreadline if gdb is going to be built
bapt [Mon, 18 May 2015 16:05:41 +0000 (16:05 +0000)]
Only build libreadline if gdb is going to be built

gdb is the only consumer of libreadline which is an INTERNALLIB

9 years agoFix an off-by-one error by adding proper range checks when parsing the
hselasky [Mon, 18 May 2015 16:02:44 +0000 (16:02 +0000)]
Fix an off-by-one error by adding proper range checks when parsing the
HDA association descriptors. This fixes a crash during device probe
for some HDA PCI devices.

Reported by: David Wolfskill <david@catwhisker.org>
Reviewed by: mav @
MFC after: 1 week

9 years agoA miss from r283061: don't dereference NULL is pf_get_mtag() fails.
glebius [Mon, 18 May 2015 15:51:27 +0000 (15:51 +0000)]
A miss from r283061: don't dereference NULL is pf_get_mtag() fails.

PR: 200222
Submitted by: Franco Fichtner <franco opnsense.org>

9 years agoRefactor net_getparams() to make it easier to get params from sources other
ian [Mon, 18 May 2015 15:46:43 +0000 (15:46 +0000)]
Refactor net_getparams() to make it easier to get params from sources other
than bootp and rarp.

The code which splits a serverip:/rootpath string into rootip and a plain
pathname is now a separate net_parse_rootpath() function that can be
called by others.  The code that sets the kernel env vars needed for
nfs_diskless is moved into net_open() so that the variables get set no
matter where the params came from.

There was already code in net_open() that allowed for the possibility that
some other entity has set up the network-related global variables.  It uses
the rootip variable as the key, assuming that if it is set all the other
required variables are set too.  These changes don't alter the existing
behavior, they just make it easier to actually write some new code to get
the params from another source (such as the U-Boot environment).

9 years agoDon't dereference NULL is pf_get_mtag() fails.
glebius [Mon, 18 May 2015 15:05:12 +0000 (15:05 +0000)]
Don't dereference NULL is pf_get_mtag() fails.

PR: 200222
Submitted by: Franco Fichtner <franco opnsense.org>

9 years agoBuild libgcov only if we're building base system GCC
emaste [Mon, 18 May 2015 15:02:35 +0000 (15:02 +0000)]
Build libgcov only if we're building base system GCC

Clang uses compiler-rt for the code coverage runtime, and ports GCC
provides its own libgcov.

PR: 200203 (exp-run)
Sponsored by: The FreeBSD Foundation

9 years agofd: fix imbalanced fdp unlock in F_SETLK and F_GETLK
mjg [Mon, 18 May 2015 14:27:04 +0000 (14:27 +0000)]
fd: fix imbalanced fdp unlock in F_SETLK and F_GETLK

MFC after: 3 days

9 years agoTidy up sys_umask a little bit
mjg [Mon, 18 May 2015 13:43:33 +0000 (13:43 +0000)]
Tidy up sys_umask a little bit

Consistently use saved fdp pointer as it cannot change. If it could change the
code would be already incorrect.

No functional changes.

9 years agoClean up the Amlogic interrupt controller driver to handle the case where
andrew [Mon, 18 May 2015 11:04:07 +0000 (11:04 +0000)]
Clean up the Amlogic interrupt controller driver to handle the case where
we have both the Amlogic pic and a GIC. This may be the case in some
configurations.

Differential Revision: https://reviews.freebsd.org/D2432
Submitted by: John Wehle <john@feith.com>

9 years agoMove all test integration pieces for etc/ from etc/ to tests/
ngie [Mon, 18 May 2015 11:02:43 +0000 (11:02 +0000)]
Move all test integration pieces for etc/ from etc/ to tests/

This is being done to fix breakage with make distribution with read-only
source trees as make distribution doesn't use make obj like building
tests/ does in all cases

Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
Suggested by: jhb
X-MFC with: r282059
MFC after: 1 week

9 years agoAdd support for SCSI disk hot add and remove. Also add padding according to
whu [Mon, 18 May 2015 10:31:23 +0000 (10:31 +0000)]
Add support for SCSI disk hot add and remove. Also add padding according to
the requirement of different hypervisor releases.

Submitted by: whu
Reviewed by: royger
Approved by: royger
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D2512

9 years agoClean up the style to be "include<space><tab>" and remove options already
andrew [Mon, 18 May 2015 08:12:08 +0000 (08:12 +0000)]
Clean up the style to be "include<space><tab>" and remove options already
in std.armv6.

9 years agosfxge: do not advertise LRO capability if LRO is compiled out
arybchik [Mon, 18 May 2015 06:07:02 +0000 (06:07 +0000)]
sfxge: do not advertise LRO capability if LRO is compiled out

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2565

9 years agosfxge: automatically turn off TSO when Tx checksum offload is disabled
arybchik [Mon, 18 May 2015 06:04:20 +0000 (06:04 +0000)]
sfxge: automatically turn off TSO when Tx checksum offload is disabled

Also return error if TSO is requested without Tx checksum offload.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2564

9 years agosfxge: allow to disable checksum offloads over VLAN
arybchik [Mon, 18 May 2015 06:03:21 +0000 (06:03 +0000)]
sfxge: allow to disable checksum offloads over VLAN

It just affects capabilities of the created VLAN interface.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2563

9 years agosfxge: fix overflow queue freeze
arybchik [Mon, 18 May 2015 06:02:22 +0000 (06:02 +0000)]
sfxge: fix overflow queue freeze

If TxQ lock is obtained, deferred packet list shold be serviced even if
the packet addition fails because of overflow.

Without the patch freeze happens if:
 - queue is not blocked (i.e. completion does not trigger unblock and service)
 - put-list overflow (1024 entries)
 - sfxge_tx_packet_add() acquires TxQ lock just as it is released it in
   sfxge_tx_qdpl_service() on the second CPU but before pending check
 - sfxge_tx_packet_add() swizzles put-list to get-list, fails because of
   non-tcp get-list overflow and returns without packet list service
 - sfxge_tx_qdpl_service() on the second CPU checks that there are no
   pending packets in the put-list and returns

Other possible solution is to guaranee that maximum length of the put-list
is less than maximum length of any get-list.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2562

9 years agoMFV of 283040,tzdata{2015c}
edwin [Mon, 18 May 2015 01:59:02 +0000 (01:59 +0000)]
MFV of 283040,tzdata{2015c}

Update to tzdata2015c:

    Release 2015c - 2015-04-11 08:55:55 -0700

    Changes affecting future time stamps

    Egypt's spring-forward transition is at 24:00 on April's last Thursday,
    not 00:00 on April's last Friday.  2015's transition will therefore be on
    Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
    apply to 2026, 2037, 2043, etc.  (Thanks to Steffen Thorsen.)

9 years agoFix a typo that snuck in with r283024, and remove the EXFAIL annotation from
markj [Sun, 17 May 2015 23:09:58 +0000 (23:09 +0000)]
Fix a typo that snuck in with r283024, and remove the EXFAIL annotation from
a test which now passes as a result of that change.

9 years agoRespect the libdir option when linking drti.o, rather than hardcoding the
markj [Sun, 17 May 2015 23:08:01 +0000 (23:08 +0000)]
Respect the libdir option when linking drti.o, rather than hardcoding the
default path of /usr/lib(32)/dtrace.

MFC after: 3 weeks

9 years agoAn ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
ian [Sun, 17 May 2015 19:59:05 +0000 (19:59 +0000)]
An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.

Previously, ubldr would use the virtual addresses in the elf headers by
masking off the high bits and assuming the result was a physical address
where the kernel should be loaded.  That would sometimes discard
significant bits of the physical address, but the effects of that were
undone by archsw copy code that would find a large block of memory and
apply an offset to the source/dest copy addresses.  The result was that
things were loaded at a different physical address than requested by the
higher code layers, but that worked because other adjustments were applied
later (such as when jumping to the entry point).  Very confusing, and
somewhat fragile.

Now the archsw copy routines are just simple copies, and instead
archsw.arch_loadaddr is implemented to choose a load address.  The new
routine uses some of the code from the old offset-translation routine to
find the largest block of ram, but it excludes ubldr itself from that
range, and also excludes   If ubldr splits the largest block of ram in
two, the kernel is loaded into the bottom of whichever resulting block is
larger.

As part of eliminating ubldr itself from the ram ranges, export the heap
start/end addresses in a pair of new global variables.

This change means that the virtual addresses in the arm kernel elf headers
now have no meaning at all, except for the entry point address.  There is
an implicit assumption that the entry point is in the first text page, and
that the address in the the header can be turned into an offset by masking
it with PAGE_MASK.  In the future we can link all arm kernels at a virtual
address of 0xC0000000 with no need to use any low-order part of the
address to influence where in ram the kernel gets loaded.

9 years agoClean up struct syscall_args:
andrew [Sun, 17 May 2015 18:35:58 +0000 (18:35 +0000)]
Clean up struct syscall_args:
 1. Align to a 64-bit address so 64-bit data will be correctly aligned.
 2. Add a comment explaining why.
 3. Remove an unneeded value from the struct.

This fixes an issue where the struct may not be correctly aligned on the
stack in the syscall function. This may lead to accesing a 64-bit value
at a non 64-bit. This will raise an exception and panic the kernel.

We have been lucky where on arm and armv6 both clang and gcc correctly
align the data, even without us asking to, however, on armeb with clang to
not be the case. This tells the compiler we really do need this to be
aligned.

Reported and tested by: jmg (on armeb with clang)
MFC after: 1 Week [1, 2]

9 years agoDo not set preload_addr_relocate for ARM. Apparently there was a time
ian [Sun, 17 May 2015 17:03:37 +0000 (17:03 +0000)]
Do not set preload_addr_relocate for ARM.  Apparently there was a time
when loader(8) passed physical addresses in loader metadata for arm, but
that is no longer true; all metadata has already been adjusted to vitual
addresses by loader.

I can't track down the exact revision in loader where a change from physical
to virtual metadata addresses happened.  The code involved is very twisty
and complicated.  I suspect the change was an unintended consequence of the
r247301, r247413, r248118 series of changes I made a couple years ago.

9 years agoIn r279493, the functions pzero[f](), qzero[f], pone[f](),
kargl [Sun, 17 May 2015 16:27:06 +0000 (16:27 +0000)]
In r279493, the functions pzero[f](), qzero[f], pone[f](),
and qone[f]() were marked as __inline, but their forward
declarations were not updated.  Fix the forward declarations
to match the actual function declarations.

Requested by:  bde

9 years agoUpdate intree gdb/kgdb to handle 2 dwarf types:
sbruno [Sun, 17 May 2015 15:49:38 +0000 (15:49 +0000)]
Update intree gdb/kgdb to handle 2 dwarf types:
DW_OP_GNU_uninit
DW_OP_piece

This squashes the warnings about type 0x93 not known in kgdb when opening a kernel crash dump.

Upstream refs:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=87808bd699575a850139a1f916512ab7a47fd496
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=42be36b328ae784ae6981da7c7cab95b67ed7737
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=23572ecadc89af384c1804ad7692f32c55fbfc80

Differential Revision: https://reviews.freebsd.org/D2534
Reviewed by: emaste, jhb, davide

9 years agoAdjust the string format to match the actual number of arguments.
loos [Sun, 17 May 2015 15:12:55 +0000 (15:12 +0000)]
Adjust the string format to match the actual number of arguments.

This fix a segmentation fault on ARM when netstat -r is used together with
-W.

This issue was introduced in r279122.

9 years agoActually remove siftr-related definitions from tcp.d, missed in r283026.
markj [Sun, 17 May 2015 04:17:08 +0000 (04:17 +0000)]
Actually remove siftr-related definitions from tcp.d, missed in r283026.

9 years agoMove siftr-related definitions out of tcp.d and into a separate library
markj [Sun, 17 May 2015 04:09:22 +0000 (04:09 +0000)]
Move siftr-related definitions out of tcp.d and into a separate library
which declares a dependency on siftr(4). This is necessitated by a
reference to struct pkt_node, which is defined in siftr(4): otherwise,
dtrace(1) will return an error during startup if siftr.ko is not loaded.

9 years agoAs dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
markj [Sun, 17 May 2015 03:59:08 +0000 (03:59 +0000)]
As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
return an error if one of the depends_on directives in a library is not
satisfied. In this case, libdtrace is supposed to ignore the library and
carry on. However, the remainder of the library may still be buffered by
the lexer, causing libdtrace to erroneously continue processing it on the
next call to yyparse(). Fix this by explicitly flushing the input buffer
each time the compiler state is reset.

MFC after: 3 weeks

9 years agoWhen in lazyload mode, write the DOF to a temporary file and rename it
markj [Sun, 17 May 2015 03:50:42 +0000 (03:50 +0000)]
When in lazyload mode, write the DOF to a temporary file and rename it
rather than writing directly to the output file.

CID: 1147172

9 years agobsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sized
allanjude [Sun, 17 May 2015 00:55:44 +0000 (00:55 +0000)]
bsdinstall/zfsboot: Skip adding swap lines to /etc/fstab if swap is 0 sized

Differential Revision: https://reviews.freebsd.org/D2571
Reviewed by: dim
Approved by: eadler (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoIncrement the vm stats "v_intr" counter so the global system interrupt
adrian [Sat, 16 May 2015 23:51:24 +0000 (23:51 +0000)]
Increment the vm stats "v_intr" counter so the global system interrupt
statistics work again.

I'm not sure why/when this broke, only that it used to work fine.

This commit is brought to you by Maker Faire Bay Area 2015.

9 years agoFix more warnings related to missing headers
ngie [Sat, 16 May 2015 22:53:26 +0000 (22:53 +0000)]
Fix more warnings related to missing headers

MFC after: 1 week

9 years agoDon't allow unmapped I/O. The pmap isn't quite up to the task. Add a
imp [Sat, 16 May 2015 21:24:32 +0000 (21:24 +0000)]
Don't allow unmapped I/O. The pmap isn't quite up to the task. Add a
comment to this effect and switch the default. My old AT91SAM9G20
now boots, fsck's the SD card and runs w/o an issue for the first
time since a 9.1-ish stable build I did a few years ago.

Problems with unmapped I/O:
o un-page-aligned I/O requests to devices fail (notably fsck
  and newfs).
o write-back caching was totally broken. write-through caching
  needed to be enabled.
o Even page-aligned I/O requests sometimes failed for reasons
  not thoroughly investigated.

Suggested by: ian@
MFC after: 2 days

9 years agoRe-link ubldr when any of its libraries change.
ian [Sat, 16 May 2015 21:08:33 +0000 (21:08 +0000)]
Re-link ubldr when any of its libraries change.

9 years agoacpi_ibm: whitespace.
rpaulo [Sat, 16 May 2015 20:06:39 +0000 (20:06 +0000)]
acpi_ibm: whitespace.

9 years agoMore tr -d '\r' t make config happy and
bz [Sat, 16 May 2015 20:04:49 +0000 (20:04 +0000)]
More tr -d '\r' t make config happy and
some re-alignment whitespace changes.

9 years ago* Update SFF-8024 Identifier constants.
melifaro [Sat, 16 May 2015 13:11:35 +0000 (13:11 +0000)]
* Update SFF-8024 Identifier constants.
* Fix SFF_8436_CC_EXT in SFF-8436 memory map.
* Add SFF-8436/8636 bits (revision compliance/nominal bitrate).
* Do some small style/type fixes.

9 years agoAdd a warning message to mountd for exported file
rmacklem [Sat, 16 May 2015 12:05:26 +0000 (12:05 +0000)]
Add a warning message to mountd for exported file
systems that are automounted, since that configuration
isn't supported. This still allows the export, since
two emails I received felt that this should not be
disabled. It sends the message to syslog(LOG_ERR..), so that
it goes to the same places as the other messages related
to /etc/exports problems, even though it is a warning and not an error.

Reviewed by: trasz
MFC after: 2 weeks

9 years agosfxge: avoid usage of ifm_data
arybchik [Sat, 16 May 2015 10:35:30 +0000 (10:35 +0000)]
sfxge: avoid usage of ifm_data

The driver uses ifm_data to save capabilities mask calculated during
initialization when supported phy modes are discovered.
The patch simply calculates it when either media or options are changed.

Reviewed by:    glebius
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2540

9 years agoMinor comments fixes
thomas [Sat, 16 May 2015 10:31:15 +0000 (10:31 +0000)]
Minor comments fixes

9 years agotr -d '\r' makes config a lot more happy.
bz [Sat, 16 May 2015 10:27:27 +0000 (10:27 +0000)]
tr -d '\r' makes config a lot more happy.

9 years agopath.h is not needed here.
delphij [Sat, 16 May 2015 08:12:00 +0000 (08:12 +0000)]
path.h is not needed here.

9 years agoMake these all work with the new way of doing privatelib.
adrian [Sat, 16 May 2015 06:18:39 +0000 (06:18 +0000)]
Make these all work with the new way of doing privatelib.

Without these CFLAGS settings a cross-compile won't find the headers
anywhere.

Tested:

* mips (32, big endian) cross-build w/ LOCAL_DIRS including these
  tools.

9 years agossh-copy-id: Add missing line continuation
eadler [Sat, 16 May 2015 06:15:49 +0000 (06:15 +0000)]
ssh-copy-id: Add missing line continuation

PR: 194301
Reported by: pkubaj@riseup.net
Patch by: Ross Kilgariff <rosskilgariff@gmail.com>

9 years agosfxge: add local variable with changed capabilities mask
arybchik [Sat, 16 May 2015 06:04:53 +0000 (06:04 +0000)]
sfxge: add local variable with changed capabilities mask

It is required for the next patch which adds dependency of TSO
capabilities from Tx checksum offloads.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2553

9 years agoVarious iwn(4) fixes.
adrian [Sat, 16 May 2015 05:59:25 +0000 (05:59 +0000)]
Various iwn(4) fixes.

* simplify channel logic for determining RF gain setting in scan setup
* don't set TX timer on error
* free node references for unsent frames on device stop
* set maxfrags to IWN_MAX_SCATTER-1 (first segment is used by TX command)
* add missing IWN_UNLOCK() from interrupt path when the hardware
  disappears.
* pass control frames to host
* nitems() instead of local macro

Tested:

* Intel 5100, STA mode

PR: kern/196264
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agosfxge: move mbuf free to sfxge_if_transmit()
arybchik [Sat, 16 May 2015 05:43:20 +0000 (05:43 +0000)]
sfxge: move mbuf free to sfxge_if_transmit()

It is a preparation to the next patch which will service packet queue even
if packet addtion fails.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2552

9 years agosfxge: get rid of locked variable in sfxge_tx_packet_add()
arybchik [Sat, 16 May 2015 05:37:47 +0000 (05:37 +0000)]
sfxge: get rid of locked variable in sfxge_tx_packet_add()

Now each branch has one and only one possible TxQ lock state.
It simplifies understanding of the code.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2551

9 years agosfxge: support Rx checksum offloads disabling
arybchik [Sat, 16 May 2015 05:36:40 +0000 (05:36 +0000)]
sfxge: support Rx checksum offloads disabling

We can't disable it in HW, but we can ignore result.
Discard Rx descriptor checksum flags if Rx checksum offload is off.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2544

9 years agoProvide reallocarray() in -legacy, if needed, to allow building head on
dim [Fri, 15 May 2015 22:19:35 +0000 (22:19 +0000)]
Provide reallocarray() in -legacy, if needed, to allow building head on
previous releases.

Also add a stdlib.h wrapper, which declares the function, otherwise the
compiler may assume it returns int, which can cause segfaults on LP64
architectures.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D2558

9 years agoUpdate the comments to match what the code ended up becoming.
adrian [Fri, 15 May 2015 21:33:19 +0000 (21:33 +0000)]
Update the comments to match what the code ended up becoming.

-1 is now "no locality information available".

Sponsored by: Norse Corp, Inc.

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 20:53:43 +0000 (20:53 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

Missing #endif (in wrong place)

Pointed hat: me

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 20:47:25 +0000 (20:47 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

Missing #endif

Reported by: jhb, jenkins
Pointed hat: me

9 years agoMake use of GCC alloc_align attribute
pfg [Fri, 15 May 2015 20:43:37 +0000 (20:43 +0000)]
Make use of GCC alloc_align attribute

This lets the compiler know about the alignment of pointers returned
by aligned_alloc(3), posix_memalign(3). and contigmalloc(9)

Currently this is only supported in recent gcc but we are ready to
use it if clang implements it.

Relnotes: yes

9 years agoBreak apart the gnu_inline attribute and use "artificial" if available.
pfg [Fri, 15 May 2015 19:51:05 +0000 (19:51 +0000)]
Break apart the gnu_inline attribute and use "artificial" if available.

In general it is bad practice to use the gnu_inline attribute but we
will need it in special cases like FORTIFY_SOURCE. In this specific
case it is also useful to have the "artificial" attribute:

"This attribute is useful for small inline wrappers which if possible
should appear during debugging as a unit, depending on the debug info
format it will either mean marking the function as artificial or using the
caller location for all instructions within the inlined body."

This attribute appears to be currently implemented only in GCC. Use it
only in conjuntion with gnu_inline in the cases where it is available,
which is similar in spirit in how it's used in glibc.

9 years agoCorrect location for libntpevent.a.
cy [Fri, 15 May 2015 19:37:17 +0000 (19:37 +0000)]
Correct location for libntpevent.a.

9 years agoIntroduce support for the Alpine PoC from Annapurna Labs
zbb [Fri, 15 May 2015 18:25:48 +0000 (18:25 +0000)]
Introduce support for the Alpine PoC from Annapurna Labs

The Alpine Platform-On-Chip offers multicore processing
(quad ARM Cortex-A15), 1/10Gb Ethernet, SATA 3, PCI-E 3,
DMA engines, Virtualization, Advanced Power Management and other.

This code drop involves basic platform support including:
SMP, IRQs, SerDes, SATA. As of now it is missing the PCIe support.
Part of the functionality is provided by the low-level code (HAL)
delivered by the chip vendor (Annapurna Labs) and is a subject to
change in the future (is planned to be moved to sys/contrib directory).

The review log for this commit is available here:
https://reviews.freebsd.org/D2340

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Annapurna Labs

9 years agoAdd assertions that the addresses passed to tlb maintenance are page-aligned.
ian [Fri, 15 May 2015 18:10:00 +0000 (18:10 +0000)]
Add assertions that the addresses passed to tlb maintenance are page-aligned.

Perform cache writebacks and invalidations in the correct (inner to outer
or vice versa) order, and add comments that explain that.

Consistantly use 'va' as the variable name for virtual addresses.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoRetrieve the cache parms in the proper arch-specific way.
ian [Fri, 15 May 2015 18:07:58 +0000 (18:07 +0000)]
Retrieve the cache parms in the proper arch-specific way.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoSummary: Remove spurious, extra, next header comments.
gnn [Fri, 15 May 2015 18:04:49 +0000 (18:04 +0000)]
Summary: Remove spurious, extra, next header comments.
Correct the name of the pad length field.

9 years agoReplace a CONSTCOND for a void value as a replacement for __unreachable builtin
pfg [Fri, 15 May 2015 17:51:03 +0000 (17:51 +0000)]
Replace a CONSTCOND for a void value as a replacement for __unreachable builtin

This only applies if we are not using clang or gcc but it lets us use the
__unreachable() buitin in expressions.

Suggested by: tijl

9 years agoAllow MANWIDTH to work with mandoc(1)
bapt [Fri, 15 May 2015 15:56:28 +0000 (15:56 +0000)]
Allow MANWIDTH to work with mandoc(1)

Reported by: bdrewery

9 years agoWhen a netmap process terminates without the full set of buffers it
pkelsey [Fri, 15 May 2015 15:36:57 +0000 (15:36 +0000)]
When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.

Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.

Based on intial work by adrian@.

Reviewed by: Giuseppe Lettieri (g.lettieri@iet.unipi.it), luigi
Approved by: jmallett (mentor)
MFC after: 1 week
Sponsored by: Norse Corp, Inc.

9 years agoBuild libgomp only if we're also building base system GCC
emaste [Fri, 15 May 2015 14:22:33 +0000 (14:22 +0000)]
Build libgomp only if we're also building base system GCC

Clang's OpenMP support will emit Intel OpenMP API library calls,
and will therefore require libiomp (or whatever name is settled on).
An up-to-date version of libgomp is included in ports or pkg GCC.
Thus, there is no reason to build base libgomp without base system GCC.

PR: 199979 (exp-run)
Reviewed by: pfg
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2459

9 years agoProvide the number of interrupt resources added to the list
br [Fri, 15 May 2015 13:55:18 +0000 (13:55 +0000)]
Provide the number of interrupt resources added to the list
by using extra argument, so caller will know that.

9 years agoPreviously, cv_waiters was only updated by cv_signal or cv_wait. If a
jhb [Fri, 15 May 2015 13:50:37 +0000 (13:50 +0000)]
Previously, cv_waiters was only updated by cv_signal or cv_wait. If a
thread awakened due to a time out, then cv_waiters was not decremented.
If INT_MAX threads timed out on a cv without an intervening cv_broadcast,
then cv_waiters could overflow. To fix this, have each sleeping thread
decrement cv_waiters when it resumes.

Note that previously cv_waiters was protected by the sleepq chain lock.
However, that lock is not held when threads resume from sleep. In
addition, the interlock is also not always reacquired after resuming
(cv_wait_unlock), nor is it always held by callers of cv_signal() or
cv_broadcast(). Instead, use atomic ops to update cv_waiters. Since
the sleepq chain lock is still held on every increment, it should
still be safe to compare cv_waiters against zero while holding the
lock in the wakeup routines as the only way the race should be lost
would result in extra calls to sleepq_signal() or sleepq_broadcast().

Differential Revision: https://reviews.freebsd.org/D2427
Reviewed by: benno
Reported by: benno (wrap of cv_waiters in the field)
MFC after: 2 weeks

9 years agoClose some potential races around socket start/close.
mav [Fri, 15 May 2015 13:36:50 +0000 (13:36 +0000)]
Close some potential races around socket start/close.

There are some reports about panics on ic->ic_socket NULL derefence.
This kind of races is the only way I can imagine it to happen.

MFC after: 2 weeks

9 years agoBump date for iic.4
jah [Fri, 15 May 2015 13:04:14 +0000 (13:04 +0000)]
Bump date for iic.4

9 years agoSimplify i2c reader: we don't need per-NIC handler anymore.
melifaro [Fri, 15 May 2015 12:32:17 +0000 (12:32 +0000)]
Simplify i2c reader: we don't need per-NIC handler anymore.
Make code use read_i2c() function instead of callback.
Simplify&document struct i2c_info.
Consistently use uint8_t to read from i2c.

9 years agoUpdate iic(4) man page to reflect recent changes
jah [Fri, 15 May 2015 12:28:17 +0000 (12:28 +0000)]
Update iic(4) man page to reflect recent changes

Differential Revision: https://reviews.freebsd.org/D2461
Reviewed by: wblock
Approved by: kib (mentor)

9 years agoAdd an ability accept encapsulated packets from different sources by one
ae [Fri, 15 May 2015 12:19:45 +0000 (12:19 +0000)]
Add an ability accept encapsulated packets from different sources by one
gif(4) interface. Add new option "ignore_source" for gif(4) interface.
When it is enabled, gif's encapcheck function requires match only for
packet's destination address.

Differential Revision: https://reviews.freebsd.org/D2004
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC