]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRemove an unneeded instruction.
markj [Fri, 28 Aug 2015 00:17:21 +0000 (00:17 +0000)]
Remove an unneeded instruction.

MFC after: 1 week

8 years agonv.h lives in sys/ as of r279439.
markj [Fri, 28 Aug 2015 00:12:59 +0000 (00:12 +0000)]
nv.h lives in sys/ as of r279439.

8 years agoUse CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.
imp [Thu, 27 Aug 2015 23:46:42 +0000 (23:46 +0000)]
Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags.
Go ahead and defined -D_STANDALONE for all targets (only strictly
needed for some architecture, but harmless on those it isn't required
for). Also add -msoft-float to all architectures uniformly rather
that higgley piggley like it is today.

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

8 years agoNew 1-Wire bus implementation. 1-Wire controller is abstracted, though
imp [Thu, 27 Aug 2015 23:33:38 +0000 (23:33 +0000)]
New 1-Wire bus implementation. 1-Wire controller is abstracted, though
only gpiobus configured via FDT is supported. Bus enumeration is
supported. Devices are created for each device found. 1-Wire
temperature controllers are supported, but other drivers could be
written. Temperatures are polled and reported via a sysctl.  Errors
are reported via sysctl counters. Mis-wired bus detection is included
for more trouble shooting. See ow(4), owc(4) and ow_temp(4) for
details of what's supported and known issues.

This has been tested on Raspberry Pi-B, Pi2 and Beagle Bone Black
with up to 7 devices.

Differential Revision: https://reviews.freebsd.org/D2956
Relnotes: yes
MFC after: 2 weeks
Reviewed by: loos@ (with many insightful comments)

8 years agoDocument bsd.endian.mk.
imp [Thu, 27 Aug 2015 22:42:02 +0000 (22:42 +0000)]
Document bsd.endian.mk.

8 years agopf: Remove support for 'scrub fragment crop|drop-ovl'
kp [Thu, 27 Aug 2015 21:27:47 +0000 (21:27 +0000)]
pf: Remove support for 'scrub fragment crop|drop-ovl'

The crop/drop-ovl fragment scrub modes are not very useful and likely to confuse
users into making poor choices.
It's also a fairly large amount of complex code, so just remove the support
altogether.

Users who have 'scrub fragment crop|drop-ovl' in their pf configuration will be
implicitly converted to 'scrub fragment reassemble'.

Reviewed by: gnn, eri
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D3466

8 years agoFix type bug introduced at r286811.
mav [Thu, 27 Aug 2015 21:16:24 +0000 (21:16 +0000)]
Fix type bug introduced at r286811.

8 years agoFix a conversion error in rc.d/jail
peter [Thu, 27 Aug 2015 20:52:41 +0000 (20:52 +0000)]
Fix a conversion error in rc.d/jail

8 years agoIn vm_pageout_scan(), simplify the logic for determining if a page can be
alc [Thu, 27 Aug 2015 20:38:45 +0000 (20:38 +0000)]
In vm_pageout_scan(), simplify the logic for determining if a page can be
paged out and apply some nearby style fixes.

In collaboration with: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation, EMC / Isilon Storage Division

8 years agoadd documentation for timers that silby added in r197244, almost 6 years
jmg [Thu, 27 Aug 2015 19:12:42 +0000 (19:12 +0000)]
add documentation for timers that silby added in r197244, almost 6 years
ago...

8 years agodie() would never return, mark it as so.
delphij [Thu, 27 Aug 2015 18:11:00 +0000 (18:11 +0000)]
die() would never return, mark it as so.

MFC after: 2 weeks

8 years agoMove setting of LDFLAGS to the modules which require it actually, as
ume [Thu, 27 Aug 2015 17:16:18 +0000 (17:16 +0000)]
Move setting of LDFLAGS to the modules which require it actually, as
other kerberos5 modules do so.

8 years agoThere is no need to get the bus tag or handle.
andrew [Thu, 27 Aug 2015 16:27:51 +0000 (16:27 +0000)]
There is no need to get the bus tag or handle.

Sponsored by: ABT Systems Ltd

8 years agoLimit the speed to the bus frequency.
andrew [Thu, 27 Aug 2015 16:24:30 +0000 (16:24 +0000)]
Limit the speed to the bus frequency.

Sponsored by: ABT Systems Ltd

8 years agoAllow the fifo-depth and num-slots to be missing. For the former we read
andrew [Thu, 27 Aug 2015 16:18:22 +0000 (16:18 +0000)]
Allow the fifo-depth and num-slots to be missing. For the former we read
the value from the hardware, for the latter assume a single slot.

Sponsored by: ABT Systems Ltd

8 years agoget_inpcbinfo() and get_pcblist() are UDP local functions and
bz [Thu, 27 Aug 2015 15:27:41 +0000 (15:27 +0000)]
get_inpcbinfo() and get_pcblist() are UDP local functions and
do not do what one would expect by name. Prefix them with "udp_"
to at least obviously limit the scope.

This is a non-functional change.

Reviewed by: gnn, rwatson
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3505

8 years agoDecompose linkat()/renameat() rights to source and target.
ed [Thu, 27 Aug 2015 15:16:41 +0000 (15:16 +0000)]
Decompose linkat()/renameat() rights to source and target.

To make it easier to understand how Capsicum interacts with linkat() and
renameat(), rename the rights to CAP_{LINK,RENAME}AT_{SOURCE,TARGET}.

This also addresses a shortcoming in Capsicum, where it isn't possible
to disable linking to files stored in a directory. Creating hardlinks
essentially makes it possible to access files with additional rights.

Reviewed by: rwatson, wblock
Differential Revision: https://reviews.freebsd.org/D3411

8 years agoMake it buildable with WITH_OPENLDAP, again.
ume [Thu, 27 Aug 2015 15:03:34 +0000 (15:03 +0000)]
Make it buildable with WITH_OPENLDAP, again.

MFC after: 1 week

8 years agoRepair sys/cdefs.h enough to be usable with GCC 5.x
kan [Thu, 27 Aug 2015 14:00:23 +0000 (14:00 +0000)]
Repair sys/cdefs.h enough to be usable with GCC 5.x

The __alloc_size and __alloc_align need to be defined to
nothingness for lint, but the existing check is deficient
and allows attributes with working __has_attrubute() to
slip through.

8 years agoMake ncurses build with GCC 5.0 and up
kan [Thu, 27 Aug 2015 14:00:20 +0000 (14:00 +0000)]
Make ncurses build with GCC 5.0 and up

Merge the end result of two upstream changes:

Original fix from 20141206:
  + modify MKlib_gen.sh to work around change in development version of
    gcc introduced here:
            https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
            https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
    (reports by Marcus Shawcroft, Maohui Lei).

Later fixed in different manner in 20150725:
  + use alternate workaround for gcc 5.x feature (adapted from patch by
    Mikhail Peselnik).

8 years agoUnbreak nvi message catalog generation for 8 bit locales.
kan [Thu, 27 Aug 2015 14:00:16 +0000 (14:00 +0000)]
Unbreak nvi message catalog generation for 8 bit locales.

Feeding any file encoded in 8 bit locales such as KOI8-RU
to sort utility running under UTF-8 locale produces astonishing
result of recoding the output to UTF-8. To counter that, just
run sort under 'C' locale for now.

8 years agoAllow us to select the transfer count. This allows us to work with hardware
andrew [Thu, 27 Aug 2015 13:08:45 +0000 (13:08 +0000)]
Allow us to select the transfer count. This allows us to work with hardware
that seems to only work with a single block at a time.

Sponsored by: ABT Systems Ltd

8 years agoSilent a compilation warning on callout_stop()
jch [Thu, 27 Aug 2015 10:43:35 +0000 (10:43 +0000)]
Silent a compilation warning on callout_stop()

8 years agoIn callout_stop(), do not forget to initialize not_running variable.
jch [Thu, 27 Aug 2015 08:58:03 +0000 (08:58 +0000)]
In callout_stop(), do not forget to initialize not_running variable.
Thanks to hselasky for noticing that.

Differential Revision: https://reviews.freebsd.org/D3078 (Updated)
Submitted by: hselasky
Pointy hat to: jch

8 years agoReplay r286410. Change KPI of how device drivers that provide wireless
glebius [Thu, 27 Aug 2015 08:56:39 +0000 (08:56 +0000)]
Replay r286410. Change KPI of how device drivers that provide wireless
connectivity interact with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,
Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in
testing.

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

8 years agoIn callout_stop(), if a callout is both pending and currently
jch [Thu, 27 Aug 2015 08:15:32 +0000 (08:15 +0000)]
In callout_stop(), if a callout is both pending and currently
being serviced return 0 (fail) but it is applicable only
mpsafe callouts.  Thanks to hselasky for finding this.

Differential Revision: https://reviews.freebsd.org/D3078 (Updated)
Submitted by: hselasky
Reviewed by: jch

8 years agoFix packets/bytes accounting on i386.
melifaro [Thu, 27 Aug 2015 07:53:58 +0000 (07:53 +0000)]
Fix packets/bytes accounting on i386.

Spotted by: julian

8 years agoPlug a possible memory leak.
delphij [Thu, 27 Aug 2015 06:28:42 +0000 (06:28 +0000)]
Plug a possible memory leak.

MFC after: 2 weeks

8 years agoMore fixes to the new macros
bapt [Thu, 27 Aug 2015 05:39:32 +0000 (05:39 +0000)]
More fixes to the new macros

8 years agoFix typo in new macros
bapt [Thu, 27 Aug 2015 05:27:18 +0000 (05:27 +0000)]
Fix typo in new macros

8 years agoAn error of -1 from parse_mount() indicates that the specification
marcel [Thu, 27 Aug 2015 04:25:27 +0000 (04:25 +0000)]
An error of -1 from parse_mount() indicates that the specification
was invalid. Don't trigger a mount failure (which by default means
a panic), but instead just move on to the next directive in the
configuration. This typically has us ask for the root mount.

PR: 163245

8 years agoFix freescale sdhc driver, and add it to the files list.
jhibbits [Thu, 27 Aug 2015 03:47:56 +0000 (03:47 +0000)]
Fix freescale sdhc driver, and add it to the files list.

Also, add it to the mmc DRIVER_MODULE attachment list.

8 years agoUse the macro definition for EXC_PGM_TRAP, instead of the magic number.
jhibbits [Thu, 27 Aug 2015 03:44:06 +0000 (03:44 +0000)]
Use the macro definition for EXC_PGM_TRAP, instead of the magic number.

8 years agoMake sys.mk more compatible with fmake by refraining from using :U
imp [Thu, 27 Aug 2015 02:59:48 +0000 (02:59 +0000)]
Make sys.mk more compatible with fmake by refraining from using :U
modifiers.

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

8 years agoAutomatically append SUBDIR.yes to the SUBDIR variable, and
imp [Thu, 27 Aug 2015 01:55:00 +0000 (01:55 +0000)]
Automatically append SUBDIR.yes to the SUBDIR variable, and
remove duplicates. We cannot sort SUBDIR because many Makefiles
have .WAIT in the list which is strongly ordering. Rather than
try to second guess when to sort and when to not sort depending
on .WAIT being in the list, just remove duplicates.

8 years agoFor each FOO in FILESLISTS, append the value of FOO.yes, sort, and
imp [Thu, 27 Aug 2015 01:52:45 +0000 (01:52 +0000)]
For each FOO in FILESLISTS, append the value of FOO.yes, sort, and
remove duplicates.

8 years agoWhen the kernel is compiled with INVARIANTS, export that as
imp [Wed, 26 Aug 2015 23:58:03 +0000 (23:58 +0000)]
When the kernel is compiled with INVARIANTS, export that as
debug.invariants.

Differential Revision: https://reviews.freebsd.org/D3488
MFC after: 3 days

8 years agoAdd SCTP support.
tuexen [Wed, 26 Aug 2015 23:45:06 +0000 (23:45 +0000)]
Add SCTP support.

PR: 201585
MFC after: 3 weeks

8 years agoReplace strndup with OpenBSD's implementation.
delphij [Wed, 26 Aug 2015 23:28:10 +0000 (23:28 +0000)]
Replace strndup with OpenBSD's implementation.

MFC after: 2 weeks

8 years agoRemove a variable which is set but never used.
tuexen [Wed, 26 Aug 2015 22:52:18 +0000 (22:52 +0000)]
Remove a variable which is set but never used.

PR: 201585
MFC after: 3 weeks

8 years agoPrint the status on the first line of a socket description, not at
tuexen [Wed, 26 Aug 2015 22:50:53 +0000 (22:50 +0000)]
Print the status on the first line of a socket description, not at
the last one. This doesn't matter for TCP, but it does for the upcoming
SCTP support.

PR: 201585
MFC after: 3 weeks

8 years agoMerge i915_emit_box_p and i915_emit_box as done in linux 3.8
bapt [Wed, 26 Aug 2015 22:19:53 +0000 (22:19 +0000)]
Merge i915_emit_box_p and i915_emit_box as done in linux 3.8

Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3495

8 years agoBack out a change which should not have been committed yet
bapt [Wed, 26 Aug 2015 22:09:12 +0000 (22:09 +0000)]
Back out a change which should not have been committed yet

8 years agobackout a change that should not have crept in
bapt [Wed, 26 Aug 2015 22:00:40 +0000 (22:00 +0000)]
backout a change that should not have crept in

8 years agoReduce diff against linux 3.8
bapt [Wed, 26 Aug 2015 21:35:16 +0000 (21:35 +0000)]
Reduce diff against linux 3.8

Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3492

8 years agoReduce diff with linux 3.8.13 on i915_drv.c
bapt [Wed, 26 Aug 2015 21:33:43 +0000 (21:33 +0000)]
Reduce diff with linux 3.8.13 on i915_drv.c

While here update the list of devices id to match the one in linux 3.8.13

Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3489

8 years agoAdd more DRM_* debug macros from linux 3.8.13
bapt [Wed, 26 Aug 2015 21:31:04 +0000 (21:31 +0000)]
Add more DRM_* debug macros from linux 3.8.13

8 years agoSynchronize i915_reg.h with linux 3.8.13 version
bapt [Wed, 26 Aug 2015 21:17:48 +0000 (21:17 +0000)]
Synchronize i915_reg.h with linux 3.8.13 version

Keep a couple of old macros that will be removed lated when the rest of the code
will be updated to 3.8.13 equivalent.
Chase the renamed macros

Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3487

8 years agoBelatedly add entries for libugidfw.so.4 to catch up with r284745.
jkim [Wed, 26 Aug 2015 18:22:59 +0000 (18:22 +0000)]
Belatedly add entries for libugidfw.so.4 to catch up with r284745.

8 years agoAdd the SOC_HISI_HI6220 option. This will be used to enable drivers for
andrew [Wed, 26 Aug 2015 18:09:17 +0000 (18:09 +0000)]
Add the SOC_HISI_HI6220 option. This will be used to enable drivers for
the HiSilicon hi6220 SoC used in the HiKey 96boards board.

Sponsored by: ABT Systems Ltd

8 years agoMerge ACPICA 20150818.
jkim [Wed, 26 Aug 2015 17:13:47 +0000 (17:13 +0000)]
Merge ACPICA 20150818.

8 years agoAfter consultations with the arm community, don't define softfp for
imp [Wed, 26 Aug 2015 17:10:43 +0000 (17:10 +0000)]
After consultations with the arm community, don't define softfp for
armv6. It's too ambiguous. We do use the softfp ABI for the moment on
armv6, but we allow floating point register use (and the compilers
will generate it). This is too ambiguous to use it as a decider for
which algorithms to use on the platform. Err on the side of caution
and not define it.

Submitted by: ian@
Reviewed by: andrew@

8 years agoSummary: Add the interactivity equations to the header comment for our
gnn [Wed, 26 Aug 2015 16:36:41 +0000 (16:36 +0000)]
Summary: Add the interactivity equations to the header comment for our
interactivity calculation routine.

Suggested by: rwatson

8 years agoReduce diff on i915_dma.c against linux 3.8.13
bapt [Wed, 26 Aug 2015 13:23:56 +0000 (13:23 +0000)]
Reduce diff on i915_dma.c against linux 3.8.13

No functional changes

Discussed with: dumbbell
Reviewed by: dumbbell

8 years agoFix race condition in its_cmd_send()
zbb [Wed, 26 Aug 2015 12:32:46 +0000 (12:32 +0000)]
Fix race condition in its_cmd_send()

its_cmd_send() can be called by multiple CPUs simultaneously.
After the command is pushed to ITS command ring the completion
status is polled using global pointer to the next free ring slot.
Use copied pointer and provide correct locking to avoid spurious
pointer value when concurrent access occurs.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3436

8 years agoFix SEE ALSO.
pluknet [Wed, 26 Aug 2015 11:54:40 +0000 (11:54 +0000)]
Fix SEE ALSO.

The history mechanism applies to csh.

Sponsored by: Nginx, Inc.

8 years agoAdd an option to select which SoCs we are building for. It is intended to
andrew [Wed, 26 Aug 2015 11:36:23 +0000 (11:36 +0000)]
Add an option to select which SoCs we are building for. It is intended to
be used with any SoC specific drivers, for example a ThunderX nic driver
would use something like the following in files.arm64:

arm64/cavium/thunder_nic.c optional soc_cavm_thunderx thndr_nic

Reviewed by: imp
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D3479

8 years agoOnly access the Samsung registers when targeting Samsung hardware.
andrew [Wed, 26 Aug 2015 10:54:14 +0000 (10:54 +0000)]
Only access the Samsung registers when targeting Samsung hardware.

Sponsored by: ABT Systems Ltd

8 years agoAdd a above the virtio section.
andrew [Wed, 26 Aug 2015 10:32:23 +0000 (10:32 +0000)]
Add a above the virtio section.

8 years agoFix filemon locking races.
bdrewery [Wed, 26 Aug 2015 03:44:48 +0000 (03:44 +0000)]
Fix filemon locking races.

Convert filemon_lock and struct filemon* lock to sx(9), rather than a
self-rolled reader-writer lock, and hold it for the entire time needed.

At least filemon_lock_write() was not checking for active readers when
it would successfully return with the write lock "held".  This led to
a race with reading entries from filemon_inuse as they were removed.  This
could be seen with QUEUE_MACRO_DEBUG enabled, causing -1 to be read as an
entry rather than a valid struct filemon*.

Fixing filemon_lock_write() to check readers was insufficient to fix the
races.

sx(9) was used as the lock could be held while taking proctree_lock and sleeping
in fo_write.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoThe Freescale qoriq PCIe controller is compatible with mpc85xx.
jhibbits [Wed, 26 Aug 2015 03:37:33 +0000 (03:37 +0000)]
The Freescale qoriq PCIe controller is compatible with mpc85xx.

Add the compatible checks.

Obtained from: Semihalf (partial)
Sponsored by: Alex Perez/Inertial Computing

8 years agoAvoid taking proctree_lock and searching parents in wrappers if not needed.
bdrewery [Wed, 26 Aug 2015 03:37:18 +0000 (03:37 +0000)]
Avoid taking proctree_lock and searching parents in wrappers if not needed.

This should help the case where filemon is loaded but not in use.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoRemove unneeded inuse list locking in filemon_comment().
bdrewery [Wed, 26 Aug 2015 03:33:34 +0000 (03:33 +0000)]
Remove unneeded inuse list locking in filemon_comment().

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoMove common locking for filemon_inuse and struct filemon* to filemon_pid_check().
bdrewery [Wed, 26 Aug 2015 03:32:47 +0000 (03:32 +0000)]
Move common locking for filemon_inuse and struct filemon* to filemon_pid_check().

This keeps the lock for the filemon_inuse list held only while reading
the list.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoDrop a .WAIT into the list. Items later in the list than this depend
imp [Wed, 26 Aug 2015 02:47:11 +0000 (02:47 +0000)]
Drop a .WAIT into the list. Items later in the list than this depend
on items earlier. Enable parallel builds.

8 years agosh: Fix out of bounds read when there is no ] after a [:class:].
jilles [Tue, 25 Aug 2015 21:55:15 +0000 (21:55 +0000)]
sh: Fix out of bounds read when there is no ] after a [:class:].

The initial check for a matching ] was incorrect if a ] may be consumed by a
[:class:]. The subsequent loop assumed that there must be a ].

Remove the initial check and make the loop cope with a missing ].

Found with afl-fuzz.

MFC after: 1 week

8 years agoFix OpenSSH multiple vulnerabilities by backporting three changes
delphij [Tue, 25 Aug 2015 20:48:37 +0000 (20:48 +0000)]
Fix OpenSSH multiple vulnerabilities by backporting three changes
from OpenSSH-portable master.

Git revisions: 45b0eb752c94954a6de046bfaaf129e518ad4b5b
5e75f5198769056089fb06c4d738ab0e5abc66f7
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
Reviewed by: des
Security: FreeBSD-SA-15:22.openssh

8 years agoioat(4): Minor style cleanups
cem [Tue, 25 Aug 2015 17:39:03 +0000 (17:39 +0000)]
ioat(4): Minor style cleanups

Suggested by: ngie
Reviewed by: jimharris
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3481

8 years agoAdd softfp to MACHINE_CPU more often when we're compiling for soft
imp [Tue, 25 Aug 2015 17:11:49 +0000 (17:11 +0000)]
Add softfp to MACHINE_CPU more often when we're compiling for soft
float targets. It is added for booke on powerpc and all arm with hf in
the string. Also add arm to all arm builds and armv6 to armv6 and
newer builds.

PR: 202641

8 years agoUse kdb_jmpbuf and setjmp to handle accessing invalid addresses in the
andrew [Tue, 25 Aug 2015 17:02:28 +0000 (17:02 +0000)]
Use kdb_jmpbuf and setjmp to handle accessing invalid addresses in the
debugger memory access functions. This allows us to correctly reenter into
the debugger on failure.

Sponsored by: ABT Systems Ltd

8 years agoUse nitems to count the number of items in a static array.
andrew [Tue, 25 Aug 2015 16:50:25 +0000 (16:50 +0000)]
Use nitems to count the number of items in a static array.

Sponsored by: ABT Systems Ltd

8 years agoCall into kdb on a data abort when it's enabled. This is needed to
andrew [Tue, 25 Aug 2015 16:49:10 +0000 (16:49 +0000)]
Call into kdb on a data abort when it's enabled. This is needed to
correctly handle trying to access an invalid address in the debugger.

While here document that the breakpoint handler is supposed to fall
through to the following case.

Sponsored by: ABT Systems Ltd

8 years agoCorrectly update the address to write to after storing the stack pointer
andrew [Tue, 25 Aug 2015 16:43:32 +0000 (16:43 +0000)]
Correctly update the address to write to after storing the stack pointer
in the kernels setjmp function.

Sponsored by: ABT Systems Ltd

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:34:28 +0000 (15:34 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Reviewed by: royger
Approved by: bapt (mentor)
Differential Revision: D3476

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:33:09 +0000 (15:33 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Approved by: bapt (mentor)
Differential Revision: D3475

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:32:08 +0000 (15:32 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Reviewed by: melifaro
Approved by: bapt (mentor)
Differential Revision: D3473

8 years agoSync ypwhich(1) code with the OpenBSD version that is more modern.
araujo [Tue, 25 Aug 2015 15:27:32 +0000 (15:27 +0000)]
Sync ypwhich(1) code with the OpenBSD version that is more modern.
Update the BSD LICENSE and remove the 3rd clause.

Reviewed by: rodrigc, kib, bapt
Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: D3249

8 years agoLeave hypervisor mode upon startup on ARMv7
zbb [Tue, 25 Aug 2015 14:49:11 +0000 (14:49 +0000)]
Leave hypervisor mode upon startup on ARMv7

If ARMv7 boots in HYP mode, switch to SVC32.

Reviewed by:   ian
Submitted by:  Wojciech Macek <wma@semihalf.com>
               Jakub Palider  <jpa@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Annapurna Labs
Differential Revision: https://reviews.freebsd.org/D1810

8 years agoMake UTF-8 parsing and generation more strict.
ed [Tue, 25 Aug 2015 09:16:09 +0000 (09:16 +0000)]
Make UTF-8 parsing and generation more strict.

- in mbrtowc() we need to disallow codepoints above 0x10ffff.
- In wcrtomb() we need to disallow codepoints between 0xd800 and 0xdfff.

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

8 years agoCall the new RSS hash calculation function to correctly calculate a hash
adrian [Tue, 25 Aug 2015 06:12:59 +0000 (06:12 +0000)]
Call the new RSS hash calculation function to correctly calculate a hash
based on the configured requirements for the protocol.

Tested:

* UDP IPv6 TX/RX testing, w/ RSS enabled, 82599 ixgbe(4) hardware

8 years agoFinish r89633 and completely remove the remaining of VERSION.
delphij [Tue, 25 Aug 2015 05:31:00 +0000 (05:31 +0000)]
Finish r89633 and completely remove the remaining of VERSION.

PR: bin/202308
Submitted by: John Hein <z7dr6ut7gs snkmail com>
MFC after: 2 weeks

8 years agoTesting whether a page is dirty does not require the page lock. Moreover,
alc [Tue, 25 Aug 2015 01:01:25 +0000 (01:01 +0000)]
Testing whether a page is dirty does not require the page lock.  Moreover,
it may involve a pmap operation that iterates over the page's PV list, so
unnecessarily holding the page lock is undesirable.

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

8 years agoFix the spelling of eri's name.
loos [Mon, 24 Aug 2015 23:40:36 +0000 (23:40 +0000)]
Fix the spelling of eri's name.

Pointy hat to: loos
MFC with: r287009

8 years agoReapply r196551 which was accidentally reverted by r223637 (update to
loos [Mon, 24 Aug 2015 21:41:05 +0000 (21:41 +0000)]
Reapply r196551 which was accidentally reverted by r223637 (update to
OpenBSD pf 4.5).

Fix argument ordering to memcpy as well as the size of the copy in the
(theoretical) case that pfi_buffer_cnt should be greater than ~_max.

This fix the failure when you hit the self table size and force it to be
resized.

MFC after: 3 days
Sponsored by: Rubicon Communications (Netgate)

8 years agoioatcontrol(8): Fix build
cem [Mon, 24 Aug 2015 20:39:22 +0000 (20:39 +0000)]
ioatcontrol(8): Fix build

Tripped up by the FBSD SVN pre-commit hook!

Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division

8 years agoImport ioat(4) driver
cem [Mon, 24 Aug 2015 19:32:03 +0000 (19:32 +0000)]
Import ioat(4) driver

I/OAT is also referred to as Crystal Beach DMA and is a Platform Storage
Extension (PSE) on some Intel server platforms.

This driver currently supports DMA descriptors only and is part of a
larger effort to upstream an interconnect between multiple systems using
the Non-Transparent Bridge (NTB) PSE.

For now, this driver is only built on AMD64 platforms.  It may be ported
to work on i386 later, if that is desired.  The hardware is exclusive to
x86.

Further documentation on ioat(4), including API documentation and usage,
can be found in the new manual page.

Bring in a test tool, ioatcontrol(8), in tools/tools/ioat.  The test
tool is not hooked up to the build and is not intended for end users.

Submitted by: jimharris, Carl Delsey <carl.r.delsey@intel.com>
Reviewed by: jimharris (reviewed my changes)
Approved by: markj (mentor)
Relnotes: yes
Sponsored by: Intel
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3456

8 years agoEnable hardfloat for assembly generation.
adrian [Mon, 24 Aug 2015 19:09:56 +0000 (19:09 +0000)]
Enable hardfloat for assembly generation.

gcc versions later than 4.2 started erroring out on seeing hardware
floating point references when soft-float was enabled.

Reviewed by: imp

8 years agoWhen forking a child process with PMC_F_DESCENDANTS set in pmc_attach()
bz [Mon, 24 Aug 2015 18:57:32 +0000 (18:57 +0000)]
When forking a child process with PMC_F_DESCENDANTS set in pmc_attach()
in the parent, we will inherit the pmcids but cannot execute any operations
on them in the child.  The reason for this is that pmc_find_pmc() only
tries to find the current process on the owners hash list, but given the
child does not own the attachment, we cannot find it.
Thus, in case the initial lookup fails, try to find the pmc_process state
affiliated with the child process, lookup the pmc from there using the
row index, and get the owner process from that pmc.
Then continue as normal and lookup the pmc context of the owner (process).

This allows us to call, e.g., pmc_start() in the child process before we
start the work there, but to collect the accumulated results later in
the parent.

Sponsored by: DARPA,AFRL
Obtained from: L41
Tested by: rwatson, L41
MFC after: 4 weeks
Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D2052

8 years agoFix build for architectures that define wchar_t as an unsigned int.
marcel [Mon, 24 Aug 2015 17:58:11 +0000 (17:58 +0000)]
Fix build for architectures that define wchar_t as an unsigned int.

Reported by: bz@

8 years agoCheck the frame pointer is within the kernel before accessing it.
andrew [Mon, 24 Aug 2015 17:28:19 +0000 (17:28 +0000)]
Check the frame pointer is within the kernel before accessing it.

8 years agoStyle/whitespace cleanup in shared/common code.
sbruno [Mon, 24 Aug 2015 16:32:57 +0000 (16:32 +0000)]
Style/whitespace cleanup in shared/common code.

Differential Revision: https://reviews.freebsd.org/D3159
Submitted by: erj
MFC after: 2 weeks

8 years agoUpgrade libxo to 0.4.5.
marcel [Mon, 24 Aug 2015 16:26:20 +0000 (16:26 +0000)]
Upgrade libxo to 0.4.5.

Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117

Obtained from: https://github.com/Juniper/libxo

8 years agoMake it possible to forcibly unmount devfs.
trasz [Mon, 24 Aug 2015 14:04:44 +0000 (14:04 +0000)]
Make it possible to forcibly unmount devfs.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove now unused LIBPRIVATEDIR
bapt [Mon, 24 Aug 2015 13:46:12 +0000 (13:46 +0000)]
Remove now unused LIBPRIVATEDIR

Sponsored by: Gandi.net

8 years agoMake vfs_unmountall() unmount /dev after /, not before. The only
trasz [Mon, 24 Aug 2015 13:18:13 +0000 (13:18 +0000)]
Make vfs_unmountall() unmount /dev after /, not before.  The only
reason this didn't result in an unclean shutdown is that devfs ignores
MNT_FORCE flag.

Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3467

8 years agoFix libproc on architectures that don't need the program counter to be
andrew [Mon, 24 Aug 2015 12:17:15 +0000 (12:17 +0000)]
Fix libproc on architectures that don't need the program counter to be
adjusted. This seems to be the case on all non-x86 architectures libproc
supports.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3465

8 years agoAdd support for pmap_sync_icache on arm64.
andrew [Mon, 24 Aug 2015 12:01:39 +0000 (12:01 +0000)]
Add support for pmap_sync_icache on arm64.

Reviewed by: emaste, imp (both earlier version)
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3438

8 years agoAdd pages used by the PV entries to minidumps.
andrew [Mon, 24 Aug 2015 10:55:54 +0000 (10:55 +0000)]
Add pages used by the PV entries to minidumps.

8 years agoMFV (partial) r286889: 5692 expose the number of hole blocks in a file
avg [Mon, 24 Aug 2015 09:48:50 +0000 (09:48 +0000)]
MFV (partial) r286889: 5692 expose the number of hole blocks in a file

FreeBSD porting notes:
- only kernel-side changes are merged
- the new ioctl is not actually implemented yet
- thus, the goal is to synchronize DMU code

illumos/illumos-gate@2bcf0248e992f292c7b814458bcdce2f004925d6

https://www.illumos.org/issues/5692
we would like to expose the number of hole (sparse) blocks in a file.
this can be useful to for example if you want to fill in the holes with
some data; knowing the number of holes in advances allows you to report
progress on hole filling. We could use SEEK_HOLE to do that but it would
be O(n) where n is the number of holes present in the file.

Author: Max Grossman <max.grossman@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Boris Protopopov <bprotopopov@hotmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

8 years agoSome random tweaks to ctl.conf(5).
trasz [Mon, 24 Aug 2015 09:33:12 +0000 (09:33 +0000)]
Some random tweaks to ctl.conf(5).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation