]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMove the objects used to create temporary mappings for i386 pmap zero and copy
Jason A. Harmening [Fri, 23 Dec 2016 15:14:56 +0000 (15:14 +0000)]
Move the objects used to create temporary mappings for i386 pmap zero and copy
operations to the MD PCPU region.  Change sysmap initialization to only
allocate KVA pages for CPUs that are actually present.  As a minor
optimization, this also prevents false sharing between adjacent sysmap objects
since the pcpu struct is already cacheline-aligned.

While here, move pc_qmap_addr initialization for the BSP into
pmap_bootstrap(), which allows use of pmap_quick* functions during early boot.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8833

7 years agoAdd place-holders for TAPE STREAM MIRRORING subcommands of XCOPY.
Alexander Motin [Fri, 23 Dec 2016 14:54:40 +0000 (14:54 +0000)]
Add place-holders for TAPE STREAM MIRRORING subcommands of XCOPY.

We do not support tapes, so this is only a comments.

MFC after: 2 weeks

7 years agoProvide some guidance when dealing with sections and variables contained
Enji Cooper [Fri, 23 Dec 2016 08:59:23 +0000 (08:59 +0000)]
Provide some guidance when dealing with sections and variables contained
within them

For example, using variables designated for %usm requires uncommenting
%usm section header

MFC after: 1 month

7 years agoDon't hardcode $(securityModelUSM) (3) in the authPriv example under the %vacm
Enji Cooper [Fri, 23 Dec 2016 08:54:44 +0000 (08:54 +0000)]
Don't hardcode $(securityModelUSM) (3) in the authPriv example under the %vacm
section

MFC after: 1 week

7 years agohyperv/ic: Allow applying the samples from hypervisor unconditionally.
Sepherosa Ziehau [Fri, 23 Dec 2016 08:52:10 +0000 (08:52 +0000)]
hyperv/ic: Allow applying the samples from hypervisor unconditionally.

MFC after: 1 week
Sponsored by: Microsoft

7 years agohyperv/ic: Fix version4 timesync message format.
Sepherosa Ziehau [Fri, 23 Dec 2016 08:41:28 +0000 (08:41 +0000)]
hyperv/ic: Fix version4 timesync message format.

It is not compat w/ the old timesync message format, which the message
type stays the same as the old timesync message.

MFC after: 1 week
Sponsored by: Microsoft

7 years agoSort #includes per style(9)
Enji Cooper [Fri, 23 Dec 2016 07:55:13 +0000 (07:55 +0000)]
Sort #includes per style(9)

No functional change

MFC after: 3 days

7 years agoGroup all loadable modules in the %default section
Enji Cooper [Fri, 23 Dec 2016 06:56:48 +0000 (06:56 +0000)]
Group all loadable modules in the %default section

This will allow new users to uncomment the modules and have things work
with less head scratching, in the event they decide to uncomment any
of the section separators, e.g. %usm or %vcm, as the module loading is
only effective in the %default section.

MFC after: 1 week

7 years agoClean up trailing whitespace
Enji Cooper [Fri, 23 Dec 2016 06:35:18 +0000 (06:35 +0000)]
Clean up trailing whitespace

No functional change

MFC after: 3 days

7 years ago- More ifdef INET and INET6.
Hiroki Sato [Fri, 23 Dec 2016 06:29:24 +0000 (06:29 +0000)]
- More ifdef INET and INET6.
- Use STDERR_FILENO + 1 instead of "3".
- Fix dprintf() in cvthname().

7 years agoClarify failure in snmp_output(..) with call to snmp_pdu_decode
Enji Cooper [Fri, 23 Dec 2016 05:07:28 +0000 (05:07 +0000)]
Clarify failure in snmp_output(..) with call to snmp_pdu_decode

- Explicitly test snmp_pdu_encode against SNMP_CODE_OK instead of assuming
  any non-zero value is bad.
- Print out the code before calling abort() to give the end-user something
  actionable to debug without having to recompile the binary, since the
  core might not have these details.

MFC after: 1 week

7 years agoAdd a comment explaining the race fixed by r310423.
Mark Johnston [Fri, 23 Dec 2016 05:02:17 +0000 (05:02 +0000)]
Add a comment explaining the race fixed by r310423.

Suggested and reviewed by: jhb
X-MFC With: r310423

7 years agomdoc and style fixes.
Hiroki Sato [Fri, 23 Dec 2016 04:59:22 +0000 (04:59 +0000)]
mdoc and style fixes.

7 years agomdoc fixes.
Hiroki Sato [Fri, 23 Dec 2016 04:38:27 +0000 (04:38 +0000)]
mdoc fixes.

7 years agoTeach DDB how to unwind across a kernel stack overflow.
John Baldwin [Fri, 23 Dec 2016 03:27:11 +0000 (03:27 +0000)]
Teach DDB how to unwind across a kernel stack overflow.

Kernel stack overflows in MIPS call panic() directly from an assembly
handler after storing the interrupted context's registers in a
trapframe.  Rather than inferring the location of ra, sp, and pc from
the instruction stream, recognize the pc of a kernel stack overflow
and pull the registers from the trapframe.

Sponsored by: DARPA / AFRL

7 years agoMFamd64: Various fixes for MIPS minidumps.
John Baldwin [Fri, 23 Dec 2016 03:20:34 +0000 (03:20 +0000)]
MFamd64: Various fixes for MIPS minidumps.

- Honor PG_NODUMP by not dumping pages with this flag set.
- Pat the watchdog during dumps to avoid a watchdog reset while writing
  out a dump.
- Reformat the output during a dump to update every 10% done rather than
  every 2MB dumped.
- Include UMA small pages and pages holding PV entries in minidumps.

Sponsored by: DARPA / AFRL

7 years agoUpdate meta* from bmake-20161212
Simon J. Gerraty [Fri, 23 Dec 2016 02:57:00 +0000 (02:57 +0000)]
Update meta* from bmake-20161212

7 years ago[net80211] WEP offload support.
Adrian Chadd [Thu, 22 Dec 2016 23:59:53 +0000 (23:59 +0000)]
[net80211] WEP offload support.

Yes, the ath10k NIC actually also does do WEP TX/RX offload.

Tested:

* ath10k driver port, WEP STA mode.

7 years ago- Add -S option to specify the source address/port for UDP communication.
Hiroki Sato [Thu, 22 Dec 2016 23:39:11 +0000 (23:39 +0000)]
- Add -S option to specify the source address/port for UDP communication.
- Document -S option.
- Document that -h option supports AF_LOCAL.
- Split preparation of UDP sockets in logmessage() into socksetup().

7 years agoRevert r310138
Enji Cooper [Thu, 22 Dec 2016 22:30:42 +0000 (22:30 +0000)]
Revert r310138

Adding %b support to vfprintf for parity with kernel space requires
more discussion/review.

In particular, many parties were concerned over introducing a
non-standard format qualifier to *printf(3) which didn't already
exist in other OSes, e.g. Linux, thus making code which used %b
harder to port to other operating systems.

Requested by: many

7 years agoUse ${.OBJDIR} to refer to the kernel build object dir, instead of trying
Ian Lepore [Thu, 22 Dec 2016 21:11:42 +0000 (21:11 +0000)]
Use ${.OBJDIR} to refer to the kernel build object dir, instead of trying
to recreate it from ${MAKEOBJDIRPREFIX} and ${SRC_BASE} and ${KERNCONF},
the latter being especially problematic when KERNCONF is set to the names
of multiple kernel configs.

7 years ago[rsu] convert rsu to use the ieee80211_rx_stats struct to pass up RSSI, PHY and rate...
Adrian Chadd [Thu, 22 Dec 2016 21:01:56 +0000 (21:01 +0000)]
[rsu] convert rsu to use the ieee80211_rx_stats struct to pass up RSSI, PHY and rate information.

I don't yet know which RX descriptor bits map to shortgi, long-gi,
short-preamble, long-preamble, STBC, LDPC, HT40, etc - so I can't
easily add those just yet.

There's apparently no per-frame RX RSSI information exposed so we
also just use the results from the previous calibration task.

This also tidies up how the per-mbuf RSSI is pushed into the frame -
now that it's attached to the mbuf via rx_stats, we don't have to
do any silly hijinx to get it out of the frame processing path.

Tested:

* RTL8712, 1x1 cut 3, STA mode

7 years agoFix dump_avail[] for MALTA platforms to include the kernel.
John Baldwin [Thu, 22 Dec 2016 20:28:06 +0000 (20:28 +0000)]
Fix dump_avail[] for MALTA platforms to include the kernel.

dump_avail[] is supposed to be a superset of phys_avail[] that
describes all of the memory ranges that should be included in a full
dump.  minidumps don't consider pages described by dump_avail[] to be
valid and thus they are excluded via the is_dumpable() function.  Most
MIPS platforms (including MALTA) set dump_avail[] to be identical to
phys_avail[].  In particular, phys_avail[] doesn't include the kernel
itself, so pages for the kernel and it's global variables are not
considered dumpable and not included in the dump.  Fix this by setting
dump_avail[0] to the first memory address (0) rather than the end of
the kernel.

Several other MIPS platforms have the same bug, though I am only able
to test malta in qemu.  The correct fix is to set dump_avail[] to
describe RAM and in particular to not set dump_avail[0] to the end of
the kernel (kernel_kseg0_end).

Sponsored by: DARPA / AFRL

7 years agoIf you are going to be run individually to make a new timezone set
Julian Elischer [Thu, 22 Dec 2016 18:30:29 +0000 (18:30 +0000)]
If you are going to be run individually to make a new timezone set
then ensure the destination directories exist.
Especially if you define OLDTIMEZONES because the mtree pass
doesn't do it for you.

MFC after: 1 week
Sponsored by: Panzura

7 years agomlx: avoid use of __DATE__ to make build reproducible
Ed Maste [Thu, 22 Dec 2016 18:26:21 +0000 (18:26 +0000)]
mlx: avoid use of __DATE__ to make build reproducible

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D8886

7 years agoReplace passive voice with active voice and other tweaks.
John Baldwin [Thu, 22 Dec 2016 18:05:22 +0000 (18:05 +0000)]
Replace passive voice with active voice and other tweaks.

- Drop uses of 'will'.
- Replace 'to use' with active voice.
- Tidy language around interrupt types and clarify that INTx doesn't
  work on VFs.
- Drop leading articles from sysctl/tunable descriptions.
- Tweak the wording of several sysctl/tunable descriptions.

Submitted by: wblock (1, 2, 4)
Sponsored by: Chelsio Communications
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D8812

7 years agoRevert part of r300109.
Mark Johnston [Thu, 22 Dec 2016 17:51:44 +0000 (17:51 +0000)]
Revert part of r300109.

The removal of TAILQ_FOREACH_SAFE introduced a small race: when the last
thread on a sleepqueue is awoken, it reclaims the sleepqueue and may begin
executing on a different CPU before sleepq_resume_thread() returns. This
leaves a window during which it may go back to sleep and incorrectly be
awoken again by the caller of sleepq_broadcast().

Reported and tested by: pho
MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agortld: Fix a couple of bugs around the unloading of ELF filters.
Mark Johnston [Thu, 22 Dec 2016 17:44:27 +0000 (17:44 +0000)]
rtld: Fix a couple of bugs around the unloading of ELF filters.

- Pass the correct object to unload_filtees().
- Use a marker to restart iteration after unload_filtees() has returned.
  It calls dlclose() and may recursively remove entries from the global
  object list, so TAILQ_FOREACH_SAFE is not sufficient.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agortld: Ensure that dlopen() cannot obtain a reference on a doomed object.
Mark Johnston [Thu, 22 Dec 2016 17:41:32 +0000 (17:41 +0000)]
rtld: Ensure that dlopen() cannot obtain a reference on a doomed object.

rtld drops the bind lock to call fini functions in an object prior to
unmapping it. The new "doomed" state flag prevents the acquisition of new
references for an object while the lock is dropped.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agortld: Fix a race between dl_iterate_phdr() and dlclose().
Mark Johnston [Thu, 22 Dec 2016 17:37:39 +0000 (17:37 +0000)]
rtld: Fix a race between dl_iterate_phdr() and dlclose().

Add a transient reference count to ensure that the phdr argument to the
callback remains valid while the bind lock is dropped.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoxen: fix IPI setup with EARLY_AP_STARTUP
Roger Pau Monné [Thu, 22 Dec 2016 16:09:44 +0000 (16:09 +0000)]
xen: fix IPI setup with EARLY_AP_STARTUP

Current Xen IPI setup functions require that the caller provide a device in
order to obtain the name of the interrupt from it. With early AP startup this
device is no longer available at the point where IPIs are bound, and a KASSERT
would trigger:

panic: NULL pcpu device_t
cpuid = 0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff82233a20
vpanic() at vpanic+0x186/frame 0xffffffff82233aa0
kassert_panic() at kassert_panic+0x126/frame 0xffffffff82233b10
xen_setup_cpus() at xen_setup_cpus+0x5b/frame 0xffffffff82233b50
mi_startup() at mi_startup+0x118/frame 0xffffffff82233b70
btext() at btext+0x2c

Fix this by no longer requiring the presence of a device in order to bind IPIs,
and simply use the "cpuX" format where X is the CPU identifier in order to
describe the interrupt.

Reported by:            sbruno, cperciva
Tested by:              sbruno
X-MFC-With:             r310177
Sponsored by:           Citrix Systems R&D

7 years agoAdd a dumpdev example to /boot/defaults/loader.conf
Alan Somers [Thu, 22 Dec 2016 15:48:54 +0000 (15:48 +0000)]
Add a dumpdev example to /boot/defaults/loader.conf

Submitted by: rgrimes
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agoAllwinner clk: factor M for mod clock is 4 bits, not 5
Emmanuel Vadot [Thu, 22 Dec 2016 15:01:06 +0000 (15:01 +0000)]
Allwinner clk: factor M for mod clock is 4 bits, not 5

MFC after: 1 week

7 years ago- Fix a use-after-free bug when dq_timeout == 1 and
Hiroki Sato [Thu, 22 Dec 2016 13:46:17 +0000 (13:46 +0000)]
- Fix a use-after-free bug when dq_timeout == 1 and
  sending SIGTERM to the process failed.  It is an
  unusual situation but it can happen.
- Split deadq_remove() into deadq_remove() and
  deadq_removebypid().
- Normalize variable names of struct deadq_entry *.

7 years agoAdd support for REPD bit in RSTMF command.
Alexander Motin [Thu, 22 Dec 2016 12:18:40 +0000 (12:18 +0000)]
Add support for REPD bit in RSTMF command.

We have no real timeout values to report there, but its better then error.

MFC after: 2 weeks

7 years agoFix REPORT SUPPORTED OPERATION CODES for READ/WRITE BUFFER commands.
Alexander Motin [Thu, 22 Dec 2016 11:10:11 +0000 (11:10 +0000)]
Fix REPORT SUPPORTED OPERATION CODES for READ/WRITE BUFFER commands.

Specifications require MODE parameter of those commands to be treated
the same as SERVICE ACTION parameter of other commands.

MFC after: 2 weeks

7 years agoMake a read only pointer constant.
Hans Petter Selasky [Thu, 22 Dec 2016 10:12:19 +0000 (10:12 +0000)]
Make a read only pointer constant.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoAdd more comments regarding collection of statistics counters.
Hans Petter Selasky [Thu, 22 Dec 2016 10:11:03 +0000 (10:11 +0000)]
Add more comments regarding collection of statistics counters.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoAdd a missing "default:" case.
Hiroki Sato [Thu, 22 Dec 2016 05:57:45 +0000 (05:57 +0000)]
Add a missing "default:" case.

7 years agoInitialize a structure by using a compound literal to avoid forgetting
Hiroki Sato [Thu, 22 Dec 2016 05:55:44 +0000 (05:55 +0000)]
Initialize a structure by using a compound literal to avoid forgetting
to zero unspecified members.

7 years agoFix debug log in the case of AF_INET6.
Hiroki Sato [Thu, 22 Dec 2016 05:28:30 +0000 (05:28 +0000)]
Fix debug log in the case of AF_INET6.

7 years ago- Simplify masklen->netmask conversion for AF_INET6.
Hiroki Sato [Thu, 22 Dec 2016 05:23:38 +0000 (05:23 +0000)]
- Simplify masklen->netmask conversion for AF_INET6.
- Use iov[N] by array index instead of using pointer v = &iov[0] to
  make the compiler catch an out-of-range access of the array.

7 years agoConvert tunefs use to nmount(2)
Brooks Davis [Thu, 22 Dec 2016 00:35:12 +0000 (00:35 +0000)]
Convert tunefs use to nmount(2)

Reviewed by: jhb, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8822

7 years agoow_temp: Update the temperature visible via the sysctl atomically, rather
Gavin Atkinson [Thu, 22 Dec 2016 00:09:53 +0000 (00:09 +0000)]
ow_temp: Update the temperature visible via the sysctl atomically, rather
than using it as temporary calculation space.

7 years agoow_temp: Correct typo in comment
Gavin Atkinson [Wed, 21 Dec 2016 23:54:12 +0000 (23:54 +0000)]
ow_temp: Correct typo in comment

7 years agoRemove assigned only variable.
Gleb Smirnoff [Wed, 21 Dec 2016 22:47:10 +0000 (22:47 +0000)]
Remove assigned only variable.

7 years ago[iwn] Several fixes for DMA part of iwn(4)
Oleksandr Tymoshenko [Wed, 21 Dec 2016 22:35:26 +0000 (22:35 +0000)]
[iwn] Several fixes for DMA part of iwn(4)

- Perform DMS sync when accessing/initializing ICT table
- Fix some DMA sync operations to use matching tags

Reviewed by: avos
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8804

7 years agoAdd support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.
Alexander Motin [Wed, 21 Dec 2016 20:19:12 +0000 (20:19 +0000)]
Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.

MFC after: 2 weeks

7 years agobhnd: remove srand() to ensure deterministic output
Ed Maste [Wed, 21 Dec 2016 15:45:23 +0000 (15:45 +0000)]
bhnd: remove srand() to ensure deterministic output

r310342 fixed non-deterministic nvram_map_gen.awk output and thus a non-
reproducible bhnd(4) build by using a unique sort key.

Go one step further and also remove the srand() call. There's no reason
we want non-deterministic behaviour from this script.

PR: 215422
Reported by: gjb (non-reproducibility of bhnd)
Reported by: lidl (srand as the cause)
Reviewed by: landonf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8857

7 years agopax(1): Fix a bug with archives smaller than 512 bytes.
Pedro F. Giffuni [Wed, 21 Dec 2016 15:26:59 +0000 (15:26 +0000)]
pax(1): Fix a bug with archives smaller than 512 bytes.

The problem here is that the archive is too short (< 512 bytes). The
buffer routines, try to read at least 512 bytes, even when we try to
determine what format file we have, which is wrong.

Obtained from: NetBSD (CVS rev 1.26)
MFC after: 5 days

7 years agoAdd support for SITUA bit in Logical Block Provisioning mode page.
Alexander Motin [Wed, 21 Dec 2016 15:17:47 +0000 (15:17 +0000)]
Add support for SITUA bit in Logical Block Provisioning mode page.

VMware tries to enable this bit to avoid multiple threshold notifications
in case of multiple initiators connected to the same LUN.  Unfortunately
their code sends MODE SELECT(6) request with parameter length hardcoded
for the page without any thresholds.  Since we have four threshold and our
page is bigger, this attempt fails, that is correct in my understanding.
So all we can do about this now is to report proper error code and hope
VMware fix their code one day.

MFC after: 2 weeks

7 years agolibunwind: make __{de,}register_frame compatible with libgcc API
Ed Maste [Wed, 21 Dec 2016 14:06:44 +0000 (14:06 +0000)]
libunwind: make __{de,}register_frame compatible with libgcc API

The libgcc __register_frame and __deregister_frame functions take a
pointer to a set of FDE/CIEs, terminated by an entry where length is 0.

In Apple's libunwind implementation the pointer is taken to be to a
single FDE. I suspect this was just an Apple bug, compensated by Apple-
specific code in LLVM.

See lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp and
http://lists.llvm.org/pipermail/llvm-dev/2013-April/061737.html
for more detail.

This change is based on the LLVM RTDyldMemoryManager.cpp. It should
later be changed to be alignment-safe.

Reported by: dim
Reviewed by: dim
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8869

7 years agoFix UUID formatting added in r310360. Oops!
Alexander Motin [Wed, 21 Dec 2016 09:49:16 +0000 (09:49 +0000)]
Fix UUID formatting added in r310360.  Oops!

MFC after: 2 weeks

7 years agoReport UUID and MD5 LUN IDs.
Alexander Motin [Wed, 21 Dec 2016 09:36:23 +0000 (09:36 +0000)]
Report UUID and MD5 LUN IDs.

MFC after: 2 weeks

7 years agoAdd support for locally assigned RFC 4122 UUID LUN identifiers.
Alexander Motin [Wed, 21 Dec 2016 09:05:30 +0000 (09:05 +0000)]
Add support for locally assigned RFC 4122 UUID LUN identifiers.

MFC after: 2 weeks

7 years agoAdd an example inetd(8) entry for the Prometheus sysctl exporter.
Ed Schouten [Wed, 21 Dec 2016 08:32:20 +0000 (08:32 +0000)]
Add an example inetd(8) entry for the Prometheus sysctl exporter.

I went through the process of allocating a default port number for this
exporter, TCP 9124. This means that we can add an entry to the services
file as well.

List of Prometheus default port numbers:
https://github.com/prometheus/prometheus/wiki/Default-port-allocations

7 years agoAdd a Prometheus exporter for sysctl values.
Ed Schouten [Wed, 21 Dec 2016 08:29:44 +0000 (08:29 +0000)]
Add a Prometheus exporter for sysctl values.

Now that we have our sysctl tree annotated with aggregation labels,
let's go ahead and provide a very simple utility for exporting the
sysctl tree in Prometheus' format. It can either be used in conjunction
with the Prometheus node exporter or run through inetd(8).

The reason why I'm opting for having it in the base system is because it
has a pretty strong integration with some of sysctl's innards, such as
access to iterators, name lookups, metadata and type information. As I
am investigating whether we can add histograms as native types to sysctl
as well, this integration will only get stronger as we go along. That's
why it would be safer to oversee the development of this exporter
ourselves, as opposed to having it as an external project.

This exporter is remarkably compact, especially when compared to the
official Linux binary of the Prometheus node exporter (16 KB vs 12 MB).
I guess this could be an interesting aspect for monitoring embedded
FreeBSD-based systems.

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

7 years agoSimplify type casting of struct sockaddr_in.
Hiroki Sato [Wed, 21 Dec 2016 07:05:34 +0000 (07:05 +0000)]
Simplify type casting of struct sockaddr_in.

7 years ago- Initialize deadq_head statically.
Hiroki Sato [Wed, 21 Dec 2016 06:49:21 +0000 (06:49 +0000)]
- Initialize deadq_head statically.
- Fix indent.
- Add missing -S flag into usage().
- Use nitems() for an iov array instead of a macro.

7 years ago- Add fklog into struct socklist. Files and local/remote sockets are
Hiroki Sato [Wed, 21 Dec 2016 06:42:30 +0000 (06:42 +0000)]
- Add fklog into struct socklist.  Files and local/remote sockets are
  now processed in struct socklist in a consistent manner.
- Add helper functions to add a new entry of struct socklist, filed, or peer.
- Use the same routine for -l, -p, and -S.
- Close /dev/klog when read(2) failed.

7 years ago- Use fnmatch(3) for domanname matching of -a options.
Hiroki Sato [Wed, 21 Dec 2016 05:45:59 +0000 (05:45 +0000)]
- Use fnmatch(3) for domanname matching of -a options.
- Document the patten matching.
- Document -S flag in SYNOPSIS.

7 years agohyperv: Unbreak EARLY_AP_STARUP Hyper-V bootstrap by using intrhook
Sepherosa Ziehau [Wed, 21 Dec 2016 03:23:35 +0000 (03:23 +0000)]
hyperv: Unbreak EARLY_AP_STARUP Hyper-V bootstrap by using intrhook

Properly working pause and friends are required.

MFC after: 3 days
Sponsored by: Microsoft

7 years agohyperv/storvsc: The max channel in PDU actually means the max sub-chans.
Sepherosa Ziehau [Wed, 21 Dec 2016 03:09:07 +0000 (03:09 +0000)]
hyperv/storvsc: The max channel in PDU actually means the max sub-chans.

Use proper name for local variables. PDU fields' name was not changed yet.
While I'm here, make # of usable channels tunable. This eases further
testing.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8851

7 years agoAdd amdmi3 to ports-secteam
Mark Felder [Wed, 21 Dec 2016 01:48:54 +0000 (01:48 +0000)]
Add amdmi3 to ports-secteam

Approved by: swills

7 years agobuild: Unbreak LINT
Sepherosa Ziehau [Wed, 21 Dec 2016 01:39:11 +0000 (01:39 +0000)]
build: Unbreak LINT

Sponsored by: Microsoft

7 years ago[iMX6] Fix SDMA driver build
Oleksandr Tymoshenko [Wed, 21 Dec 2016 01:38:44 +0000 (01:38 +0000)]
[iMX6] Fix SDMA driver build

- Place const modifiers where required
- Make sure sdma device is attahched before consumers like SSI

Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8874

7 years ago[iMX6] Fix build for SSI driver and add dependency for SDMA driver
Oleksandr Tymoshenko [Wed, 21 Dec 2016 01:32:19 +0000 (01:32 +0000)]
[iMX6] Fix build for SSI driver and add dependency for SDMA driver

- Pass correct pointer to OF_getencprop
- Check the size of "dmas" property
- Add dependency on sdma driver

Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8873

7 years agobhnd(4): Use a stable sort key to produce deterministic nvram_map_gen.awk
Landon J. Fuller [Wed, 21 Dec 2016 00:50:21 +0000 (00:50 +0000)]
bhnd(4): Use a stable sort key to produce deterministic nvram_map_gen.awk
output.

When ordering SROM layout entries, we now use the unique (var_id,
rev_start, rev_end) tuple as the sort key; this fixes the previously
non-deterministic output when sorting entries with overlapping var_ids.

PR: 215422
Reported by: emaste
Reviewed by: emaste
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D8859

7 years agoFollow-up to r310340: Add missing "Intel" to description
Conrad Meyer [Tue, 20 Dec 2016 22:47:09 +0000 (22:47 +0000)]
Follow-up to r310340: Add missing "Intel" to description

Reported by: rpokala@

7 years agoAdd Braswell PCI IDs for Intel Cherryview
Conrad Meyer [Tue, 20 Dec 2016 22:08:36 +0000 (22:08 +0000)]
Add Braswell PCI IDs for Intel Cherryview

Submitted by: Johannes Lundberg <yohanesu75 at gmail.com>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8861

7 years agoBump specifications support to SAM-6/SPC-5.
Alexander Motin [Tue, 20 Dec 2016 21:58:43 +0000 (21:58 +0000)]
Bump specifications support to SAM-6/SPC-5.

7 years agoTurn on FC-Tape by default in the isp(4) driver.
Kenneth D. Merry [Tue, 20 Dec 2016 21:17:07 +0000 (21:17 +0000)]
Turn on FC-Tape by default in the isp(4) driver.

FC-Tape provides additional link level error recovery, and is
highly recommended for tape devices.  It will only be turned on for
a given target if the target supports it.

Without this setting, we default to whatever FC-Tape setting is in
NVRAM on the card.

This can be overridden by setting the following loader tunable, for
example for isp0:

hint.isp.0.nofctape=1

sys/conf/options:
Add a new kernel config option, ISP_FCTAPE_OFF, that
defaults the FC-Tape configuration to off.

sys/dev/isp/isp_pci.c:
If ISP_FCTAPE_OFF is defined, turn off FC-Tape.  Otherwise,
turn it on if the card supports it.

share/man/man4/isp.4:
Add a description of FC-Tape to the isp(4) man page.

Add descriptions of the fctape and nofctape options, as well as the
ISP_FCTAPE_OFF kernel configuration option.

Add the ispfw module and kernel drivers to the suggested
configurations at the top of the man page so that users are less
likely to leave it out.  The driver works well with the included
firmware, but may not work at all with whatever firmware the user
has flashed on their card.

MFC after: 3 days
Sponsored by: Spectra Logic

7 years agoFix memory leak.
Gleb Smirnoff [Tue, 20 Dec 2016 20:11:16 +0000 (20:11 +0000)]
Fix memory leak.

CID: 1367751
Reviewed by: jhb

7 years agoDon't spin in pause() during early boot for kthreads other than thread0.
John Baldwin [Tue, 20 Dec 2016 19:44:44 +0000 (19:44 +0000)]
Don't spin in pause() during early boot for kthreads other than thread0.

pause() uses a spin loop to simulate a sleep during early boot.  However,
we only need this for thread0 to get far enough in the boot process to
enable timers (at which point pause() can sleep).  For other kthreads,
sleeping in pause() is ok as the callout will be scheduled and will
eventually fire once thread0 initializes timers.

Tested by:  Steven Kargl
Sleuthing by: markj
MFC after: 1 week
Sponsored by: Netflix

7 years agoo Unmute headphones on Imgtec CI20 board.
Ruslan Bukin [Tue, 20 Dec 2016 18:47:02 +0000 (18:47 +0000)]
o Unmute headphones on Imgtec CI20 board.
o Add some delay between codec initialization procedures.

Sponsored by: DARPA, AFRL

7 years agoAdd jz4780 AIC (Audio Interface Controller) driver.
Ruslan Bukin [Tue, 20 Dec 2016 18:27:53 +0000 (18:27 +0000)]
Add jz4780 AIC (Audio Interface Controller) driver.

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8808

7 years agoAvoid modifying the object string table when patching USDT probes.
Mark Johnston [Tue, 20 Dec 2016 18:25:41 +0000 (18:25 +0000)]
Avoid modifying the object string table when patching USDT probes.

dtrace converts pairs of consecutive underscores in a probe name to dashes.
When dtrace -G processes relocations corresponding to USDT probe sites, it
performs this conversion on the corresponding symbol names prior to looking
up the resulting probe names in the USDT provider definition. However, in
so doing it would actually modify the input object's string table, which
breaks the string suffix merging done by recent binutils. Because we don't
care about the symbol name once the probe site is recorded, just perform the
probe lookup using a temporary copy.

Reported by: hrs, swills
MFC after: 3 weeks

7 years agoAdd jz4780 PDMA controller driver.
Ruslan Bukin [Tue, 20 Dec 2016 18:09:59 +0000 (18:09 +0000)]
Add jz4780 PDMA controller driver.

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8817

7 years agoAdd xDMA -- the DMA abstraction layer, initial verison.
Ruslan Bukin [Tue, 20 Dec 2016 18:02:07 +0000 (18:02 +0000)]
Add xDMA -- the DMA abstraction layer, initial verison.

xDMA is a DMA framework designed to abstract the interaction
between device drivers and DMA engines.

Project wiki: https://wiki.freebsd.org/xdma

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8807

7 years agoAdd a 'force' option for non-interactive crontab removal
Conrad Meyer [Tue, 20 Dec 2016 17:12:17 +0000 (17:12 +0000)]
Add a 'force' option for non-interactive crontab removal

Add a '-f' option to force crontab '-r' to be non-interactive.

Submitted by: Sam Gwydir <sam at samgwydir.com>
Reviewed by: me, wblock (previous version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8815

7 years agoRemove stray debugging code from r310180
Alan Somers [Tue, 20 Dec 2016 15:45:53 +0000 (15:45 +0000)]
Remove stray debugging code from r310180

Reported by: rstone
Pointy hat to: asomers
MFC after: 3 weeks
X-MFC-with: 310180
Sponsored by: Spectra Logic Corp

7 years agohyperv/ic: Rename cleaned up files.
Sepherosa Ziehau [Tue, 20 Dec 2016 09:46:14 +0000 (09:46 +0000)]
hyperv/ic: Rename cleaned up files.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8850

7 years agoEscape punctuation characters.
Hiroki Sato [Tue, 20 Dec 2016 08:49:13 +0000 (08:49 +0000)]
Escape punctuation characters.

7 years agohyperv/ic: Cleanup driver glue.
Sepherosa Ziehau [Tue, 20 Dec 2016 07:34:44 +0000 (07:34 +0000)]
hyperv/ic: Cleanup driver glue.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8849

7 years agohyperv/ic: Rname cleaned up file.
Sepherosa Ziehau [Tue, 20 Dec 2016 07:14:24 +0000 (07:14 +0000)]
hyperv/ic: Rname cleaned up file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8848

7 years agoConsistently print D variable indices in decimal when disassembling.
Mark Johnston [Tue, 20 Dec 2016 05:45:52 +0000 (05:45 +0000)]
Consistently print D variable indices in decimal when disassembling.

MFC after: 1 week

7 years agohyperv/ic: Inclusion cleanup
Sepherosa Ziehau [Tue, 20 Dec 2016 05:39:00 +0000 (05:39 +0000)]
hyperv/ic: Inclusion cleanup

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8847

7 years agohyperv/ic: Rename cleaned up header file.
Sepherosa Ziehau [Tue, 20 Dec 2016 05:26:38 +0000 (05:26 +0000)]
hyperv/ic: Rename cleaned up header file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8846

7 years agohyperv/ic: Cleanup common struct and functions.
Sepherosa Ziehau [Tue, 20 Dec 2016 05:07:12 +0000 (05:07 +0000)]
hyperv/ic: Cleanup common struct and functions.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8845

7 years agohyperv/ic: Factor out function to send IC response
Sepherosa Ziehau [Tue, 20 Dec 2016 04:51:14 +0000 (04:51 +0000)]
hyperv/ic: Factor out function to send IC response

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8844

7 years agoAdd a NULL check.
Hiroki Sato [Tue, 20 Dec 2016 04:05:21 +0000 (04:05 +0000)]
Add a NULL check.

7 years agoAdd a default socket bound to *:514 when no -b option is specified.
Hiroki Sato [Tue, 20 Dec 2016 03:41:40 +0000 (03:41 +0000)]
Add a default socket bound to *:514 when no -b option is specified.
This was accidentally removed at r309933.

Spotted by: Michael Butler

7 years agosdhci/mmc: Minor whitespace cleanups
Conrad Meyer [Tue, 20 Dec 2016 03:38:14 +0000 (03:38 +0000)]
sdhci/mmc: Minor whitespace cleanups

No functional change.

Submitted by: Johannes Lundberg <yohanesu75 at gmail.com>

7 years agoAdd support for Ingenic JZ4780 LCD controller and enable framebuffer
Jared McNeill [Tue, 20 Dec 2016 01:51:09 +0000 (01:51 +0000)]
Add support for Ingenic JZ4780 LCD controller and enable framebuffer
console support.

Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D8827

7 years agoChoose the closes matching divider instead of one that results in a
Jared McNeill [Tue, 20 Dec 2016 01:37:00 +0000 (01:37 +0000)]
Choose the closes matching divider instead of one that results in a
frequency >= target. Fix inverted rounding logic for CLK_SET_ROUND_UP/DOWN.

Reviewed by: kan
Differential Revision: https://reviews.freebsd.org/D8784

7 years agoSplit the DesignWare HDMI-specific code from imx6_hdmi.c into a separate
Jared McNeill [Tue, 20 Dec 2016 01:34:29 +0000 (01:34 +0000)]
Split the DesignWare HDMI-specific code from imx6_hdmi.c into a separate
file and add a generic DT binding that takes advantage of the extres
framework for setting up clocks.

Reviewed by: gonzo
Differential Revision: https://reviews.freebsd.org/D8826

7 years agoMerge r92c_init_rf_common() into r92c_init_rf(). In r88eu_attach.c, we could
Kevin Lo [Tue, 20 Dec 2016 01:13:11 +0000 (01:13 +0000)]
Merge r92c_init_rf_common() into r92c_init_rf().  In r88eu_attach.c, we could
use r92c_init_rf() rather than r92c_init_rf_common() when sc_init_rf()
callback is invoked.

While here, constantly use RF chain instead of RF path in comment.

Reviewed by: avos

7 years agoMerge bmake-20161212
Simon J. Gerraty [Mon, 19 Dec 2016 23:38:07 +0000 (23:38 +0000)]
Merge bmake-20161212

7 years agoDo not clear KN_INFLUX when not owning influx state.
Konstantin Belousov [Mon, 19 Dec 2016 22:18:36 +0000 (22:18 +0000)]
Do not clear KN_INFLUX when not owning influx state.

For notes in KN_INFLUX|KN_SCAN state, the influx bit is set by a
parallel scan.  When knote() reports event for the vnode filters,
which require kqueue unlocked, it unconditionally sets and then clears
influx to keep note around kqueue unlock.  There, do not clear influx
flag if a scan set it, since we do not own it, instead we prevent scan
from executing by holding knlist lock.

The knote_fork() function has somewhat similar problem, it might set
KN_INFLUX for scanned note, drop kqueue and list locks, and then clear
the flag after relock.  A solution there would be different enough, as
well as the test program, so close the reported issue first.

Reported and test case provided by: yjh0502@gmail.com
PR: 214923
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoImport bmake-20161212
Simon J. Gerraty [Mon, 19 Dec 2016 21:50:59 +0000 (21:50 +0000)]
Import bmake-20161212

From ChangeLog
2016-12-12  Simon J. Gerraty  <sjg@bad.crufty.net>

* Makefile (_MAKE_VERSION): 20161212
  Merge with NetBSD make, pick up
          o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too.

2016-12-09  Simon J. Gerraty  <sjg@bad.crufty.net>

* Makefile (_MAKE_VERSION): 20161209
  Merge with NetBSD make, pick up
  o main.c: cleanup setting of .OBJDIR
  o parse.c: avoid coredump from (var)=val

2016-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>

* Makefile (_MAKE_VERSION): 20161126
  Merge with NetBSD make, pick up
  o make.c: Make_OODate: report src node name if path not set

2016-09-26  Simon J. Gerraty  <sjg@bad.crufty.net>

* Makefile (_MAKE_VERSION): 20160926
  Merge with NetBSD make, pick up
  o support for .DELETE_ON_ERROR: (remove targets that fail)

2016-09-26  Simon J. Gerraty  <sjg@bad.crufty.net>

* Makefile MAN: tweak .Dt to match ${PROG}

mk/ChangeLog

2016-12-12  Simon J. Gerraty  <sjg@bad.crufty.net>

* install-mk (MK_VERSION): 20161212

* meta2deps.py: set pid_cwd[pid] when we process 'C'hdir,
rather than when we detect pid change.

2016-12-07  Simon J. Gerraty  <sjg@bad.crufty.net>

* install-mk (MK_VERSION): 20161207

* meta.stage.mk: add stage_as_and_symlink for staging packages.
  We build foo.tgz stage_as foo-${VERSION}.tgz but want to be able
  to use foo.tgz to reference the latest staged version - so we
  make foo.tgz a symlink to it.
  Using a target to do both operations ensures we stay in sync.

2016-11-26  Simon J. Gerraty  <sjg@bad.crufty.net>

* install-mk (MK_VERSION): 20161126

* dirdeps.mk: set DIRDEPS_CACHE before we include local.dirdeps.mk
  so it can add dependencies.

2016-10-10  Simon J. Gerraty  <sjg@bad.crufty.net>

* dirdeps.mk: set DEP_* before we expand .MAKE.DEPENDFILE_PREFERENCE
  do that they can influence the result correctly.

* dirdeps.mk (${DIRDEPS_CACHE}): make sure we pass on TARGET_SPEC

* dirdeps.mk: Add ONLY_TARGET_SPEC_LIST and NOT_TARGET_SPEC_LIST
  similar to ONLY_MACHINE_LIST and NOT_MACHINE_LIST

2016-10-05  Simon J. Gerraty  <sjg@bad.crufty.net>

* dirdeps.mk: remove dependence on jot (normal situations anyway).
  Before we read another Makefile.depend* set DEP_* vars from
  _DEP_TARGET_SPEC in case it uses any of them with :=
  When bootstrapping, trim any ,* from extention of chosen _src
  Makefile.depend* to get the machine value we subst for.

2016-09-30  Simon J. Gerraty  <sjg@bad.crufty.net>

* dirdeps.mk: use TARGET_SPEC_VARS to qualify components added to
  DEP_SKIP_DIR and DEP_DIRDEPS_FILTER

* sys.mk: extract some bits to sys.{debug,vars}.mk
  for easier re-use by others.

2016-09-23  Simon Gerraty  <sjg@sjg-mba13>

* lib.mk: Use ${PICO} for extension for PIC objects.
  default to .pico (like NetBSD) safe on case insensitive filesystem.

2016-08-19  Simon J. Gerraty  <sjg@bad.crufty.net>

* meta.sys.mk (META_COOKIE_TOUCH): use ${.OBJDIR}/${.TARGET:T} as default