]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRemove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.
kevlo [Tue, 15 Dec 2015 15:19:06 +0000 (15:19 +0000)]
Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.

8 years agoRemove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.
kevlo [Tue, 15 Dec 2015 15:08:29 +0000 (15:08 +0000)]
Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.

Reviewed by: bde

8 years agoAdd flag to disable inital reboot(8) userland sync
smh [Tue, 15 Dec 2015 14:17:07 +0000 (14:17 +0000)]
Add flag to disable inital reboot(8) userland sync

Add -N flag to reboot(8) which bypasses the userland sync(2) during
reboot(8) while still allow the kernel sync during the reboot(2) syscall
to occur.

An example use of this is when rebooting with disconnected iSCSI sessions
which would otherwise cause the reboot to hang on BIOs that will never
complete.

Reviewed by: bjk
MFC after: 2 weeks
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4449

8 years agoFix example code rendering, \n needs escaping to show up.
brueffer [Tue, 15 Dec 2015 13:29:05 +0000 (13:29 +0000)]
Fix example code rendering, \n needs escaping to show up.

PR: 203536
Submitted by: Fabian Keil

8 years agoFlush intermediate TLB cache when L2 page table is unlinked.
skra [Tue, 15 Dec 2015 13:17:40 +0000 (13:17 +0000)]
Flush intermediate TLB cache when L2 page table is unlinked.

This fixes an issue observed on Cortex A7 (RPi2) and on Cortex A15
(Jetson TK1) causing various memory corruptions. It turned out that
even L2 page table with no valid mapping might be a subject of such
caching.

Note that not all platforms have intermediate TLB caching implemented.
An open question is if this fix is sufficient for all platforms with
this feature.

Approved by: kib (mentor)

8 years agoAssorted grammar, spelling and punctuation fixes.
brueffer [Tue, 15 Dec 2015 13:04:44 +0000 (13:04 +0000)]
Assorted grammar, spelling and punctuation fixes.

PR: 203336, 203339
Submitted by: espeyb@rpi.edu, themesta@gmail.com
MFC after: 1 week

8 years agoShow the enclosure name and id in sesutil map
bapt [Tue, 15 Dec 2015 13:01:14 +0000 (13:01 +0000)]
Show the enclosure name and id in sesutil map

Sponsored by: Gandi.net

8 years agoARM: Remove outdated katelib.h.
mmel [Tue, 15 Dec 2015 12:52:45 +0000 (12:52 +0000)]
ARM: Remove outdated katelib.h.

Approved by: kib (mentor)

8 years agoARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it
mmel [Tue, 15 Dec 2015 12:51:58 +0000 (12:51 +0000)]
ARM: option PPC_PROBE_CHIPSET is applicable only for x86. Don't enable it
for ARM LINT config.

Approved by: kib (mentor)

8 years agohyperv/kvp: wake up the daemon if it's sleeping due to poll()
royger [Tue, 15 Dec 2015 11:20:20 +0000 (11:20 +0000)]
hyperv/kvp: wake up the daemon if it's sleeping due to poll()

Without the patch, there is a race condition: when poll() is invoked(),
if kvp_globals.daemon_busy is false, the daemon won't be timely
woke up, because hv_kvp_send_msg_to_daemon() can't wake up the daemon
in this case.

Submitted by:           Dexuan Cui <decui@microsoft.com>
Sponsored by: Microsoft OSTC
Reviewed by: delphij, royger
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4258

8 years agoAdd entry for lib80211; fix a typo in libsysdecode.
brueffer [Tue, 15 Dec 2015 10:26:47 +0000 (10:26 +0000)]
Add entry for lib80211; fix a typo in libsysdecode.

8 years agoMinor spelling, mdoc and style cleanup.
brueffer [Tue, 15 Dec 2015 10:24:48 +0000 (10:24 +0000)]
Minor spelling, mdoc and style cleanup.

8 years agox86/bounce: try to always completely fill bounce pages
royger [Tue, 15 Dec 2015 10:07:03 +0000 (10:07 +0000)]
x86/bounce: try to always completely fill bounce pages

Current code doesn't try to make use of the full page when bouncing because
the size is only expanded to be a multiple of the alignment. Instead try to
always create segments of PAGE_SIZE when using bounce pages.

This allows us to remove the specific casing done for
BUS_DMA_KEEP_PG_OFFSET, since the requirement is to make sure the offsets
into contiguous segments are aligned, and now this is done by default.

Sponsored by: Citrix Systems R&D
Reviewed by: hps, kib
Differential revision: https://reviews.freebsd.org/D4119

8 years agoProperly drain callouts in the IPFW subsystem to avoid use after free
hselasky [Tue, 15 Dec 2015 09:02:05 +0000 (09:02 +0000)]
Properly drain callouts in the IPFW subsystem to avoid use after free
panics when unloading the dummynet and IPFW modules:

- The callout drain function can sleep and should not be called having
a non-sleepable lock locked. Remove locks around "ipfw_dyn_uninit(0)".

- Add a new "dn_gone" variable to prevent asynchronous restart of
dummynet callouts when unloading the dummynet kernel module.

- Call "dn_reschedule()" locked so that "dn_gone" can be set and
checked atomically with regard to starting a new callout.

Reviewed by: hiren
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3855

8 years agoFix a typo (opencrypto -> crypto) and remove useless comment.
kevlo [Tue, 15 Dec 2015 06:01:02 +0000 (06:01 +0000)]
Fix a typo (opencrypto -> crypto) and remove useless comment.

8 years agoAllow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
ngie [Tue, 15 Dec 2015 05:37:09 +0000 (05:37 +0000)]
Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition

MFC after: 3 days
Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519

8 years agoAdd MSI-X support for 26XX cards.
mav [Tue, 15 Dec 2015 04:51:50 +0000 (04:51 +0000)]
Add MSI-X support for 26XX cards.

Unlike previous, this generation does not support regular MSIs any more.

8 years ago[arswitch] bump the number of ports on the ar934x internal switch.
adrian [Tue, 15 Dec 2015 04:46:48 +0000 (04:46 +0000)]
[arswitch] bump the number of ports on the ar934x internal switch.

It indeed has more ports by default.

8 years ago[qca953x] remove unneeded initialisation.
adrian [Tue, 15 Dec 2015 04:45:00 +0000 (04:45 +0000)]
[qca953x] remove unneeded initialisation.

This was copied from another chip file and it's not required on Honeybee.

Tested:

* AP143, QCA9531 SoC.

Obtained from: OpenWRT

8 years ago[ar71xx] always count interrupts, spurious or otherwise.
adrian [Tue, 15 Dec 2015 04:44:06 +0000 (04:44 +0000)]
[ar71xx] always count interrupts, spurious or otherwise.

This aids in debugging.

8 years ago[arge] add a comment about needing mdio busses in order to use the interface.
adrian [Tue, 15 Dec 2015 04:43:28 +0000 (04:43 +0000)]
[arge] add a comment about needing mdio busses in order to use the interface.

This is a holdover from how reset is handled in the ARGE_MDIO world.
You need to define the mdio bus device if you want to use the ethernet
device or the arge setup path doesn't bring the MAC out of reset.

8 years agoFlip this over to ncurses.
adrian [Tue, 15 Dec 2015 04:28:31 +0000 (04:28 +0000)]
Flip this over to ncurses.

8 years agoDIRDEPS_BUILD: Support bootstrapping from PROGS.(DPADD|LIBADD).
bdrewery [Tue, 15 Dec 2015 02:51:05 +0000 (02:51 +0000)]
DIRDEPS_BUILD: Support bootstrapping from PROGS.(DPADD|LIBADD).

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix incorrectly adding in RELDIR for DIRDEPS in bootstrapping.
bdrewery [Tue, 15 Dec 2015 02:46:14 +0000 (02:46 +0000)]
DIRDEPS_BUILD: Fix incorrectly adding in RELDIR for DIRDEPS in bootstrapping.

This is not wrong, but was unexpected.  Using <empty>:H results in '.' which
then using the rest of the conversion was added in RELDIR.  This was also
causing an empty _DP_DIRDEPS to resolve to SRCTOP for DIRDEPS.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Avoid duplicates in DIRDEPS for bootstrapping.
bdrewery [Tue, 15 Dec 2015 02:27:31 +0000 (02:27 +0000)]
DIRDEPS_BUILD: Avoid duplicates in DIRDEPS for bootstrapping.

This logic is potentially included multiple times, so overwrite the temporary
variable rather than append to it.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd comment about OBJTOP not yet being defined outside of META MODE.
bdrewery [Tue, 15 Dec 2015 00:40:04 +0000 (00:40 +0000)]
Add comment about OBJTOP not yet being defined outside of META MODE.

It is fine for the purpose of the check though.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r291739: Don't suggest LDADD on private libs to use LIBADD.
bdrewery [Tue, 15 Dec 2015 00:16:34 +0000 (00:16 +0000)]
Follow-up r291739: Don't suggest LDADD on private libs to use LIBADD.

This is because LDADD+=-lFOO is not the same as LDADD+=-lprivateFOO which is
what the private libs in LIBADD are.

Sponsored by: EMC / Isilon Storage Division

8 years agoStart on a new library (libsysdecode) that provides routines for decoding
jhb [Tue, 15 Dec 2015 00:05:07 +0000 (00:05 +0000)]
Start on a new library (libsysdecode) that provides routines for decoding
system call information such as system call arguments.  Initially this
will consist of pulling duplicated code out of truss and kdump though it
may prove useful for other utilities in the future.

This commit moves the shared utrace(2) record parser out of kdump into
the library and updates kdump and truss to use it.  One difference from
the previous version is that the library version treats unknown events
that start with the "RTLD" signature as unknown events.  This simplifies
the interface and allows the consumer to decide how to handle all
non-recognized events.  Instead, this function only generates a string
description for known malloc() and RTLD records.

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D4537

8 years agoFollow-up r290423: Don't use CSH for buildenv shell.
bdrewery [Mon, 14 Dec 2015 23:25:31 +0000 (23:25 +0000)]
Follow-up r290423: Don't use CSH for buildenv shell.

It does not properly import PATH; the PATH is reset by included profile
files on startup which breaks the biggest feature of buildenv (using
sysrooted cc from WORLDTMP)

Spotted by: smh, kib
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd strlcat() and strlcpy() to libstand.
ian [Mon, 14 Dec 2015 23:09:30 +0000 (23:09 +0000)]
Add strlcat() and strlcpy() to libstand.

8 years agoAllow overriding FILESDIRs for snmp files.
bdrewery [Mon, 14 Dec 2015 22:42:05 +0000 (22:42 +0000)]
Allow overriding FILESDIRs for snmp files.

Sponsored by: EMC / Isilon Storage Division

8 years agoioatcontrol(8): Add support for interrupt coalescing
cem [Mon, 14 Dec 2015 22:02:01 +0000 (22:02 +0000)]
ioatcontrol(8): Add support for interrupt coalescing

The new flag, -c <period>, sets the interrupt coalescing period in
microseconds through the new ioat(4) API ioat_set_interrupt_coalesce().

Also add a -z flag to zero ioat statistics before tests, to make it easy
to measure results.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Add support for interrupt coalescing
cem [Mon, 14 Dec 2015 22:01:52 +0000 (22:01 +0000)]
ioat(4): Add support for interrupt coalescing

In I/OAT, this is done through the INTRDELAY register.  On supported
platforms, this register can coalesce interrupts in a set period to
avoid excessive interrupt load for small descriptor workflows.  The
period is configurable anywhere from 1 microsecond to 16.38
milliseconds, in microsecond granularity.

Sponsored by: EMC / Isilon Storage Division

8 years agoEnhance the "ubenv import" command to allow importing a u-boot env var
ian [Mon, 14 Dec 2015 22:00:46 +0000 (22:00 +0000)]
Enhance the "ubenv import" command to allow importing a u-boot env var
directly into a loader (and thus kernel) env var, using the syntax

  ubenv import ldvarname=ubvarname

Without the varname= prefix it uses the historical behavior of importing
to the name uboot.ubvarname.

8 years agoioat(4): Gather and expose DMA statistics via sysctl
cem [Mon, 14 Dec 2015 22:00:07 +0000 (22:00 +0000)]
ioat(4): Gather and expose DMA statistics via sysctl

Organize the dev.ioat sysctl node into a tree while we're here.

Sponsored by: EMC / Isilon Storage Division

8 years agoLet termcap be used in LIBADD.
bdrewery [Mon, 14 Dec 2015 21:00:00 +0000 (21:00 +0000)]
Let termcap be used in LIBADD.

Sponsored by: EMC / Isilon Storage Division

8 years agourtwn: add raw Tx path.
avos [Mon, 14 Dec 2015 20:39:38 +0000 (20:39 +0000)]
urtwn: add raw Tx path.

Tested with RTL8188EU and RTL8188CUS in STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4523

8 years agoinet6: Do not assume every interface has ip6 enabled.
kp [Mon, 14 Dec 2015 19:44:49 +0000 (19:44 +0000)]
inet6: Do not assume every interface has ip6 enabled.

Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
updated.

pfsync interfaces will never have ip6 support, because it's explicitly disabled
in in6_domifattach().

PR: 205194
Reviewed by: melifaro, hrs
Differential Revision: https://reviews.freebsd.org/D4522

8 years agoDon't retry SAS commands in response to protocol errors
asomers [Mon, 14 Dec 2015 19:40:47 +0000 (19:40 +0000)]
Don't retry SAS commands in response to protocol errors

sys/dev/mpr/mpr_sas_lsi.c
sys/dev/mps/mps_sas_lsi.c
When mp[rs]sas_get_sata_identify returns
MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR, don't bother retrying. Protocol
errors aren't likely to be fixed by sleeping.

Without this change, a system that generated may protocol errors due
to signal integrity issues was taking more than an hour to boot, due
to all the retries.

Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4553

8 years agoUpdate advice on obj disk space requirements
emaste [Mon, 14 Dec 2015 19:20:18 +0000 (19:20 +0000)]
Update advice on obj disk space requirements

The Makefile is not the best place for this information, but at least it
is now less out of date.

8 years agoresolver: preserve binary compatibility; reduce header pollution
vangyzen [Mon, 14 Dec 2015 17:21:06 +0000 (17:21 +0000)]
resolver: preserve binary compatibility; reduce header pollution

In r289315, I added new fields to res_state.  This broke binary
backward compatibility.  It also broke some ports (and possibly
other code) by requiring the definition of time_t and struct timespec.

Fix these problems by moving the new fields into __res_state_ext.

Suggested by: ume
Reviewed by: ume
MFC after: 3 days
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D4472

8 years agoUpdate the handling of interrupts on the generic PCIe driver:
andrew [Mon, 14 Dec 2015 17:08:40 +0000 (17:08 +0000)]
Update the handling of interrupts on the generic PCIe driver:
 * Use the interrupt-map property to route interrupts
 * Remove the IRQ rman, it's now unneeded
 * Support MSI/MSI-X interrupts

With this I'm able to use the two NICs I've tested (em and msk), however
while I can boot with an AHCI devie attached it fails when any drives are
connected.

Obtained from: ABT Systems Ltd
Sponsored by: SoftIron Inc

8 years agoAdd support for MSI interrupts to the gicv2m controller. The allocation
andrew [Mon, 14 Dec 2015 16:07:20 +0000 (16:07 +0000)]
Add support for MSI interrupts to the gicv2m controller. The allocation
is still quite simplistic, it just increments a counter to use the next
interrupt.

Obtained from: ABT Systems Ltd
Sponsored by: SoftIron Inc

8 years agoFlesh out the SEE ALSO section.
brueffer [Mon, 14 Dec 2015 15:44:34 +0000 (15:44 +0000)]
Flesh out the SEE ALSO section.

PR: 202929
Submitted by: jhs@berklix.com
MFC after: 1 week

8 years agoFix kernel build with "options GEOM_MOUNTVER". Previously it was only
trasz [Mon, 14 Dec 2015 13:51:14 +0000 (13:51 +0000)]
Fix kernel build with "options GEOM_MOUNTVER".  Previously it was only
working as a kernel module.

PR: 205026
Submitted by: Eugene Grosbein <eugen@grosbein.net>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agourtwn: fix frame processing in the Rx path.
avos [Mon, 14 Dec 2015 13:05:16 +0000 (13:05 +0000)]
urtwn: fix frame processing in the Rx path.

Currently, in case when npkts >= 2, RSSI and Rx radiotap fields
will be overridden by the next packet. As a result, every packet
from this chain will use the same RSSI / radiotap data.

After this change, RSSI and radiotap structure will be filled
for every frame right before ieee80211_input() call.

Tested with RTL8188EU / RTL8188CUS, STA and MONITOR modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4487

8 years agoUpgrade to Unbound 1.5.7.
des [Mon, 14 Dec 2015 13:01:51 +0000 (13:01 +0000)]
Upgrade to Unbound 1.5.7.

8 years agoClean up issues reported by mandoc -Tlint
brueffer [Mon, 14 Dec 2015 13:01:36 +0000 (13:01 +0000)]
Clean up issues reported by mandoc -Tlint

8 years agoNon-exhaustive mdoc/spelling/style cleanup.
brueffer [Mon, 14 Dec 2015 12:37:06 +0000 (12:37 +0000)]
Non-exhaustive mdoc/spelling/style cleanup.

PR: 202716, 204301 (both spelling)
Submitted by: Richard Farr, madpilot

8 years agourtwn: add TSF field into RX radiotap header.
avos [Mon, 14 Dec 2015 12:36:10 +0000 (12:36 +0000)]
urtwn: add TSF field into RX radiotap header.

Tested with RTL8188EU, MONITOR/STA modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3831

8 years agoWhen exiting two-finger scroll the Synaptics device may report a jump in
andrew [Mon, 14 Dec 2015 11:13:50 +0000 (11:13 +0000)]
When exiting two-finger scroll the Synaptics device may report a jump in
absolute position. This seems to be correlated with only removing a single
finger. To work around this report no movement on from the first packet
when the user exits scrolling.

8 years agoSkip restoring more registers when returning from an exception taken in
andrew [Mon, 14 Dec 2015 10:06:01 +0000 (10:06 +0000)]
Skip restoring more registers when returning from an exception taken in
the kernel. These registers are all callee saved, and as such will be
restored before returning to the exception handler.

Userland still needs these registers to be restored as they may be changed
by the kernel and we don't currently track these places.

8 years agoSplit KNOWN_ARCHES so we have one per line to simplify merging future
andrew [Mon, 14 Dec 2015 09:52:09 +0000 (09:52 +0000)]
Split KNOWN_ARCHES so we have one per line to simplify merging future
architectures.

8 years agoAdd the cryptodev device.
kevlo [Mon, 14 Dec 2015 07:08:17 +0000 (07:08 +0000)]
Add the cryptodev device.

8 years agoMove the DRIVER_MODULE() statements that declare mmc(4) to be a child of
ian [Mon, 14 Dec 2015 01:09:25 +0000 (01:09 +0000)]
Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of
the various bridge drivers out of dev/mmc.c and into the bridge drivers.

Requested by:    jhb (almost two years ago; better late than never)

8 years agoThe new pnp module records causes older kldxref to spew some
imp [Sun, 13 Dec 2015 22:11:37 +0000 (22:11 +0000)]
The new pnp module records causes older kldxref to spew some
warnings. Make a note of it to inform people how to get around it.

8 years agowpi, rum and urtwn: update copyright headers
avos [Sun, 13 Dec 2015 22:08:27 +0000 (22:08 +0000)]
wpi, rum and urtwn: update copyright headers

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4489

8 years agourtwn: add support for hardware encryption (WEP, TKIP and CCMP)
avos [Sun, 13 Dec 2015 22:00:19 +0000 (22:00 +0000)]
urtwn: add support for hardware encryption (WEP, TKIP and CCMP)

Tested with:
- RTL8188EU;
- RTL8188CUS;

Modes:
- IBSS mode: TKIP, CCMP (WPA-None);
- STA / HOSTAP modes - WEP (static), TKIP, CCMP;

Reviewed by: kevlo
Approved by: adrian (mentor)
Obtained from: OpenBSD (mostly)
Differential Revision: https://reviews.freebsd.org/D4448

8 years agourtwn: add a command queue for sleepable tasks.
avos [Sun, 13 Dec 2015 21:50:38 +0000 (21:50 +0000)]
urtwn: add a command queue for sleepable tasks.

An implementation from rum(4) was used (it looks simpler for me).
Will be used for h/w encryption support.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4447

8 years agourtwn(4): setup channel frequency/flags for radiotap in urtwn_set_channel()
avos [Sun, 13 Dec 2015 21:43:54 +0000 (21:43 +0000)]
urtwn(4): setup channel frequency/flags for radiotap in urtwn_set_channel()

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3832

8 years ago- Properly set mode and atime/ctime for symlinks
ak [Sun, 13 Dec 2015 21:31:45 +0000 (21:31 +0000)]
- Properly set mode and atime/ctime for symlinks

Approved by: des

8 years agourtwn: add rate control support for RTL8188EU.
avos [Sun, 13 Dec 2015 21:00:21 +0000 (21:00 +0000)]
urtwn: add rate control support for RTL8188EU.

Tested with:
- RTL8188EU, STA and HOSTAP modes.
- RTL8188CUS, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4402

8 years agowtap: do not include <sys/types.h> when <sys/param.h> is already included
avos [Sun, 13 Dec 2015 20:53:51 +0000 (20:53 +0000)]
wtap: do not include <sys/types.h> when <sys/param.h> is already included

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4536

8 years agonet80211: remove hardcoded slot time durations from drivers
avos [Sun, 13 Dec 2015 20:48:24 +0000 (20:48 +0000)]
net80211: remove hardcoded slot time durations from drivers

- Add IEEE80211_GET_SLOTTIME(ic) macro.
- Use predefined macroses to set slot time.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4044

8 years agoFix bsdbox builds after the recent libkvm requirement for libelf.
adrian [Sun, 13 Dec 2015 20:31:36 +0000 (20:31 +0000)]
Fix bsdbox builds after the recent libkvm requirement for libelf.

8 years agoFix PINNED routes handling.
melifaro [Sun, 13 Dec 2015 16:37:01 +0000 (16:37 +0000)]
Fix PINNED routes handling.
Before r291643, adding new interface prefix had the following logic:
try_add:
  EEXIST && (PINNED) {
    try_del(w/o PINNED flag)
    if (OK)
      try_add(PINNED)
}

In r291643, deletion was performed w/ PINNED flag held which leaded
  to new interface prefixes (like ::1) overriding older ones.
  Fix this by requesting deletion w/o RTF_PINNED.

PR: kern/205285
Submitted by: Fabian Keil <fk at fabiankeil.de>

8 years agoTweak comments.
trasz [Sun, 13 Dec 2015 11:30:36 +0000 (11:30 +0000)]
Tweak comments.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoActually make the 'amount' argument to racct_adjust_resource() signed,
trasz [Sun, 13 Dec 2015 11:21:13 +0000 (11:21 +0000)]
Actually make the 'amount' argument to racct_adjust_resource() signed,
as it was always supposed to be.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAvoid useless relocking.
trasz [Sun, 13 Dec 2015 11:08:29 +0000 (11:08 +0000)]
Avoid useless relocking.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoSIMPLEBUS: Don't panic if child device doesn't have devinfo set.
mmel [Sun, 13 Dec 2015 09:05:55 +0000 (09:05 +0000)]
SIMPLEBUS: Don't panic if child device doesn't have devinfo set.
Strictly speaking, missing devinfo is error which can be caused
by instantiating child using device_add_child() instead of
BUS_ADD_CHILD(). However, we can tolerate it.

Approved by: kib (mentor)

8 years agoFixed uninitialized variable warnings.
kaiw [Sun, 13 Dec 2015 08:27:14 +0000 (08:27 +0000)]
Fixed uninitialized variable warnings.

8 years agoOFW_IICBUS: Register ofw_iicbus node.
mmel [Sun, 13 Dec 2015 08:23:45 +0000 (08:23 +0000)]
OFW_IICBUS: Register ofw_iicbus node.
The iicbus can be referenced from other nodes in DT.

Approved by: kib (mentor)

8 years agoOFW: Add helper functions for parsing xref based lists.
mmel [Sun, 13 Dec 2015 08:17:49 +0000 (08:17 +0000)]
OFW: Add helper functions for parsing xref based lists.
By using this functions, we can parse a list of tuples, each of them holds
xref and variable number of values.
This kind of list is used in DT for clocks, gpios, resets ...

Discussed with: ian, nwhitehorn
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D4316

8 years agoRemove LLE read lock from IPv6 fast path.
melifaro [Sun, 13 Dec 2015 07:39:49 +0000 (07:39 +0000)]
Remove LLE read lock from IPv6 fast path.

LLE structure is mostly unchanged during its lifecycle: there are only 2
things relevant for fast path lookup code:
1) link-level address change. Since r286722, these updates are performed
  under AFDATA WLOCK.
2) Some sort of feedback indicating that this particular entry is used so
  we send NS to perform reachability verification instead of expiring entry.
  The only signal that is needed from fast path is something like binary
  yes/no.
The latter is solved by the following changes:

Special r_skip_req (introduced in D3688) value is used for fast path feedback.
  It is read lockless by fast path, but updated under req_mutex mutex. If this
  field is non-zero, then fast path will acquire lock and set it back to 0.

After transitioning to STALE state, callout timer is armed to run each
  V_nd6_delay seconds to make sure that if packet was transmitted at the start
  of given interval, we would be able to switch to PROBE state in V_nd6_delay
  seconds as user expects.
(in STALE state) timer is rescheduled until original V_nd6_gctimer expires
  keeping lle in STALE state (remaining timer value stored in lle_remtime).
(in STALE state) timer is rescheduled if packet was transmitted less that
  V_nd6_delay seconds ago to make sure we transition to PROBE state exactly
  after V_n6_delay seconds.

As a result, all packets towards lle in REACHABLE/STALE/PROBE states are handled
  by fast path without acquiring lle read lock.

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

8 years agoAdd -static to CFLAGS to unbreak the tests by using a libc.a with
ngie [Sun, 13 Dec 2015 06:33:52 +0000 (06:33 +0000)]
Add -static to CFLAGS to unbreak the tests by using a libc.a with
the xlocale private symbols exposed which aren't exposed publicly
via the DSO

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

8 years agoEliminate a typo that crept into a last minute change before commit :(
imp [Sun, 13 Dec 2015 04:15:13 +0000 (04:15 +0000)]
Eliminate a typo that crept into a last minute change before commit :(

Noticed by: Olivier Cochard-Labbe

8 years agoFix typos in comments.
imp [Sun, 13 Dec 2015 04:15:10 +0000 (04:15 +0000)]
Fix typos in comments.

8 years agoAsk make(1) which compiler to use rather than rely on whatever is in $PATH.
des [Sat, 12 Dec 2015 22:54:12 +0000 (22:54 +0000)]
Ask make(1) which compiler to use rather than rely on whatever is in $PATH.

8 years agoimport unbound 1.5.7
des [Sat, 12 Dec 2015 22:18:57 +0000 (22:18 +0000)]
import unbound 1.5.7

8 years agoimport unbound 1.5.6
des [Sat, 12 Dec 2015 22:17:01 +0000 (22:17 +0000)]
import unbound 1.5.6

8 years agoexec(3): Fix COMPATIBILITY section: default path does not contain cwd.
jilles [Sat, 12 Dec 2015 15:57:46 +0000 (15:57 +0000)]
exec(3): Fix COMPATIBILITY section: default path does not contain cwd.

MFC after: 1 week

8 years agoRFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.
ume [Sat, 12 Dec 2015 14:42:50 +0000 (14:42 +0000)]
RFC 3493 requires ignoring the loopback address for A_ADDRCONFIG.
Since it breaks certain jail setup, we ignore just 127.0.0.1
instead of whole loopback address range.

PR: 192014
Reviewed by: hrs
MFC after: 1 week

8 years agoIn md(4) over vnode, correct handling of the unaligned unmapped io
kib [Sat, 12 Dec 2015 14:08:29 +0000 (14:08 +0000)]
In md(4) over vnode, correct handling of the unaligned unmapped io
requests which page alignment + size is greater than MAXPHYS.  Right
now md(4) over vnode would use the physical buffer of the size MAXPHYS
to map a data of size MAXPHYS + page offset of the user buffer. This
typically corrupts next pbuf, or, if the pbuf used was the last pbuf
in the map, the next page after the pbuf's map.

Split request up to the size of io which fits into pbuf KVA with
alignment, and retry if a part of the bio is left unprocessed.

Reported by: Fabian Keil <fk@fabiankeil.de>
Tested by: Fabian Keil, pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years ago- Allow to extract symlinks
ak [Fri, 11 Dec 2015 23:52:08 +0000 (23:52 +0000)]
- Allow to extract symlinks
- Implement 4-digit year format listing (-y option)
- Improve detection of text files
- Use %ju for error_count as it is unsigned

Obtained from: NetBSD
Approved by: des

8 years ago- Remove stray whitespaces
ak [Fri, 11 Dec 2015 23:46:33 +0000 (23:46 +0000)]
- Remove stray whitespaces

Approved by: des

8 years agoDIRDEPS_BUILD: Don't force C dependencies on kernel modules for bootstrapping.
bdrewery [Fri, 11 Dec 2015 22:55:41 +0000 (22:55 +0000)]
DIRDEPS_BUILD: Don't force C dependencies on kernel modules for bootstrapping.

These use ld(1), effectively -nostdlib, and don't need any of these
normal dependencies.

kmod builds also define PROG so just checking for KMOD here seems to be
the easiest to handle it.

Sponsored by: EMC / Isilon Storage Division

8 years agoStart support for the RISC-V 64-bit architecture developed by UC Berkeley.
br [Fri, 11 Dec 2015 22:55:23 +0000 (22:55 +0000)]
Start support for the RISC-V 64-bit architecture developed by UC Berkeley.

RISC-V is a new ISA designed to support computer research and education, and
is now become a standard open architecture for industry implementations.

This is a minimal set of changes required to run 'make kernel-toolchain'
using external (GNU) toolchain.

The FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv.

Reviewed by: andrew, bdrewery, emaste, imp
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4445

8 years ago[PR 195033] Document mps.enable_ssu
rpokala [Fri, 11 Dec 2015 21:50:59 +0000 (21:50 +0000)]
[PR 195033] Document mps.enable_ssu

mps(4) sends StartStopUnit to SATA direct-access devices during shutdown.
Document the tunables which control that behavior.

PR: 195033
Reviewed by: scottl
Approved by: jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4456

8 years agoFix sesutil locate when a sesid is passed to locate command
bapt [Fri, 11 Dec 2015 21:11:02 +0000 (21:11 +0000)]
Fix sesutil locate when a sesid is passed to locate command

8 years agosesutil: Add extra information specific to some SES devices to sesutil map
bapt [Fri, 11 Dec 2015 20:45:39 +0000 (20:45 +0000)]
sesutil: Add extra information specific to some SES devices to sesutil map

Rework stat2ascii preparing a buffer of what could be printed. This prevent the
risk of overflowing a static buffer.

Do not print those informations anymore in the "status" but into a new
"extra status" only printed if there are actually extra things to print.

Now add those extra informations:

* Thermal sensor temperature
* Cooling devices speed
* Voltage sensors, current consumption

Tested by: AllanJude
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D4520

8 years agoUpdate to ELF Tool Chain r3272
emaste [Fri, 11 Dec 2015 20:28:27 +0000 (20:28 +0000)]
Update to ELF Tool Chain r3272

Highlights (not already in the FreeBSD tree):
 - addr2line: Speed up and support searching inlined functions
 - addr2line: Support -i, -a, -p options
 - readelf: Add some ARM relocation types
 - readelf, libelf: Avoid reading beyond end of buffer/file

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

8 years agoDon't make assertions about td_critnest when the scheduler is stopped.
markj [Fri, 11 Dec 2015 20:05:07 +0000 (20:05 +0000)]
Don't make assertions about td_critnest when the scheduler is stopped.

A panicking thread always executes with a critical section held, so any
attempt to allocate or free memory while dumping will otherwise cause a
second panic. This can occur, for example, if xpt_polled_action() completes
non-dump I/O that was pending at the time of the panic. The fact that this
can occur is itself a bug, but asserting in this case does little but
reduce the reliability of kernel dumps.

Suggested by: kib
Reported by: pho

8 years agoelfcopy: include extension but replace . when converting from binary
emaste [Fri, 11 Dec 2015 18:47:41 +0000 (18:47 +0000)]
elfcopy: include extension but replace . when converting from binary

The change in r291958 was not consistent with GNU objcopy. The start,
end and size symbols created for ELF objects converted from binary need
to include the full filename including the extension, but with the
periods replaced with underscores.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4474

8 years agoCorrect the CONFIG0_VI value. According to
imp [Fri, 11 Dec 2015 16:51:04 +0000 (16:51 +0000)]
Correct the CONFIG0_VI value. According to
http://www.t-es-t.hu/download/mips/md00090c.pdf this is bit 3 of the
config0 word, not bit 2.  This should fix virtually indexed caches
(relatively new in the MIPS world, so no current platforms used this
and current code just uses it as an optimization). It was causing
false positives on newer platforms that default to large values for
the kseg0 cache coherency attribute.

Submitted by: Stanislav Galabov
PR: 205249

8 years agoSort the list of NICs after the mii options. While here add the msk driver
andrew [Fri, 11 Dec 2015 15:25:47 +0000 (15:25 +0000)]
Sort the list of NICs after the mii options. While here add the msk driver
as it has now been tested.

Sponsored by: SoftIron Inc

8 years agoUse the right product names.
imp [Fri, 11 Dec 2015 15:24:29 +0000 (15:24 +0000)]
Use the right product names.

Pointy Hat To: imp@

8 years agoFixup include protections for building on mips64 with clang
lidl [Fri, 11 Dec 2015 15:12:01 +0000 (15:12 +0000)]
Fixup include protections for building on mips64 with clang

Reviewed by: sbruno, imp
Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4457

8 years agocrunchide: add RISC-V to supported machine types
emaste [Fri, 11 Dec 2015 13:55:31 +0000 (13:55 +0000)]
crunchide: add RISC-V to supported machine types

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agosesutils, pass the correct element type when printing the status of a given
bapt [Fri, 11 Dec 2015 11:08:00 +0000 (11:08 +0000)]
sesutils, pass the correct element type when printing the status of a given
element of the ses.

Sponsored by: Gandi.net

8 years agosesutil: fix map not printing the status of the LED device in an array
bapt [Fri, 11 Dec 2015 10:58:26 +0000 (10:58 +0000)]
sesutil: fix map not printing the status of the LED device in an array

Sponsored by: Gandi.net