]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r346959:
gjb [Fri, 3 May 2019 00:45:31 +0000 (00:45 +0000)]
MFC r346959:
  Reduce the default image size for virtual machine disk images from
  30GB to 3GB.  The raw images can be resized using truncate(1), and
  other formats can be resized with tools included in hypervisors.

  Enable the growfs(8) rc(8) at firstboot if the disk was resized
  prior to booting the virtual machine for the first time.

Sponsored by: The FreeBSD Foundation

5 years agoMFC 325727:
jhb [Fri, 3 May 2019 00:20:02 +0000 (00:20 +0000)]
MFC 325727:
bhyve: avoid applying capsicum capabilities to file that was not opened

When using -l option targeting file that can't be opened (ie. nmdm module
is not loaded and /dev/nmdm* is specified) bhyve tries to apply capsicum
capabilities to a file that was not opened.

Enclose that code in an if statement and only run it on correctly opened
descriptor also providing meaningful message in case of an error.

5 years agoMFC 313732: bhyve: whitespace fix for r313727
jhb [Fri, 3 May 2019 00:02:07 +0000 (00:02 +0000)]
MFC 313732: bhyve: whitespace fix for r313727

5 years agoUpdate stable/11 from 11.2-STABLE to 11.3-PRERELEASE, marking the
gjb [Thu, 2 May 2019 23:59:44 +0000 (23:59 +0000)]
Update stable/11 from 11.2-STABLE to 11.3-PRERELEASE, marking the
official start of the code slush for the 11.3-RELEASE cycle.

Set the default mdoc(7) version to 11.3, and update the clang(1)
TARGET_TRIPLE to reflect 11.3.

Update the default pkg(8) repository to the 'quarterly' branch to
prevent further 11.3 builds from downgrading packages when invoking
'pkg upgrade' for the duration of the cycle.  This will be reverted
on the stable/11 branch once releng/11.3 is branched. [*]

Approved by: re (implicit)
MFC after: 6 weeks
MFC note: reminder to revert pkg(8) default repository [8]
Sponsored by: The FreeBSD Foundation

5 years agoMFC r345798:
ae [Thu, 2 May 2019 17:41:42 +0000 (17:41 +0000)]
MFC r345798:
  Create 64bit mibII counters for all interfaces.

  PR: 157015
  Obtained from: Yandex LLC

5 years agoMFC: r346709
rmacklem [Thu, 2 May 2019 01:11:49 +0000 (01:11 +0000)]
MFC: r346709
Add support to nfsdumpstate for printing of INET6 addresses for locks.

r346190 added support for printing of INET6 addresses for the "-o" option
(all opens) but missed adding support for INET6 addresses for the "-l" option.
This patch adds that support.

5 years agoMFC 346063: Don't pre-reserve resources for CPU devices when they are set.
jhb [Wed, 1 May 2019 17:30:14 +0000 (17:30 +0000)]
MFC 346063: Don't pre-reserve resources for CPU devices when they are set.

CPUs can use shared (RF_SHAREABLE) resources for the I/O port used for
entering and exiting C states.  If this I/O port is included in an ACPI
system resource device, then this happens to still work, but if the port
wasn't part of a system resource device, only the first CPU could allocate
the I/O port and use C states since resource_list_reserve() was always
allocating the resource from nexus0 without RF_SHAREABLE.  By avoiding
the reservation, the flags from the bus_alloc_resource() in the CPU driver
(which include RF_SHAREABLE) are honored.

PR: 236513

5 years agoMFC r346644: Call delist_dev() before destroy_dev_sched_cb().
mav [Wed, 1 May 2019 13:43:49 +0000 (13:43 +0000)]
MFC r346644: Call delist_dev() before destroy_dev_sched_cb().

destroy_dev_sched_cb() is excessively asynchronous, and during media change
retaste new provider may appear sooner then device of the previous one get
destroyed.

Sponsored by: iXsystems, Inc.

5 years agoMFC r346263:
oshogbo [Wed, 1 May 2019 06:59:04 +0000 (06:59 +0000)]
MFC r346263:
  tcpdump: disable Capsicum if -E option is provided.

  The -E is used to provide a secret for decrypting IPsec.
  The secret may be provided through command line or as the file.
  The problem is that tcpdump doesn't support yet opening files in capability mode
  and the file may contain a list of the files to open.

  As a workaround, for now, let's just disable capsicum if the -E
  the option is provided.

  PR:           236819
  MFC after:    2 weeks

5 years agoMFC r346459:
cy [Wed, 1 May 2019 01:53:19 +0000 (01:53 +0000)]
MFC r346459:

  MFV r346450:

  Update sqlite3-3.27.1 (3270100) --> sqlite3-3.27.2 (3270200)

5 years agoMFC r346804:
cy [Wed, 1 May 2019 01:49:33 +0000 (01:49 +0000)]
MFC r346804:

Left justify a function header brace as it should be.
No functional change.

5 years agoMFC r341759, r341839, r346591:
cy [Wed, 1 May 2019 01:43:17 +0000 (01:43 +0000)]
MFC r341759, r341839, r346591:
The following five MFCs update wpa 2.6 --> 2.8.

r341759:
MFV r341618: Update wpa 2.6 --> 2.7.

r341839:
Set default ciphers.

Submitted by:   jkim@

r346591:
Update wpa_supplicant/hostapd 2.7 --> 2.8

Upstream documents the following advisories:

- https://w1.fi/security/2019-1/sae-side-channel-attacks.txt
- https://w1.fi/security/2019-2/eap-pwd-side-channel-attack.txt
- https://w1.fi/security/2019-3/sae-confirm-missing-state-validation.txt
- https://w1.fi/security/2019-4/eap-pwd-missing-commit-validation.txt
- https://w1.fi/security/2019-5/eap-pwd-message-reassembly-issue-\
  with-unexpected-fragment.txt

Security: CVE-2019-9494, VU#871675, CVE-2019-9495, CVE-2019-9496,
CVE-2019-9497, CVE-2019-9498, CVE-2019-9499

Relnotes: yes

5 years agoMFC 344711: Fix missed posted interrupts in VT-x in bhyve.
jhb [Tue, 30 Apr 2019 23:53:54 +0000 (23:53 +0000)]
MFC 344711: Fix missed posted interrupts in VT-x in bhyve.

When a vCPU is HLTed, interrupts with a priority below the processor
priority (PPR) should not resume the vCPU while interrupts at or above
the PPR should.  With posted interrupts, bhyve maintains a bitmap of
pending interrupts in PIR descriptor along with a single 'pending'
bit.  This bit is checked by a CPU running in guest mode at various
places to determine if it should be checked.  In addition, another CPU
can force a CPU in guest mode to check for pending interrupts by
sending an IPI to a special IDT vector reserved for this purpose.

bhyve had a bug in that it would only notify a guest vCPU of an
interrupt (e.g. by sending the special IPI or by resuming it if it was
idle due to HLT) if an interrupt arrived that was higher priority than
PPR and no interrupts were currently pending.  This assumed that if
the 'pending' bit was set, any needed notification was already in
progress.  However, if the first interrupt sent to a HLTed vCPU was
lower priority than PPR and the second was higher than PPR, the first
interrupt would set 'pending' but not notify the vCPU, and the second
interrupt would not notify the vCPU because 'pending' was already set.
To fix this, track the priority of pending interrupts in a separate
per-vCPU bitmask and notify a vCPU anytime an interrupt arrives that
is above PPR and higher than any previously-received interrupt.

This was found and debugged in the bhyve port to SmartOS maintained by
Joyent.  Relevant SmartOS bugs with more background:

https://smartos.org/bugview/OS-6829
https://smartos.org/bugview/OS-6930
https://smartos.org/bugview/OS-7354

5 years agoMFC r346596:
kib [Tue, 30 Apr 2019 18:42:42 +0000 (18:42 +0000)]
MFC r346596:
ipoib: assign link-local address according to RFC.

5 years agoMFC r342208:
np [Tue, 30 Apr 2019 18:03:17 +0000 (18:03 +0000)]
MFC r342208:

cxgbe/t4_tom: fixes for issues on the passive open side.

- Fix PR 227760 by getting the TOE to respond to the SYN after the call
  to toe_syncache_add, not during it.  The kernel syncache code calls
  syncache_respond just before syncache_insert.  If the ACK to the
  syncache_respond is processed in another thread it may run before the
  syncache_insert and won't find the entry.  Note that this affects only
  t4_tom because it's the only driver trying to insert and expand
  syncache entries from different threads.

- Do not leak resources if an embryonic connection terminates at
  SYN_RCVD because of L2 lookup failures.

- Retire lctx->synq and associated code because there is never a need to
  walk the list of embryonic connections associated with a listener.
  The per-tid state is still called a synq entry in the driver even
  though the synq itself is now gone.

PR: 227760
Sponsored by: Chelsio Communications

5 years agoMFC r345334:
np [Tue, 30 Apr 2019 17:30:37 +0000 (17:30 +0000)]
MFC r345334:

cxgbe(4): Treat the viid as an opaque identifier.

Recent firmwares prefer to use a different format for viid internally
and this change allows them to do so.

Sponsored by: Chelsio Communications

5 years agoMFC r344654:
np [Tue, 30 Apr 2019 17:20:38 +0000 (17:20 +0000)]
MFC r344654:

cxgbe(4): Request high priority filter support explicitly, as required
by recent firmwares.

Sponsored by: Chelsio Communications

5 years agoMFC r343889, r344519, r344682, r344719
np [Tue, 30 Apr 2019 16:52:50 +0000 (16:52 +0000)]
MFC r343889, r344519, r344682, r344719

r343889:
cxgbev(4): Initialize debug_flags from the environment like in the PF driver.

r344519:
cxgbe(4): Use correct port_info in the call to is_bt().

This fixes a panic during configuration if the tx channel of a port
isn't the same as its port id.

Reported by: Fabrice Bruel
Sponsored by: Chelsio Communications

r344682:
cxgbe(4): Don't forget to report link state to the kernel if the link is
already up at attach.

Reported by: Fabrice Bruel @ Orange Business Service
Sponsored by: Chelsio Communications

r344719:
cxgbev(4): Enable 32b port capabilities in the VF driver.

Sponsored by: Chelsio Communications

5 years agoMFC r343666, r343861-r343862, r343923, r343968, r345660, r345810
np [Tue, 30 Apr 2019 16:41:27 +0000 (16:41 +0000)]
MFC r343666, r343861-r343862, r343923, r343968, r345660, r345810

r343666:
cxgbe(4): Improved error reporting and diagnostics.

"slow" interrupt handler:
- Expand the list of INT_CAUSE registers known to the driver.
- Add decode information for many more bits but decouple it from the
  rest of intr_info so that it is entirely optional.
- Call t4_fatal_err exactly once, and from the top level PL intr handler.

t4_fatal_err:
- Use t4_shutdown_adapter from the common code to stop the adapter.
- Stop servicing slow interrupts after the first fatal one.

Driver/firmware interaction:
- CH_DUMP_MBOX: note whether the mailbox being dumped is a command or a
  reply or something else.
- Log the raw value of pcie_fw for some errors.
- Use correct log levels (debug vs. error).

Sponsored by: Chelsio Communications

r343861:
cxgbe(4): Auto-dump the device log on a mailbox timeout or when the
firmware reports an error in pcie_fw.

Sponsored by: Chelsio Communications

r343862:
cxgbe(4): Auto-dump the CIM block's logic analyzer on a TIMER0 interrupt.

Sponsored by: Chelsio Communications

r343923:
cxgbe(4): Delay the panic due to a fatal error by 30s.

This lets information logged by the interrupt handler reach the system
log before the system goes down.

r343968:
cxgbe(4): Ignore unused interrupts.

Sponsored by: Chelsio Communications

r345660:
cxgbe(4): Count and clear interrupts generated at the software's request.

An interrupt can be requested by setting the F_SWINT bit in PL_PF_CTL.

Sponsored by: Chelsio Communications

r345810:
cxgbe(4): Add a flag to indicate that bits in interrupt cause but not in
interrupt enable are not fatal.

The firmware sets up all the interrupt enables based on run time
configuration, which means the information in the enables is more
accurate than what's compiled into the driver.  This change also allows
the fatal bits to be updated without any changes in the driver in some
cases.

Sponsored by: Chelsio Communications

5 years agoMFC r343539:
np [Tue, 30 Apr 2019 16:30:16 +0000 (16:30 +0000)]
MFC r343539:

cxgbe(4): Add adapter information to messages logged by the OS-agnostic
code in t4_hw.c.

Sponsored by: Chelsio Communications

5 years agoMFC r343269, r346567
np [Tue, 30 Apr 2019 08:17:11 +0000 (08:17 +0000)]
MFC r343269, r346567

r343269:
cxgbe(4): Allow negative values in hw.cxgbe.fw_install and take them to
mean that the driver should taste the firmware in the KLD and use that
firmware's version for all its fw_install checks.

The driver gets firmware version information from compiled-in values by
default and this change allows custom (or older/newer) firmware modules
to be used with the stock driver.

There is no change in default behavior.

Sponsored by: Chelsio Communications

r346567:
cxgbe(4): Make sure bundled_fw is always initialized before use.

This fixes a bug that prevented the driver from auto-flashing the
firmware when it didn't see one on the card.  This feature was
introduced in r321390 and this bug was introduced in r343269.

Reported by: gallatin@
Sponsored by: Chelsio Communications

5 years agoMFC r343264:
np [Tue, 30 Apr 2019 08:08:06 +0000 (08:08 +0000)]
MFC r343264:

cxgbe(4): Use a truncated firmware header for version checks.  All the
version numbers are towards the begining of the header.

Sponsored by: Chelsio Communications

5 years agoMFC r343233:
np [Tue, 30 Apr 2019 08:01:59 +0000 (08:01 +0000)]
MFC r343233:

cxgbe(4): Clear the reply-pending status of a hashfilter when the reply
indicates an error.  Also, do not remove it twice from the hf list in
this case.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communicatons

5 years agoMFC r343569, r345307
np [Tue, 30 Apr 2019 07:53:15 +0000 (07:53 +0000)]
MFC r343569, r345307

r343569:
cxgbe/iw_cxgbe: Fix an address calculation in the memory registration code that
was added in r342266.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r345307:
iw_cxgbe: Remove unused smac_idx from the ep structure.

Submitted by: Krishnamraju Eraparaju @ Chelsio

5 years agoMFC r342954:
np [Tue, 30 Apr 2019 07:45:07 +0000 (07:45 +0000)]
MFC r342954:

cxgbe(4): Move some INTx specific code to a more appropriate place.

5 years agoMFC r342758:
np [Tue, 30 Apr 2019 07:40:01 +0000 (07:40 +0000)]
MFC r342758:

cxgbe(4): Clear FW_OK if the firmware reports an error.

Sponsored by: Chelsio Communications

5 years agoMFC r342356:
np [Tue, 30 Apr 2019 07:37:03 +0000 (07:37 +0000)]
MFC r342356:

Remove unused macros from t4_tom.h.

5 years agoMFC r342234:
np [Tue, 30 Apr 2019 07:34:34 +0000 (07:34 +0000)]
MFC r342234:

cxgbe(4): Do not issue mbox commands after t4_fw_bye.

Sponsored by: Chelsio Communications

5 years agoMFC r341654:
np [Tue, 30 Apr 2019 07:32:02 +0000 (07:32 +0000)]
MFC r341654:

cxgbe(4): Get Linux cxgb4vf working in bhyve VMs with VFs passed
through.

cxgb4vf doesn't own the buffer size list but still expects the first two
entries to be 4K and some power of 2 respectively.  The BSD cxgbe
doesn't care where its preferred buffer sizes are as long as they're in
the list somewhere, so just move its entries towards the end as a
workaround.

Sponsored by: Chelsio Communications

5 years agoMFC r345056, r345058, r345059
kadesai [Tue, 30 Apr 2019 07:12:30 +0000 (07:12 +0000)]
MFC r345056, r345058, r345059

r345056

fw_outstanding"(outstanding IOs at firmware level) counter gets screwed up when R1 fastpath
writes are running. Some of the cases which are not handled properly in driver are:

1. With R1 fastpath supported, single write from CAM layer can consume 2 MPT frames
at driver/firmware level for fastpath qualification(if fw_outstanding < controller Queue Depth).
Due to this driver has to throttle IOs coming from CAM layer as well as second fastpath
write(of R1 write) against Adapter Queue Depth.
If "fw_outstanding" reaches to adapter queue depth, driver should return IOs from CAM layer with
device busy status.While allocating second MPT frame(corresponding to R1 FP write) also, driver
should ensure fw_outstanding should not exceed adapter QD.

2. For R1 fastpath writes completion, driver decrements "fw_oustanding" counter without
really returning MPT frame to free pool. It may cause IOs(with heavy IOs running, consuming whole
adapter Queue Depth) consuming MPT frames reserved for DCMDs(management commands) and
DCMDs(internal and sent by application) not getting MPT frame will start failing.

Below is one test case to hit the issue described above-
1. Run heavy IOs (outstanding IOs should hit adapter Queue Depth).
2. Run management tool (Broadcom's storcli tool) querying adapter in loop (run command- "storcli64 /c0 show" in loop).
3. Management tool's requests would start failing due to non-availability of free MPT frames as all frames would be consumed by IOs.

Fix: Increment/decrement of "fw_outstanding" counter should be in sync with MPT frame get/return.

r345058

Allocated MFI frames should be same as MPT frames reserved for DCMDs

r345059

Update driver version to 07.709.04.00-fbsd

5 years agoMFC r341620:
np [Tue, 30 Apr 2019 06:04:29 +0000 (06:04 +0000)]
MFC r341620:

cxgbe(4): Fall back to a basic configuration in case of any error during
card initialization.  This is an expanded version of r333682.

Break up prep_firmware into simpler routines while here.  Load the
firmware/config KLD only if needed.

Sponsored by: Chelsio Communications

5 years agoMFC r338954, r340651, r344524, r345083.
np [Tue, 30 Apr 2019 01:25:02 +0000 (01:25 +0000)]
MFC r338954, r340651, r344524, r345083.

r338954:
cxgbe(4): Enable support for per-connection rate limiting in the default
firmware configuration files.

Approved by: re@ (gjb@)
Sponsored by: Chelsio Communications

r340651:
cxgbe(4): Update T4/5/6 firmwares to 1.22.0.3.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

r344524:
cxgbe(4): Updates to the default and hashfilter configurations.

- Do not use nvf = 4 as it is not really supported by the firmware.
  Firmwares 1.23.3.0 and above will ignore it silently.
- Increase PF4's share of the VIs and let it use all of the RSS table.

Sponsored by: Chelsio Communications

r345083:
cxgbe(4): Update T4/5/6 firmwares to 1.23.0.0.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

5 years agoMFC r341172, r341270.
np [Mon, 29 Apr 2019 22:16:33 +0000 (22:16 +0000)]
MFC r341172, r341270.
t4_clip.c had to be manually adjusted because Concurrency Kit is not
available in stable/11.

r341172:
Move CLIP table handling out of TOM and into the base driver.

- Store the clip table in 'struct adapter' instead of in the TOM softc.
- Init the clip table during attach and teardown during detach.
- While here, add a dev.<nexus>.<unit>.misc.clip sysctl to dump the
  CLIP table.

This does mean that we update the clip table even if TOE is not enabled,
but non-TOE things need the CLIP table anyway.

Reviewed by: np, Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18010

r341270:
Make most of the CLIP code conditional on #ifdef INET6.

This fixes builds of kernels without INET6 such as LINT-NOINET6.

Reported by: arybchik
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18384

5 years agoMFC r339700:
np [Mon, 29 Apr 2019 21:55:39 +0000 (21:55 +0000)]
MFC r339700:

cxgbe(4): new sysctl to display the start of the RSS region for a VI.

dev.<ifname>.<inst>.rss_base

For example:
dev.cc.0.rss_base: 0
dev.cc.1.rss_base: 128
dev.vcc.0.rss_base: 256
dev.vcc.1.rss_base: 384

Sponsored by: Chelsio Communications

5 years agoMFC r339628, r339965
np [Mon, 29 Apr 2019 21:34:24 +0000 (21:34 +0000)]
MFC r339628, r339965

r339628:
cxgbe(4): improve the accuracy of various TSO limits reported to the kernel.

Sponsored by: Chelsio Communications

r339965:
cxgbe(4): Report a reasonable non-zero if_hw_tsomaxsegsize to the
kernel.

This reverts an accidental change that snuck in with r339628.

Sponsored by: Chelsio Communications

5 years agoMFC r345351:
ngie [Mon, 29 Apr 2019 20:53:20 +0000 (20:53 +0000)]
MFC r345351:
r345351 (by bdrewery):

Build common kernel dependencies before modules.

This ensures files like genassym.o and awk/mfiles are generated before
descending into the modules build.  It may also allow some module builds
to not recreate files that are already present in the KERNBUILDDIR.

This fixes a rare build race where genassym.o is missing and assym.inc
is empty.

More work is planned around this to reduce some redundant dependency
generation in modules.

PR: 233339

5 years agoMFC r339891, r340063, r342266, r342270, r342272, r342288-r342289
np [Mon, 29 Apr 2019 20:10:28 +0000 (20:10 +0000)]
MFC r339891, r340063, r342266, r342270, r342272, r342288-r342289

r339891:
cxgbe/iw_cxgbe: Install the socket upcall before calling soconnect to
ensure that it always runs when soisconnected does.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r340063:
cxgbe/iw_cxgbe: Suppress spurious "Unexpected streaming data ..."
messages.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r342266:
cxgbe/iw_cxgbe: Use DSGLs to write to card's memory when appropriate.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r342270:
cxgbe/iw_cxgbe: Add a knob for testing that lets iWARP connections cycle
through 4-tuples quickly.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r342272:
cxgbe/iw_cxgbe: Use -ve errno when interfacing with linuxkpi/OFED.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r342288:
cxgbe/iw_cxgbe: Do not terminate CTRx messages with \n.

r342289:
cxgbe/iw_cxgbe: Remove redundant CTRs from c4iw_alloc/c4iw_rdev_open.
This information is readily available elsewhere.

Sponsored by: Chelsio Communications

5 years agoMFC r339667:
np [Mon, 29 Apr 2019 19:47:21 +0000 (19:47 +0000)]
MFC r339667:

cxgbe/iw_cxgbe: save the ep in the driver-private provider_data field.

Submitted By: Lily Wang @ Netapp

5 years agoMFC r339626:
np [Mon, 29 Apr 2019 19:37:16 +0000 (19:37 +0000)]
MFC r339626:

cxgbe(4): Use automatic cidx updates with ofld and ctrl queues.

The bits that explicitly request cidx updates do not work reliably with
all possible WRs that can be sent over the queue.  The F_FW_WR_EQUIQ
requests that still remain may also have to be replaced with explicit
credit flush WRs in the future.

Sponsored by: Chelsio Communications

5 years agoMFC r346571,r346572:
ngie [Mon, 29 Apr 2019 19:36:46 +0000 (19:36 +0000)]
MFC r346571,r346572:

Update the spelling of my name

Previous spellings of my name (NGie, Ngie) weren't my legal spelling. Use Enji
instead for clarity.

While here, remove "All Rights Reserved" from copyrights I "own".

5 years agoMFC r345723:
ngie [Mon, 29 Apr 2019 19:35:34 +0000 (19:35 +0000)]
MFC r345723:

PROG_OVERRIDE_VARS should override default values if specified

The behavior prior to this change would not override default values if set in
`bsd.own.mk`, or (in the more general case) globally before `bsd.progs.mk` was
included. This affected `bsd.test.mk` as well, since it consumes
`bsd.progs.mk`.

Some examples of this failing behavior are as follows:

* `BINMODE` defaults to 0555 per `bsd.own.mk`. If someone wanted to set the
  `BINMODE` to `NOBINMODE` (0444) for `prog`, for example, like
  `BINMODE.prog= ${NOBINMODE}`, `bsd.progs.mk` would not honor the per-PROG
  setting.
* An application, `prog`, does not build at `WARNS?= 6`. Before this change,
  setting to a lower `WARNS` value, e.g., `WARNS.prog= 3`, would have been
  impossible, requiring that `prog` be built from another directory,
  the global `WARNS` be lowered, or a per-PROG value needing to be set
  across the board. None of the above workarounds is desirable.

This change unbreaks variables defined in `PROG_OVERRIDE_VARS` which have
defaults set before `bsd.progs.mk` is included, by setting them to their
defined values if set on a per-PROG basis.

5 years agoMFC r338940:
np [Mon, 29 Apr 2019 19:25:06 +0000 (19:25 +0000)]
MFC r338940:

cxgbe(4): Treat base/end of firmware parameters as signed integers when
figuring out whether the range is valid or not.

5 years agoMFC r338874:
np [Mon, 29 Apr 2019 19:23:27 +0000 (19:23 +0000)]
MFC r338874:

cxgbe(4): Reuse existing "switching" L2T entries when possible.

5 years agoMFC r338669:
np [Mon, 29 Apr 2019 19:16:29 +0000 (19:16 +0000)]
MFC r338669:

cxgbe(4): Use the correct number of parameters when querying the tid
range for hashfilters.

5 years agoMFC r338355:
np [Mon, 29 Apr 2019 19:15:50 +0000 (19:15 +0000)]
MFC r338355:

cxgbe/tom: Unregister shared CPL handlers on module unload.  This fixes
a panic with INVARIANTS that occurs when t4_tom is unloaded and reloaded.

5 years agoMFC r346539:
ngie [Mon, 29 Apr 2019 19:11:56 +0000 (19:11 +0000)]
MFC r346539:

Fix `get_int_via_sysctlbyname(..)` on Jenkins

Initialize `oldlen` to the size of the value, instead of leaving the value
unitialized. Leaving it unitialized seems to work by accident on amd64 when
running 64-bit programs, but not on i386.

This matches patterns in use in other programs.

PR: 237458
Tested on: ^/head (amd64), ^/stable/11 (i386)

5 years agoMFC r346113:
oshogbo [Mon, 29 Apr 2019 18:55:49 +0000 (18:55 +0000)]
MFC r346113:
 libnv: fix compilation warnings

 When building libnv without a debug those arguments are no longer used
 because assertions will be changed to NOP.

 Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>

5 years agoMFC r346112:
oshogbo [Mon, 29 Apr 2019 18:52:04 +0000 (18:52 +0000)]
MFC r346112:
  libnv: fix compilation warnings

  When building libnv without a debug those arguments are no longer used
  because assertions will be changed to NOP.

  Submitted by: Mindaugas Rasiukevicius <rmind@netbsd.org>

MFC r346115:
  The nvlist_report_missing is also used by the cnvlist.
  It can't be a static one.

  Reported by:  jenkins

5 years agoMFC ar: implement support for /SYM64/ 64-bit archives
emaste [Mon, 29 Apr 2019 18:37:39 +0000 (18:37 +0000)]
MFC ar: implement support for /SYM64/ 64-bit archives

r346079: ar: implement support for /SYM64/ 64-bit archives

Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Reviewed by: imp (earlier)

r346568: ar: test for writing 64-bit format only if symbol count is nonzero

This is a minor simplification; if we do not have any symbols the empty
symbol table can be in 32-bit format.

r346569: ar: use array notation to access s_so

This is somewhat more readable than pointer arithmetic.  Also remove an
unnecessary cast while here.

r346582: ar: shuffle symbol offsets during conversion for 32-bit ar archives

During processing we maintain symbol offsets in the 64-bit s_so array,
and when writing the archive convert to 32-bit if no offsets are greater
than 4GB.  However, this was somewhat inefficient as we looped over the
array twice: first, converting to big endian and second, writing each
32-bit value one at a time (and incorrectly so on big-endian platforms).

Instead, when writing a 32-bit archive shuffle convert symbol data to
big endian (as required by the ar format) and shuffle to the beginning
of the allocation at the same time.

Also correct emission of the symbol count on big endian platforms.

Further changes are planned, but this should fix powerpc64.

Reported by: jhibbits, mlinimon
Reviewed by: jhibbits, Gerald Aryeetey (earlier)
Tested by: jhibbits

PR: 234454
Sponsored by: The FreeBSD Foundation

5 years agoMFC r339648: ar: report errno on warning/error
emaste [Mon, 29 Apr 2019 18:28:34 +0000 (18:28 +0000)]
MFC r339648:     ar: report errno on warning/error

Previously ar would report an error like "ar: fatal: Write error"
without including additional errno information.  Change warnings and
errors to include archive_errno() so that the user may have some idea
of the reason for the failure.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r346016:
mhorne [Mon, 29 Apr 2019 16:14:24 +0000 (16:14 +0000)]
MFC r346016:
Add option to build LLVM RISC-V target

Approved by: markj (mentor)

5 years agoMFC r346544:
markj [Mon, 29 Apr 2019 13:20:55 +0000 (13:20 +0000)]
MFC r346544:
Clarify the relationship between INVARIANTS and DIAGNOSTIC a bit.

5 years agoMFC r338218:
np [Mon, 29 Apr 2019 05:35:52 +0000 (05:35 +0000)]
MFC r338218:

cxgbev(4): Updates to the VF driver to cope with recent ifmedia and
ctrlq changes in the base driver.

Sponsored by: Chelsio Communications

5 years agoMFC r338156, r338158-r338161, r338166.
np [Mon, 29 Apr 2019 05:26:27 +0000 (05:26 +0000)]
MFC r338156, r338158-r338161, r338166.

r338156:
cxgbe(4): Avoid overflow while calculating channel rate.

Reported by: Coverity (CID 1008352)

r338158:
cxgbe(4): Check the RO bit properly before disabling relaxed ordering.

Reported by: Coverity (CID 1384286)

r338159:
cxgbe(4): Make it clear that VI_INIT_DONE implies vi->ntxq > 0, and so
rc will never be returned uninitialized.

Reported by: Coverity (CID 1394884).  This is a false positive though.

r338160:
cxgbe(4): Do not leak memory in case of errors during VI initialization.

Reported by: Coverity (CID 1392026)

r338161:
cxgbe/tom: Make sure 'matched' is always initialized before use.

Reported by: Coverity (CID 1390894)

r338166:
cxgbe(4): Be explicit about ignoring the return value of cmpset in some
cases.

Reported by: Coverity (CIDs 10093981009400100940113573251394783).  All false positives.

5 years agoMFC r337873:
np [Mon, 29 Apr 2019 05:01:34 +0000 (05:01 +0000)]
MFC r337873:

cxgbe(4): Use VLAN_TRUNKDEV instead of private cookie to figure out the
parent of a VLAN ifnet.

Sponsored by: Chelsio Communications

5 years agoMFC r337830:
np [Mon, 29 Apr 2019 04:51:30 +0000 (04:51 +0000)]
MFC r337830:

cxgbe(4): Use two hashes instead of a table to keep track of
hashfilters.  Two because the driver needs to look up a hashfilter by
its 4-tuple or tid.

A couple of fixes while here:
- Reject attempts to add duplicate hashfilters.
- Do not assume that any part of the 4-tuple that isn't specified is 0.
  This makes it consistent with all other mandatory parameters that
  already require explicit user input.

5 years agoMFC r337659:
np [Mon, 29 Apr 2019 04:42:18 +0000 (04:42 +0000)]
MFC r337659:

cxgbe(4): Move all control queues to the adapter.

There used to be one control queue per adapter (the mgmtq) that was
initialized during adapter init and one per port that was initialized
later during port init.  This change moves all the control queues (one
per port/channel) to the adapter so that they are initialized during
adapter init and are available before any port is up.  This allows the
driver to issue ctrlq work requests over any channel without having to
bring up any port.

5 years agoMFC r337609:
np [Mon, 29 Apr 2019 04:31:27 +0000 (04:31 +0000)]
MFC r337609:

cxgbe(4): Create two variants of service_iq, one for queues with
freelists and one for those without.

MFH: 3 weeks
Sponsored by: Chelsio Communications

5 years agoMFC r337538, r337987
np [Mon, 29 Apr 2019 03:52:03 +0000 (03:52 +0000)]
MFC r337538, r337987

r337538:
cxgbe(4): Add support for high priority filters on T6+.  They have their
own region in the TCAM starting with T6, unlike previous chips where
they were in the same region as normal filters.

These filters "hit" before anything else in the LE's lookup.  The exact
order is:
a) High priority filters
b) TOE's active region (TCAM and/or hash)
c) Servers (TOE hw listeners)
d) Normal filters

Sponsored by: Chelsio Communications

r337987:
cxgbe(4):  Adjust ntids to account for nhptids in the TOE case too.
This should have been part of r337538.

5 years agoMFC r337192:
np [Mon, 29 Apr 2019 03:31:20 +0000 (03:31 +0000)]
MFC r337192:

cxgbe(4): Improvements in TID management.

- Ignore any type of TID where the start/end values are not in the
  correct order.  There are situations where the firmware isn't able to
  reserve room for the number requested in the config file but doesn't
  report a failure during configuration and instead sets end <= start.

- Track start/end in tid_tab and remove some redundant copies from
  adapter->params.

- Move all the start/end and other read-only parameters to a quiet part
  of tid_tab, away from the tid locks.

Sponsored by: Chelsio Communications

5 years agoMFC r336718, r336720, r336734-r336735, r337398, r337439, and r337540.
np [Mon, 29 Apr 2019 03:10:58 +0000 (03:10 +0000)]
MFC r336718, r336720, r336734-r336735, r337398, r337439, and r337540.
These are all related to tx rate limiting in cxgbe.

r336718:
cxgbe(4): Validate only those parameters that are relevant to the
type of rate limiter being programmed.  Skip the ones that are not
applicable.

Sponsored by: Chelsio Communications

r336720:
cxgbe(4): Remove useless code that crept in with r336718.

X-MFC With: 336718

r336734:
cxgbe(4): Better defaults for all cl-rl rate limiters.

Start in "class" instead of "flow" mode.  This eliminates the need to
specify an MTU, which is not available that early anyway.  It also
allows the user to manually configure ch-rl rate limiting after attach.
This used to fail because ch-rl isn't supported if cl-rl "flow" mode is
configured.

Set all traffic classes to 1Gbps during initialization.  The goal is to
start off with _any_ valid configuration and 1Gbps works even for
gigabit cards.

Sponsored by: Chelsio Communications

r336735:
cxgbe(4): Consider rateunit before ratemode when displaying information
about a traffic class.  This matches the order in which the firmware
evaluates unit and mode internally.

Sponsored by: Chelsio Communications

r337398:
cxgbe(4): Allow user-configured and driver-configured traffic classes to
be used simultaneously.  Move sysctl_tc and sysctl_tc_params to
t4_sched.c while here.

Sponsored by: Chelsio Communications

r337439:
cxgbe(4): Allow the driver to specify a burst size when configuring a
traffic class for rate limiting.

Add experimental knobs that allow the user to specify a default pktsize
and burstsize for traffic classes associated with a port:

dev.<ifname>.<instance>.tc.pktsize
dev.<ifname>.<instance>.tc.burstsize

Sponsored by: Chelsio Communications

r337540:
cxgbe(4): Display pkt-size and burst-size in traffic class parameters.

5 years agoMFC r337397:
np [Mon, 29 Apr 2019 02:38:51 +0000 (02:38 +0000)]
MFC r337397:

cxgbe(4): Break up sysctl_bitfield into 8 bit and 16 bit variants.  Have
them display the current value of the bitfield rather than the fixed
value that was provided when the sysctl node was created.

Sponsored by: Chelsio Communications

5 years agoMFC r335223:
np [Mon, 29 Apr 2019 02:30:06 +0000 (02:30 +0000)]
MFC r335223:

cxgbe(4): sysctls to display the local and intr CPUs for the adapter.

The driver assumes the list can change (even though it does't right now)
and queries it every time the sysctl runs.

sysctl dev.<nexus>.<inst>.local_cpus
sysctl dev.<nexus>.<inst>.intr_cpus

sysctl dev.t6nex.0.local_cpus
sysctl dev.t6nex.0.intr_cpus

Sponsored by: Chelsio Communications

5 years agoMFC r335701:
np [Mon, 29 Apr 2019 01:22:58 +0000 (01:22 +0000)]
MFC r335701:

cxgbe/cxgbei: Fix harmful typo in the iSCSI offload driver.

Reported by: gcc8 (via mmacy@)
Sponsored by: Chelsio Communications

5 years agoMFC r334467:
np [Mon, 29 Apr 2019 01:15:22 +0000 (01:15 +0000)]
MFC r334467:

cxgbe(4): Retire an old check.

5 years agoMFC r334139:
np [Mon, 29 Apr 2019 00:57:47 +0000 (00:57 +0000)]
MFC r334139:

cxgbe/t4_tom: ABORT_RPL_RSS is a shared CPL and t4_tom shouldn't remove
the global handler when it's being unloaded.

5 years agoMFC r334138:
np [Mon, 29 Apr 2019 00:40:02 +0000 (00:40 +0000)]
MFC r334138:

r334138: cxgbe(4): Make FW4_ACK a shared CPL.

5 years agoMFC r334137:
np [Mon, 29 Apr 2019 00:31:58 +0000 (00:31 +0000)]
MFC r334137:

cxgbe(4): Fix range checks in is_etid.

5 years agoMFC r334136:
np [Mon, 29 Apr 2019 00:22:34 +0000 (00:22 +0000)]
MFC r334136:

cxgbe(4): Slightly simpler needs_<foo> functions.

5 years agoMFC r334132:
np [Mon, 29 Apr 2019 00:16:20 +0000 (00:16 +0000)]
MFC r334132:

cxgbe(4): Make sure that the egress queue's cidx is updated periodically
when the driver is writing WRs using start_wrq_wr/commit_wrq_wr all the
time.

Sponsored by: Chelsio Communications

5 years agoMFC r333141 (by gallatin@):
np [Mon, 29 Apr 2019 00:08:30 +0000 (00:08 +0000)]
MFC r333141 (by gallatin@):

Optionally panic when cxgbe encounters a fatal error

Sometimes it is better to panic than to leave a machine
unreachable.

Reviewed by: np
Sponsored by: Netflix

5 years agoMFC r333153, r333394, r333442, r333472, r333620, r334058, r334447,
np [Sun, 28 Apr 2019 19:52:48 +0000 (19:52 +0000)]
MFC r333153, r333394, r333442, r333472, r333620, r334058, r334447,
r334452, and r335684.  These revisions added hashfilters, NAT offload,
and SMAC/DMAC swapping filters to cxgbe.

r333153:
cxgbe(4): Move all TCAM filter code into a separate file.

Sponsored by: Chelsio Communications

r333394:
cxgbe(4): Add support for hash filters.

These filters reside in the card's memory instead of its TCAM and can be
configured via a new "hashfilter" subcommand in cxgbetool.  Hash and
normal TCAM filters can be used together.  The hardware does an
exact-match of packet fields for hash filters, unlike the masked match
performed for TCAM filters.  Any T5/T6 card with memory can support at
least half a million hash filters.  The sample config file with the
driver configures 512K of these, it is possible to double this to 1
million+ in some cases.

The chip does an exact-match of fields of incoming datagrams with hash
filters and performs the action configured for the filter if it matches.
The fields to match are specified in a "filter mask" in the firmware
config file.  The filter mask always includes the 5-tuple (sip, dip,
sport, dport, ipproto).  It can, optionally, also include any subset of
the filter mode (see filterMode and filterMask in the firmware config
file).

For example:
filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
filterMask = protocol, port, vlan

Exact values of the 5-tuple, the physical port, and VLAN tag would have
to be provided while setting up a hash filter with the chip
configuration above.

Hash filters support all actions supported by TCAM filters.  A packet
that hits a hash filter can be dropped, let through (with optional
steering to a specific queue or RSS region), switched out of another
port (with optional L2 rewrite of DMAC, SMAC, VLAN tag), or get NAT'ed.
(Support for some of these will show up in the driver in a follow-up
commit very shortly).

Sponsored by: Chelsio Communications

r333442:
cxgbe(4): Determine whether the firmware supports the FILTER2 work
request, which can be used to configure hardware NAT and swapmac.

All firmwares released after Jan 2017 support this work request.

Sponsored by: Chelsio Communications

r333472:
cxgbe(4): Add fields to support configuration of hardware NAT and
swapmac (SMAC/DMAC switcheroo) from userspace.

Sponsored by: Chelsio Communications

r333620:
cxgbe(4): Filtering related features and fixes.

- Driver support for hardware NAT.
- Driver support for swapmac action.
- Validate a request to create a hashfilter against the filter mask.
- Add a hashfilter config file for T5.

Sponsored by: Chelsio Communications

r334058:
cxgbe(4): Only valid filters are expected to have a valid tid.

r334447:
cxgbe(4): Add code to deal with the chip's source MAC table (aka SMT).

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r334452:
cxgbe(4): Add support for SMAC-rewriting filters.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

r335684:
cxgbe(4): Do not leak the filters in the hashfilter table on module
unload.

Sponsored by: Chelsio Communications

Relnotes: Yes

5 years agoMFC r333121, r333128
np [Sun, 28 Apr 2019 19:02:34 +0000 (19:02 +0000)]
MFC r333121, r333128

r333121:
cxgbe/t4_tom: Use appropriate macros instead of magic math while
constructing the atid of an active open work request.

Sponsored by: Chelsio Communications

r333128:
cxgbe(4): Convert ACT_OPEN_RPL to a shared CPL.

Reserve 3b in the 14b atid to identify the owner and use it to dispatch
the CPL.  This allows all CPLs that use an atid to be used as shared
CPLs, although ACT_OPEN_RPL is the only one being converted in this
revision.

Sponsored by: Chelsio Communications

5 years agoMFC r333114:
np [Sun, 28 Apr 2019 18:50:25 +0000 (18:50 +0000)]
MFC r333114:

cxgbe(4): Use opaque cookies or tid range-checks to determine the
intended recipient of a CPL when it can't be determined solely from the
opcode.  Retire the per-queue handlers for such CPLs in favor of the new
scheme.

Sponsored by: Chelsio Communications

5 years agoMFC r333043:
np [Sun, 28 Apr 2019 18:44:29 +0000 (18:44 +0000)]
MFC r333043:

cxgbe(4): Move release_tid to the base NIC driver for future consumers.

Sponsored by: Chelsio Communications.

5 years agoMFC r333030:
np [Sun, 28 Apr 2019 18:36:54 +0000 (18:36 +0000)]
MFC r333030:

cxgbe(4): Break up alloc_tid_tabs and move the atid routines to the base
NIC driver.  The atid services will be used by new features (hashfilters
and inline TLS) that do not involve TOE.

Sponsored by: Chelsio Communications

5 years agoMFC r331902:
np [Sun, 28 Apr 2019 18:30:19 +0000 (18:30 +0000)]
MFC r331902:

r331902: cxgbe: Implement tcp_info handler for connections handled by t4_tom.

5 years agoMFC r345473:
dchagin [Sun, 28 Apr 2019 14:20:29 +0000 (14:20 +0000)]
MFC r345473:

Whitespace cleanup (annoying).

5 years agoMFC r345471, r345472, r346603:
dchagin [Sun, 28 Apr 2019 14:19:31 +0000 (14:19 +0000)]
MFC r345471, r345472, r346603:

Update syscall.master to 5.0.

For 32-bit Linuxulator, ipc() syscall was historically
the entry point for the IPC API. Starting in Linux 4.18, direct
syscalls are provided for the IPC. Enable it.

5 years agoMFC r345469, r345470:
dchagin [Sun, 28 Apr 2019 14:16:00 +0000 (14:16 +0000)]
MFC r345469, r345470:

Linux between 4.18 and 5.0 split IPC system calls.
In preparation for doing this in the Linuxulator modify our linux_shmat()
to match actual Linux shmat() system call.

5 years agoMFC r345468:
dchagin [Sun, 28 Apr 2019 14:11:21 +0000 (14:11 +0000)]
MFC r345468:

Revert r313993.
AMD64_SET_**BASE expects a pointer to a pointer, we just passing in the pointer value itself.

Set PCB_FULL_IRET for doreti to restore %fs, %gs and its correspondig base.

5 years agoMFC r335644 (by emaste@):
dchagin [Sun, 28 Apr 2019 14:09:31 +0000 (14:09 +0000)]
MFC r335644 (by emaste@):

Quiet unused fn warning for linuxulator w/o legacy syscalls.

5 years agoMFC r335515 (by chuck@):
dchagin [Sun, 28 Apr 2019 14:08:05 +0000 (14:08 +0000)]
MFC r335515 (by chuck@):

Fix the Linux kernel version number calculation

The Linux compatibility code was converting the version number (e.g.
2.6.32) in two different ways and then comparing the results.

The linux_map_osrel() function converted MAJOR.MINOR.PATCH similar to
what FreeBSD does natively. I.e. where major=v0, minor=v1, and patch=v2
    v = v0 * 1000000 + v1 * 1000 + v2;

The LINUX_KERNVER() macro, on the other hand, converted the value with
bit shifts. I.e. where major=a, minor=b, and patch=c
    v = (((a) << 16) + ((b) << 8) + (c))

The Linux kernel uses the later format via the KERNEL_VERSION() macro in
include/generated/uapi/linux/version.h

Fix is to use the LINUX_KERNVER() macro in linux_map_osrel() as well as
in the .trans_osrel functions.

PR: 229209

5 years agoMFC r335387 (by emaste@):
dchagin [Sun, 28 Apr 2019 14:06:22 +0000 (14:06 +0000)]
MFC r335387 (by emaste@):

linuxulator: handle V3 capget/capset

Linux 2.6.26 introduced 64-bit capability sets.  Extend our stub
implementation to handle both 32- and 64-bit.  (We still report no
capabilities in capget, and disallow any in capset.)

5 years agoMFC r335327 (by emaste@):
dchagin [Sun, 28 Apr 2019 14:05:05 +0000 (14:05 +0000)]
MFC r335327 (by emaste@):

linuxulator: add debugging for invalid capget/capset version.

5 years agoMFC r335201 (by emaste@):
dchagin [Sun, 28 Apr 2019 14:03:32 +0000 (14:03 +0000)]
MFC r335201 (by emaste@):

linuxulator: do not include legacy syscalls on arm64

Existing linuxulator platforms (i386, amd64) support legacy syscalls,
such as non-*at ones like open, but arm64 and other new platforms do
not.

Wrap these in #ifdef LINUX_LEGACY_SYSCALLS, #defined in the MD linux.h
files.  We may need finer grained control in the future but this is
sufficient for now.

5 years agoMFC r335200 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:45:18 +0000 (13:45 +0000)]
MFC r335200 (by emaste@):

Correct debug control for linuxulator faccessat

The Linuxulator provides per-syscall debug control via the
compat.linux.debug sysctl.  There's generally a 1:1 mapping between
sysctl setting and syscall, but faccessat was controlled by the access
setting, perhaps due to copy-paste.

5 years agoMFC r332893 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:43:58 +0000 (13:43 +0000)]
MFC r332893 (by emaste@):

Map FreeBSD EDOOFUS to Linux EINVAL

Previously EDOOFUS mapped to EBUSY.  EINVAL seems more appropriate.

5 years agoMFC r332333 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:42:34 +0000 (13:42 +0000)]
MFC r332333 (by emaste@):

linuxulator: deduplicate linux_exec_imgact_try

Previously linuxulator had three identical copies of
linux_exec_imgact_try.  Deduplicate before adding another arch to
linuxulator.

5 years agoMFC r331462 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:41:23 +0000 (13:41 +0000)]
MFC r331462 (by emaste@):

Remove redundant cast from Linuxulator SYSINITs.

5 years agoMFC r331356 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:40:17 +0000 (13:40 +0000)]
MFC r331356 (by emaste@):

Share Linux errno table with libsysdecode.

5 years agoMFC r331256 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:38:29 +0000 (13:38 +0000)]
MFC r331256 (by emaste@):

Make linuxulator fn declaration match definition

I accidentally swapped 'linux_fixup_elf' to 'linux_elf_fixup' in amd64's
declaration (only),  while bringing this change over from git and
encountering a conflict.

5 years agoMFC r331226 (byu emaste@):
dchagin [Sun, 28 Apr 2019 13:37:13 +0000 (13:37 +0000)]
MFC r331226 (byu emaste@):

Rename linuxulator functions with linux_ prefix

It's preferable to have a consistent prefix.  This also reduces
differences between the three linux*_sysvec.c files.

5 years agoMFC r331208 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:35:36 +0000 (13:35 +0000)]
MFC r331208 (by emaste@):

linux*_sysvec.c: rationalize whitespace and comments

There's a fair amount of duplication between MD linuxulator files.
Make indentation and comments consistent between the three versions of
linux_sysvec.c to reduce diffs when comparing them.

5 years agoMFC r331056:
dchagin [Sun, 28 Apr 2019 13:33:35 +0000 (13:33 +0000)]
MFC r331056:
Share a single bsd-linux errno table across MD consumers

Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table.  Move the table to a common
file to be used by all.  Make it 'const int' to place it in .rodata.

(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)

This change should introduce no functional change; a followup will add
missing errno values.

MFC r331057:
linux_errno.c: add newer errno values

Also introduce a static assert to ensure the list is kept up to date.

MFC r331060:
Chase r331057 in libsysdecode erno table

5 years agoMFC r330927 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:29:29 +0000 (13:29 +0000)]
MFC r330927 (by emaste@):

Remove stray ; at end of linux_vdso_deinstall()

5 years agoMFC r330866 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:28:05 +0000 (13:28 +0000)]
MFC r330866 (by emaste@):

Use C99 boolean type for translate_osrel

Migrate to modern types before creating MD Linuxolator bits for new
architectures.

5 years agoMFC r330822 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:26:55 +0000 (13:26 +0000)]
MFC r330822 (by emaste@):

imgact_linux.c: use standard indentation.

5 years agoMFC r330798 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:23:52 +0000 (13:23 +0000)]
MFC r330798 (by emaste@):

Linuxulator: apply style(9) to return.

5 years agoMFC r329876 (by emaste@):
dchagin [Sun, 28 Apr 2019 13:22:30 +0000 (13:22 +0000)]
MFC r329876 (by emaste@):

Use linux types for linux-specific syscalls.