]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoAdd a note about why we have the conditional before including
Warner Losh [Wed, 7 Feb 2018 16:28:26 +0000 (16:28 +0000)]
Add a note about why we have the conditional before including
bsd.compiler.mk. It's so fmake from older 9.x systems still
works (still a supported build config, and having the note here
will let us know when we can cull it more easily).

Also pull in a related change from include to sinclude from
arichardson@'s cross building work, as well as it's companion in
Makefile.inc1 with a note about why we do the odd thing there.

Submitted by: archardson
Differential Revision: https://reviews.freebsd.org/D14241

6 years agoadd retpoline compiler and linker feature flags
Ed Maste [Wed, 7 Feb 2018 14:50:06 +0000 (14:50 +0000)]
add retpoline compiler and linker feature flags

These features indicate that the compiler and linker support the
retpoline speculative execution vulnerability (CVE-2017-5715)
mitigation.

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

6 years agoFix implementation of ktime_add_ns() and ktime_sub_ns() in the LinuxKPI to
Hans Petter Selasky [Wed, 7 Feb 2018 12:12:06 +0000 (12:12 +0000)]
Fix implementation of ktime_add_ns() and ktime_sub_ns() in the LinuxKPI to
actually return the computed result instead of the input value.

This is a regression issue after r289572.

Found by: gcc6
MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years ago[ath] Use the BSSID address logic for STA VAPs too.
Adrian Chadd [Wed, 7 Feb 2018 09:37:22 +0000 (09:37 +0000)]
[ath] Use the BSSID address logic for STA VAPs too.

For DWDS VAPs on ath(4) we need to ensure that the STA vap and hostap VAP
have different MAC addresses.  If the STA code path doesn't utilise the
address assign / reclaim path then it doesn't update the bitmap with which
address was allocated.

This should fix a bunch of corner issues I've been seeing with DWDS STA + AP
VAPs that I was working around with manual MAC address assignment.

6 years ago[ar71xx] Fix the TL-wdr3600/tl-wdr4300 hints in the new world order.
Adrian Chadd [Wed, 7 Feb 2018 09:35:47 +0000 (09:35 +0000)]
[ar71xx] Fix the TL-wdr3600/tl-wdr4300 hints in the new world order.

Tested:

* tl-wdr4300

6 years agoif_awg: Skip emac reset if configured for internal PHY
Kyle Evans [Wed, 7 Feb 2018 01:54:13 +0000 (01:54 +0000)]
if_awg: Skip emac reset if configured for internal PHY

On the OrangePi One at least, emac reset when an ethernet cable is not
plugged in seems to break ethernet. Soft reset will fail, even with
increasing the delay and retries to wait for up to 20 seconds. This can be
reproduced across at least two different OrangePi One's by simply leaving
ethernet cable unplugged when awg attaches. Whether it's plugged in or not
through u-boot process makes no difference.

Skipping the reset in this configuration doesn't seem to cause any problems,
tried across many many reboots with and without ethernet cable plugged in.

Tested on: OrangePi One
Tested on: Other boards (manu)
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D13974

6 years agoKeep a counter for number of requests completed with an error.
Warner Losh [Tue, 6 Feb 2018 23:21:08 +0000 (23:21 +0000)]
Keep a counter for number of requests completed with an error.

Sponsored by: Netflix

6 years agofsync.2: Cross-reference fsync(1)
Conrad Meyer [Tue, 6 Feb 2018 23:12:47 +0000 (23:12 +0000)]
fsync.2: Cross-reference fsync(1)

Reported by: rpokala
Sponsored by: Dell EMC Isilon

6 years agoAvoid find -s, use find | sort instead.
Warner Losh [Tue, 6 Feb 2018 23:12:16 +0000 (23:12 +0000)]
Avoid find -s, use find | sort instead.

find -s was introduced to make the metalog more
deterministic. However, find -s is not portable. find | sort is
portable and accomplishes the same goals, even if it isn't
pedantically the same. TZS is the same before / after the change so
any fussy differences between the two are moot and there won't be
METALOG churn across this change.

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

6 years ago{ext2|ufs}_readdir: Avoid setting negative ncookies.
Pedro F. Giffuni [Tue, 6 Feb 2018 22:38:19 +0000 (22:38 +0000)]
{ext2|ufs}_readdir: Avoid setting negative ncookies.

ncookies cannot be negative or the allocator will fail. This should only
happen if a caller is very broken but we can still try to survive the
event.

We should probably also verify for uio_resid > MAXPHYS but in that case
it is not clear that just clipping the ncookies value is an adequate
response.

MFC after: 2 weeks

6 years agoUse const pointers for input data not modified by clock utility functions.
Ian Lepore [Tue, 6 Feb 2018 22:17:01 +0000 (22:17 +0000)]
Use const pointers for input data not modified by clock utility functions.

6 years agoUse correct arithmetic to calculate how many pages we need for kegs
Gleb Smirnoff [Tue, 6 Feb 2018 22:13:40 +0000 (22:13 +0000)]
Use correct arithmetic to calculate how many pages we need for kegs
and hashes.  There is no functional change with current sizes.

6 years agoUse per-domain locks for vm page queue free. Move paging control from
Jeff Roberson [Tue, 6 Feb 2018 22:10:07 +0000 (22:10 +0000)]
Use per-domain locks for vm page queue free.  Move paging control from
global to per-domain state.  Protect reservations with the free lock
from the domain that they belong to.  Refactor to make vm domains more
of a first class object.

Reviewed by:    markj, kib, gallatin
Tested by:      pho
Sponsored by:   Netflix, Dell/EMC Isilon
Differential Revision:  https://reviews.freebsd.org/D14000

6 years agoImprove DIAGNOSTIC printf. Report using a boot page every time regardless
Gleb Smirnoff [Tue, 6 Feb 2018 22:08:43 +0000 (22:08 +0000)]
Improve DIAGNOSTIC printf.  Report using a boot page every time regardless
of booted status.

6 years agoFix boot_pages calculation for machines that don't have UMA_MD_SMALL_ALLOC.
Gleb Smirnoff [Tue, 6 Feb 2018 22:06:59 +0000 (22:06 +0000)]
Fix boot_pages calculation for machines that don't have UMA_MD_SMALL_ALLOC.

o Call uma_startup1() after initializing kmem, vmem and domains.
o Include 8 eight VM startup pages into uma_startup_count() calculation.
o Account for vmem_startup() and vm_map_startup() preallocating pages.
o Account for extra two allocations done by kmem_init() and vmem_create().
o Hardcode the place of execution of vm_radix_reserve_kva(). Using SYSINIT
  allowed several other SYSINITs to sneak in before it, thus bumping
  requirement for amount of boot pages.

6 years agoRefactor cleanvar to remove shell expansion vulnerability
Mark Felder [Tue, 6 Feb 2018 21:35:41 +0000 (21:35 +0000)]
Refactor cleanvar to remove shell expansion vulnerability

If any process creates a directory named "-P" in /var/run or
/var/spool/lock it will cause the purgedir function to start to rm -r /.

Simplify a lot of complicated shell logic by leveraging find(1).

Reviewed by: allanjude
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D13778

6 years agoCache the value of the request and reply frame size since it's used quite
Scott Long [Tue, 6 Feb 2018 21:01:38 +0000 (21:01 +0000)]
Cache the value of the request and reply frame size since it's used quite
a bit in the normal operation of the driver.  Covert it to represent bytes
instead of 32bit words.  Fix what I believe to be is a bug in this respect
with the Tri-mode cards.

Sponsored by: Netflix

6 years agoFix firstboot fs mount logic
Mark Felder [Tue, 6 Feb 2018 20:12:05 +0000 (20:12 +0000)]
Fix firstboot fs mount logic

The firstboot logic has an error which causes the filesystem to be
mounted readonly even though root_rw_mount=YES. This fixes the error to
ensure that the root filesystem is mounted rw as expected after the run
of the firstboot scripts.

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D14226

6 years agoRemove a trailing whitspace.
Bjoern A. Zeeb [Tue, 6 Feb 2018 19:14:15 +0000 (19:14 +0000)]
Remove a trailing whitspace.

6 years agoDelete a declaration for a variable removed in r305362.
Mark Johnston [Tue, 6 Feb 2018 17:26:11 +0000 (17:26 +0000)]
Delete a declaration for a variable removed in r305362.

6 years agoUse a workaround to compile the crt init functions correctly with clang.
John Baldwin [Tue, 6 Feb 2018 17:01:10 +0000 (17:01 +0000)]
Use a workaround to compile the crt init functions correctly with clang.

The MIPS assembly parser treats forward-declared local symbols as global
symbols.  This results in CALL16 relocations being used against local
(private) symbols which then fail to resolve when linking binaries.
Add .local to force the init and fini functions to be treated as local as
a workaround.

Submitted by: sbruno
Sponsored by: DARPA / AFRL

6 years agoSimplify synchronization read error handling.
Mark Johnston [Tue, 6 Feb 2018 16:02:33 +0000 (16:02 +0000)]
Simplify synchronization read error handling.

Since synchronization reads are performed by submitting a request to
the external mirror provider, we know that the request returns with an
error only when gmirror was unable to read a copy of the block from any
mirror. Thus, there is no need to retry the request from the
synchronization error handler.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoFix queue length reporting in mps(4) and mpr(4).
Alexander Motin [Tue, 6 Feb 2018 16:02:25 +0000 (16:02 +0000)]
Fix queue length reporting in mps(4) and mpr(4).

Both drivers were found to report CAM bigger queue depth then they really
can handle.  It made them later under high load with many disks return
some of submitted requests back with CAM_REQUEUE_REQ status for later
resubmission.

Reviewed by: scottl
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14215

6 years agoDiagnostic buffer fixes for the mps(4) and mpr(4) drivers.
Kenneth D. Merry [Tue, 6 Feb 2018 15:58:22 +0000 (15:58 +0000)]
Diagnostic buffer fixes for the mps(4) and mpr(4) drivers.

In mp{r,s}_diag_register(), which is used to register diagnostic
buffers with the mp{r,s}(4) firmware, we allocate DMAable memory.

There were several issues here:
 o No checking of the bus_dmamap_load() return value.  If the load
   failed or got deferred, mp{r,s}_diag_register() continued on as if
   nothing had happened.  We now check the return value and bail
   out if it fails.

 o No waiting for a deferred load callback.  bus_dmamap_load()
   calls a supplied callback when the mapping is done.  This is
   generally done immediately, but it can be deferred.
   mp{r,s}_diag_register() did not check to see whether the callback
   was already done before proceeding on.  We now sleep until the
   callback is done if it is deferred.

 o No call to bus_dmamap_sync(... BUS_DMASYNC_PREREAD) after the
   memory is allocated and loaded.  This is necessary on some
   platforms to synchronize host memory that is going to be updated
   by a device.

Both drivers would also panic if the firmware was reinitialized while
a diagnostic buffer operation was in progress.  This fixes that problem
as well.  (The driver will reinitialize the firmware in various
circumstances, but the problem I ran into was that the firmware would
generate an IOC Fault due to a PCIe error.)

mp{r,s}var.h:
Add a new structure, struct mpr_busdma_context, that is
used for deferred busdma load callbacks.

Add a prototype for mp{r,s}_memaddr_wait_cb().
mp{r,s}.c:
Add a new busdma callback function, mp{r,s}_memaddr_wait_cb().
This provides synchronization for callers that want to
wait on a deferred bus_dmamap_load() callback.

mp{r,s}_user.c:
In bus_dmamap_register(), add a call to bus_dmamap_sync()
with the BUS_DMASYNC_PREREAD flag set after an allocation
is loaded.

Also, check the return value of bus_dmamap_load().  If it
fails, bail out.  If it is EINPROGRESS, wait for the
callback to happen.  We use an interruptible sleep (msleep
with PCATCH) and let the callback clean things up if we get
interrupted.

In mpr_diag_read_buffer() and mps_diag_read_buffer(), call
bus_dmamap_sync(..., BUS_DMASYNC_POSTREAD) before copying
the data out to make sure the data is in stable storage.

In mp{r,s}_post_fw_diag_buffer() and
mp{r,s}_release_fw_diag_buffer(), check the reply to see
whether it is NULL.  It can be NULL (and the command non-NULL)
if the controller gets reinitialized while we're waiting for
the command to complete but the driver structures aren't
reallocated.  The driver structures generally won't be
reallocated unless there is a firmware upgrade that changes
one of the IOCFacts.

When freeing diagnostic buffers in mp{r,s}_diag_register()
and mp{r,s}_diag_unregister(), zero/NULL out the buffer after
freeing it.  This will prevent a duplicate free in some
situations.

Sponsored by: Spectra Logic
Reviewed by: mav, scottl
MFC after: 1 week
Differential Revision: D13453

6 years agocrossbuild: Make the CHECK_TIME variable work on Linux
Alex Richardson [Tue, 6 Feb 2018 15:41:45 +0000 (15:41 +0000)]
crossbuild: Make the CHECK_TIME variable work on Linux

Linux /usr/bin/find doesn't understand the -mtime -0s flag.
Instead create a temporary file and compare that file's mtime to
sys/sys/param.h to check whether the clock is correct.

Reviewed By: jhb, imp
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14157

6 years agoDon't hardcode /usr/bin as the path for mktemp in build tools
Alex Richardson [Tue, 6 Feb 2018 15:41:35 +0000 (15:41 +0000)]
Don't hardcode /usr/bin as the path for mktemp in build tools

It won't work e.g. when crossbuilding from Ubuntu Linux as mktemp is in
/bin there.

Reviewed By: bdrewery
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D13937

6 years agoAllow compiling usr.bin/find on Linux and Mac
Alex Richardson [Tue, 6 Feb 2018 15:41:26 +0000 (15:41 +0000)]
Allow compiling usr.bin/find on Linux and Mac

When building FreeBSD the makefiles invoke find with various flags such as
`-s` that aren't supported in the native /usr/bin/find. To fix this I
build the FreeBSD version of find and use that when crossbuilding.

Inserting lots if #ifdefs in the code is rather ugly but I don't see a
better solution.

Reviewed By: brooks (mentor)
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D13306

6 years agoMake mips_postboot_fixup work when building the kernel with clang+lld
Alex Richardson [Tue, 6 Feb 2018 15:41:15 +0000 (15:41 +0000)]
Make mips_postboot_fixup work when building the kernel with clang+lld

The compiler/linker can align fake_preload anyway it would like. When
building the kernel with gcc+bfd this always happened to be a multiple of 8.
When I built the kernel with clang and linked with lld fake_preload
happened to only be aligned to 4 bytes which caused a an ADDRS trap because
the compiler will emit sd instructions to store to this buffer.

Reviewed By: jhb, imp
Approved By: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D14018

6 years ago- Document new ${name}_limits rc.conf option
Dmitry Marakasov [Tue, 6 Feb 2018 15:30:17 +0000 (15:30 +0000)]
- Document new ${name}_limits rc.conf option

Approved by: cy
MFC after: 2 weeks (along with 328331 which introduced this option)
Differential Revision: https://reviews.freebsd.org/D14028

6 years agodtb/allwinner: Add sun7i-a20-lamobo-r1.dts (Banana Pi R1)
Kyle Evans [Tue, 6 Feb 2018 14:57:03 +0000 (14:57 +0000)]
dtb/allwinner: Add sun7i-a20-lamobo-r1.dts (Banana Pi R1)

FreeBSD boots on this board, but the ethernet switch is not currently
supported, resulting in no ethernet.

A U-Boot port will be added once the ethernet switch is at least basically
supported, but we add its DTS to the build here to lower the barrier-to-boot
while work is underway.

6 years agoRemove libreadline from the source tree, all consumers but gdb
Baptiste Daroussin [Tue, 6 Feb 2018 12:22:42 +0000 (12:22 +0000)]
Remove libreadline from the source tree, all consumers but gdb
has been switched to libedit long ago, libreadline was built as an
internallib for a while and kept only for gdbtui which was broken using
libreadline.

Since gdb has been mostly deorbitted in all arches, gdbtui was only installed
on arm and sparc64, given it has been removed, gdb has been switched to use
libedit, no consumers are left for libreadline. Thus this removal

6 years agoCommit forgotten change in gdb allowing to use libedit
Baptiste Daroussin [Tue, 6 Feb 2018 12:17:03 +0000 (12:17 +0000)]
Commit forgotten change in gdb allowing to use libedit

6 years agoSwitch to use libedit instead of readline
Baptiste Daroussin [Tue, 6 Feb 2018 12:12:44 +0000 (12:12 +0000)]
Switch to use libedit instead of readline

6 years agoRemove gdbtui, it was already not installed on every arches
Baptiste Daroussin [Tue, 6 Feb 2018 11:54:20 +0000 (11:54 +0000)]
Remove gdbtui, it was already not installed on every arches
only installed on arm and sparc64.
It is the only bits that keeps us having libreadline in base
The rest of gdb can be switched to libedit and will be in another
commit

6 years ago[arswitch] Implement the switch MAC address fetch API.
Adrian Chadd [Tue, 6 Feb 2018 08:35:49 +0000 (08:35 +0000)]
[arswitch] Implement the switch MAC address fetch API.

The placeholders are here for some future "set" MAC address API.

Tested:

* AR9340 switch
* AR8327 switch

6 years ago[etherswitchcfg] print the switch MAC address if provided.
Adrian Chadd [Tue, 6 Feb 2018 08:35:09 +0000 (08:35 +0000)]
[etherswitchcfg] print the switch MAC address if provided.

6 years ago[etherswitch] add initial support for potentially configuring and fetching the switch...
Adrian Chadd [Tue, 6 Feb 2018 08:34:50 +0000 (08:34 +0000)]
[etherswitch] add initial support for potentially configuring and fetching the switch MAC address.

Switches that originate their own frames (eg obvious ones like Pause frames)
need a MAC address to use to send those frames from.

This API will hopefully begin to allow that to be configurable.

6 years agoFix a case where a request frame can be composed that requires 2 or more
Scott Long [Tue, 6 Feb 2018 06:55:55 +0000 (06:55 +0000)]
Fix a case where a request frame can be composed that requires 2 or more
SGList elements, but there's only enough space in the request frame for
either 1 element or a chain frame pointer.  Previously, the code would
hit the wrong case, add the SGList element, but then fail to add the
chain frame due to lack of space.  Re-arrange the code to catch this case
earlier and handle it.

Sponsored by: Netflix

6 years agoReturn a C errno for cam_periph_acquire().
Scott Long [Tue, 6 Feb 2018 06:42:25 +0000 (06:42 +0000)]
Return a C errno for cam_periph_acquire().

There's no compelling reason to return a cam_status type for this
function and doing so only creates confusion with normal C
coding practices. It's technically an API change, but the periph API
isn't widely used. No efffective change to operation.

Reviewed by: imp, mav, ken
Sponsored by: Netflix
Differential Revision: D14063

6 years agoCorrect structure name used in bus_map_resource(9) example
Bryan Venteicher [Tue, 6 Feb 2018 04:28:21 +0000 (04:28 +0000)]
Correct structure name used in bus_map_resource(9) example

Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14188

6 years agoFollowup on r302393 by cperciva, improving calculation of boot pages required
Gleb Smirnoff [Tue, 6 Feb 2018 04:16:00 +0000 (04:16 +0000)]
Followup on r302393 by cperciva, improving calculation of boot pages required
for UMA startup.

o Introduce another stage of UMA startup, which is entered after
  vm_page_startup() finishes. After this stage we don't yet enable buckets,
  but we can ask VM for pages. Rename stages to meaningful names while here.
  New list of stages: BOOT_COLD, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS,
  BOOT_RUNNING.
  Enabling page alloc earlier allows us to dramatically reduce number of
  boot pages required. What is more important number of zones becomes
  consistent across different machines, as no MD allocations are done before
  the BOOT_PAGEALLOC stage. Now only UMA internal zones actually need to use
  startup_alloc(), however that may change, so vm_page_startup() provides
  its need for early zones as argument.
o Introduce uma_startup_count() function, to avoid code duplication. The
  functions calculates sizes of zones zone and kegs zone, and calculates how
  many pages UMA will need to bootstrap.
  It counts not only of zone structures, but also of kegs, slabs and hashes.
o Hide uma_startup_foo() declarations from public file.
o Provide several DIAGNOSTIC printfs on boot_pages usage.
o Bugfix: when calculating zone of zones size use (mp_maxid + 1) instead of
  mp_ncpus. Use resulting number not only in the size argument to zone_ctor()
  but also as args.size.

Reviewed by: imp, gallatin (earlier version)
Differential Revision: https://reviews.freebsd.org/D14054

6 years agoOccasional cylinder-group check-hash errors were being reported on
Kirk McKusick [Tue, 6 Feb 2018 00:19:46 +0000 (00:19 +0000)]
Occasional cylinder-group check-hash errors were being reported on
systems running with a heavy filesystem load. Tracking down this
bug was elusive because there were actually two problems. Sometimes
the in-memory check hash was wrong and sometimes the check hash
computed when doing the read was wrong. The occurrence of either
error caused a check-hash mismatch to be reported.

The first error was that the check hash in the in-memory cylinder
group was incorrect. This error was caused by the following
sequence of events:

- We read a cylinder-group buffer and the check hash is valid.
- We update its cg_time and cg_old_time which makes the in-memory
  check-hash value invalid but we do not mark the cylinder group dirty.
- We do not make any other changes to the cylinder group, so we
  never mark it dirty, thus do not write it out, and hence never
  update the incorrect check hash for the in-memory buffer.
- Later, the buffer gets freed, but the page with the old incorrect
  check hash is still in the VM cache.
- Later, we read the cylinder group again, and the first page with
  the old check hash is still in the VM cache, but some other pages
  are not, so we have to do a read.
- The read does not actually get the first page from disk, but rather
  from the VM cache, resulting in the old check hash in the buffer.
- The value computed after doing the read does not match causing the
  error to be printed.

The fix for this problem is to only set cg_time and cg_old_time as
the cylinder group is being written to disk. This keeps the in-memory
check-hash valid unless the cylinder group has had other modifications
which will require it to be written with a new check hash calculated.
It also requires that the check hash be recalculated in the in-memory
cylinder group when it is marked clean after doing a background write.

The second problem was that the check hash computed at the end of the
read was incorrect because the calculation of the check hash on
completion of the read was being done too soon.

- When a read completes we had the following sequence:

  - bufdone()
  -- b_ckhashcalc (calculates check hash)
  -- bufdone_finish()
  --- vfs_vmio_iodone() (replaces bogus pages with the cached ones)

- When we are reading a buffer where one or more pages are already
  in memory (but not all pages, or we wouldn't be doing the read),
  the I/O is done with bogus_page mapped in for the pages that exist
  in the VM cache. This mapping is done to avoid corrupting the
  cached pages if there is any I/O overrun. The vfs_vmio_iodone()
  function is responsible for replacing the bogus_page(s) with the
  cached ones. But we were calculating the check hash before the
  bogus_page(s) were replaced. Hence, when we were calculating the
  check hash, we were partly reading from bogus_page, which means
  we calculated a bad check hash (e.g., because multiple pages have
  been mapped to bogus_page, so its contents are indeterminate).

The second fix is to move the check-hash calculation from bufdone()
to bufdone_finish() after the call to vfs_vmio_iodone() so that it
computes the check hash over the correct set of pages.

With these two changes, the occasional cylinder-group check-hash
errors are gone.

Submitted by: David Pfitzner <dpfitzner@netflix.com>
Reviewed by: kib
Tested by: David Pfitzner

6 years agoMove signal trampolines out of locore.s into separate source file.
Konstantin Belousov [Tue, 6 Feb 2018 00:02:30 +0000 (00:02 +0000)]
Move signal trampolines out of locore.s into separate source file.

Similar to other arches, the move makes the subject of locore.s only
the kernel startup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agobwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.
Landon J. Fuller [Mon, 5 Feb 2018 23:38:15 +0000 (23:38 +0000)]
bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.

- Remove the shim interface that allowed bwn(4) to use either siba_bwn or
  bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents.
- Drop the legay, now-unused siba_bwn bus driver.
- Clean up bhnd(4) board flag defines referenced by bwn(4).

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13518

6 years agoIgnore relocation tables for non-memory-resident sections.
John Baldwin [Mon, 5 Feb 2018 23:35:33 +0000 (23:35 +0000)]
Ignore relocation tables for non-memory-resident sections.

As a followup to r328101, ignore relocation tables for ELF object
sections that are not memory resident.  For modules loaded by the
loader, ignore relocation tables whose associated section was not
loaded by the loader (sh_addr is zero).  For modules loaded at runtime
via kldload(2), ignore relocation tables whose associated section is
not marked with SHF_ALLOC.

Reported by: Mori Hiroki <yamori813@yahoo.co.jp>, adrian
Tested on: mips, mips64
MFC after: 1 month
Sponsored by: DARPA / AFRL

6 years agoFix a typo.
John Baldwin [Mon, 5 Feb 2018 23:29:50 +0000 (23:29 +0000)]
Fix a typo.

6 years agoAlways give ELF brands a chance to veto a match.
John Baldwin [Mon, 5 Feb 2018 23:27:42 +0000 (23:27 +0000)]
Always give ELF brands a chance to veto a match.

If a brand provides a header_supported hook, check it when trying to
find a brand based on a matching interpreter as well as in the final
loop for the fallback brand. Previously a brand might reject a binary
via a header_supported hook in one of the earlier loops, but still be
chosen by one of these later loops.

Reviewed by: kib
Obtained from: CheriBSD
MFC after: 2 weeks
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D13945

6 years ago[arswitch] disable ARP copy-to-CPU port for AR9340 for now.
Adrian Chadd [Mon, 5 Feb 2018 20:37:29 +0000 (20:37 +0000)]
[arswitch] disable ARP copy-to-CPU port for AR9340 for now.

I'll have to go double check to see if it does indeed pass ARP frames between
switch ports with this disabled, but it seems required for the CPU port to see
ARP traffic.

I'll dig into this some more.

6 years ago[arswitch] fix build breakage.
Adrian Chadd [Mon, 5 Feb 2018 20:30:53 +0000 (20:30 +0000)]
[arswitch] fix build breakage.

Apparently the last time I checked building this it didn't pick up that the
header had changed.

6 years agoReduce duplication in extattr_*_(file|link) syscalls.
Brooks Davis [Mon, 5 Feb 2018 19:06:34 +0000 (19:06 +0000)]
Reduce duplication in extattr_*_(file|link) syscalls.

Reviewed by: rwatson
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14173

6 years agoANSIfy syscall implementations.
Brooks Davis [Mon, 5 Feb 2018 18:58:55 +0000 (18:58 +0000)]
ANSIfy syscall implementations.

Reviewed by: rwatson
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14172

6 years agoFix and enable SysV IPC tests.
Brooks Davis [Mon, 5 Feb 2018 18:48:00 +0000 (18:48 +0000)]
Fix and enable SysV IPC tests.

Don't declare some types that FreeBSD incorrectly declares.

Fix an incorrect call to open() (missing mode).

ANSIfy prototypes.

Enable SysV message queue, semaphore, and shared memory tests.

With exception of the workaround for union semun, these fixes have been
committed to NetBSD.

Reviewed by: asomers
Approved by: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13471

6 years agoCorrect Russia spelling in regdomain.xml
Ed Maste [Mon, 5 Feb 2018 18:45:21 +0000 (18:45 +0000)]
Correct Russia spelling in regdomain.xml

PR: 225658
MFC after: 1 week

6 years agoAdditional linuxolator whitespace cleanup, missed in r328890
Ed Maste [Mon, 5 Feb 2018 18:39:06 +0000 (18:39 +0000)]
Additional linuxolator whitespace cleanup, missed in r328890

6 years agoFix makecontext() on MIPS O32.
John Baldwin [Mon, 5 Feb 2018 18:10:28 +0000 (18:10 +0000)]
Fix makecontext() on MIPS O32.

The GP register can be clobbered by the callback, so save it in S1
while invoking the callback function.

While here, add a comment expounding on the treatment of GP for the
various ABIs and the assumptions made.

Reviewed by: jmallett (earlier version)
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D14179

6 years agoGarbage collect trailing whitespace.
Brooks Davis [Mon, 5 Feb 2018 18:06:54 +0000 (18:06 +0000)]
Garbage collect trailing whitespace.

Sponsored by: DARPA, AFRL

6 years agoDocument the need for WITH_CASPER.
Mark Johnston [Mon, 5 Feb 2018 17:33:16 +0000 (17:33 +0000)]
Document the need for WITH_CASPER.

After r325062, consumers need to define WITH_CASPER for libcasper to
function as expected.

6 years agoLinuxolator whitespace cleanup
Ed Maste [Mon, 5 Feb 2018 17:29:12 +0000 (17:29 +0000)]
Linuxolator whitespace cleanup

A version of each of the MD files by necessity exists for each CPU
architecture supported by the Linuxolator.  Clean these up so that new
architectures do not inherit whitespace issues.

Clean up shared Linuxolator files while here.

Sponsored by: Turing Robotic Industries Inc.

6 years agoext2fs: remove EXT4F_RO_INCOMPAT_SUPP
Pedro F. Giffuni [Mon, 5 Feb 2018 15:14:01 +0000 (15:14 +0000)]
ext2fs: remove EXT4F_RO_INCOMPAT_SUPP

This was a hack to be able to mount ext4 filesystems read-only while not
supporting all the features. We now support all those features so it
doesn't make sense to keep the undocumented hack.

Discussed with: fsu

6 years agoMove assym.s to DPSRCS in linux modules
Ed Maste [Mon, 5 Feb 2018 14:53:18 +0000 (14:53 +0000)]
Move assym.s to DPSRCS in linux modules

assym.s exists only to be included by other .s files, and should not
actually be assembled by itself.

Sponsored by: Turing Robotic Industries Inc.

6 years agoext2fs: Cleanup variable assignments for extents.
Pedro F. Giffuni [Mon, 5 Feb 2018 14:30:27 +0000 (14:30 +0000)]
ext2fs: Cleanup variable assignments for extents.

Delay the initialization of variables until the are needed.

In the case of ext4_ext_rm_leaf(), make sure 'error' value is not
undefined.

Reported by: Clang's static analyzer
Differential Revision: https://reviews.freebsd.org/D14193

6 years agozfs: move a utility function, ioflags, closer to its consumers
Andriy Gapon [Mon, 5 Feb 2018 14:19:36 +0000 (14:19 +0000)]
zfs: move a utility function, ioflags, closer to its consumers

No functional change.

MFC after: 1 week

6 years agoOn munlock(), unwire correct page.
Konstantin Belousov [Mon, 5 Feb 2018 12:49:20 +0000 (12:49 +0000)]
On munlock(), unwire correct page.

It is possible, for complex fork()/collapse situations, to have
sibling address spaces to partially share shadow chains. If one
sibling performs wiring, it can happen that a transient page, invalid
and busy, is installed into a shadow object which is visible to other
sibling for the duration of vm_fault_hold().  When the backing object
contains the valid page, and the wiring is performed on read-only
entry, the transient page is eventually removed.

But the sibling which observed the transient page might perform the
unwire, executing vm_object_unwire().  There, the first page found in
the shadow chain is considered as the page that was wired for the
mapping.  It is really the page below it which is wired.  So we unwire
the wrong page, either triggering the asserts of breaking the page'
wire counter.

As the fix, wait for the busy state to finish if we find such page
during unwire, and restart the shadow chain walk after the sleep.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D14184

6 years agoModify ip6_get_prevhdr() to be able use it safely.
Andrey V. Elsukov [Mon, 5 Feb 2018 09:22:07 +0000 (09:22 +0000)]
Modify ip6_get_prevhdr() to be able use it safely.

Instead of returning pointer to the previous header, return its offset.
In frag6_input() use m_copyback() and determined offset to store next
header instead of accessing to it by pointer and assuming that the memory
is contiguous.

In rip6_input() use offset returned by ip6_get_prevhdr() instead of
calculating it from pointers arithmetic, because IP header can belong
to another mbuf in the chain.

Reported by: Maxime Villard <max at m00nbsd dot net>
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14158

6 years ago[arswitch] Enable ATU dump support for the AR9340.
Adrian Chadd [Mon, 5 Feb 2018 07:05:28 +0000 (07:05 +0000)]
[arswitch] Enable ATU dump support for the AR9340.

This indeed uses the same registers as the AR8216 and later chips.

There seems to be an issue with ARP requests being sent out from the CPU
through this switch here, so figuring that out is next.  Learning works fine on
the AR8327 ethernet switch on the /other/ gigabit ethernet port, so I don't
think it's the network stack or ethernet driver.

Tested:

* DB120 - AR9340 SOC + ethernet switch (and other bits.)

6 years ago[arswitch] fix mac address field definition.
Adrian Chadd [Mon, 5 Feb 2018 07:03:45 +0000 (07:03 +0000)]
[arswitch] fix mac address field definition.

Whilst here, add some further fields for future experimenting.

Tested:

* AR9340 switch
* AR9330 switch
* AR7240 switch

6 years ago[arswitch] Break out of the loop upon any error, not just -1.
Adrian Chadd [Mon, 5 Feb 2018 05:51:37 +0000 (05:51 +0000)]
[arswitch] Break out of the loop upon any error, not just -1.

This fixes the AR9340 "unimplemented" thingy for now.

6 years ago[ar71xx] Fix DB120 AHB device hints in the new world order.
Adrian Chadd [Mon, 5 Feb 2018 04:48:41 +0000 (04:48 +0000)]
[ar71xx] Fix DB120 AHB device hints in the new world order.

This allows the on-chip (AHB bus) device to attach correctly as a module.

Tested:

* DB120, AR9344 (SoC + 2x2 2G wifi) + QCA9580 PCI 3x3 5G wifi

6 years ago[ar71xx] AR934x is a MIPS74k board - use the right hwpmc module
Adrian Chadd [Mon, 5 Feb 2018 04:47:13 +0000 (04:47 +0000)]
[ar71xx] AR934x is a MIPS74k board - use the right hwpmc module

6 years ago[ar71xx] New world order - don't reference ath_pci here, it's a module now
Adrian Chadd [Mon, 5 Feb 2018 04:46:36 +0000 (04:46 +0000)]
[ar71xx] New world order - don't reference ath_pci here, it's a module now

6 years agoFlesh out the creation of sparc64 UFS images. This has only been verified
Marius Strobl [Mon, 5 Feb 2018 00:18:21 +0000 (00:18 +0000)]
Flesh out the creation of sparc64 UFS images. This has only been verified
to yield working images in a native build as rootgen.sh generally doesn't
support cross-testing so far.

6 years agopsm(4): Fix panic occuring soon after PS/2 packet has been rejected by
Vladimir Kondratyev [Sun, 4 Feb 2018 23:01:48 +0000 (23:01 +0000)]
psm(4): Fix panic occuring soon after PS/2 packet has been rejected by
synaptics or elantech sanity checker.

After packet has been rejected contents of packet buffer is not cleared
with setting of inputbytes counter to 0. So when this packet buffer is
filled again being an element of circular queue, new data appends to old
data rather than overwrites it. This leads to packet buffer overflow
after 10 rounds.

Fix it with setting of packet's inputbytes counter to 0 after rejection.

While here add extra logging of rejected packets.

PR: 222667 (for reference)
Reported by: Neel Chauhan <neel@neelc.org>
Tested by: Neel Chauhan <neel@neelc.org>
MFC after: 1 week

6 years agoBump clang's __FreeBSD_cc_version, to cope with r328816, which removed
Dimitry Andric [Sun, 4 Feb 2018 20:33:47 +0000 (20:33 +0000)]
Bump clang's __FreeBSD_cc_version, to cope with r328816, which removed
-Wno-error=tautological-constant-compare again (this flag is now out of
-Wextra after upstream https://reviews.llvm.org/rL322901).  Otherwise
the MK_SYSTEM_COMPILER logic will not build a cross-tools compiler.

Reported by: jpaetzel, tuexen, Stefan Hagen

6 years agoOnly look for L2 cache controllers for mpc85xx_cache
Justin Hibbits [Sun, 4 Feb 2018 20:07:08 +0000 (20:07 +0000)]
Only look for L2 cache controllers for mpc85xx_cache

The L3 cache controller (Corenet Platform Cache) is listed with one of its
compatible strings as "cache", which this driver can't attach to.  Restrict
to a known list of primary cache controller strings, as found in the l2cache
devicetree binding.

6 years agoUpdate blacklist-helper to not emit messages from pf during operation.
Kurt Lidl [Sun, 4 Feb 2018 19:43:51 +0000 (19:43 +0000)]
Update blacklist-helper to not emit messages from pf during operation.

Use 'pfctl -k' when blocking a site to kill active tcp connections
from the blocked address.

Fix 'purge' operation for pf, which must dynamically determine which
filters have been created, so the filters can be flushed by name.

MFC after: 2 weeks

6 years agoSprinkle static; avoid nested externs.
Edward Tomasz Napierala [Sun, 4 Feb 2018 19:05:13 +0000 (19:05 +0000)]
Sprinkle static; avoid nested externs.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoAdd missing initializer.
Edward Tomasz Napierala [Sun, 4 Feb 2018 18:40:36 +0000 (18:40 +0000)]
Add missing initializer.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoRename getty's getline() to get_line(), to avoid clash with getline(3).
Edward Tomasz Napierala [Sun, 4 Feb 2018 18:39:58 +0000 (18:39 +0000)]
Rename getty's getline() to get_line(), to avoid clash with getline(3).

Obtained from: DragonFlyBSD
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoDon't cast away the const, it's not been needed since r92925.
Edward Tomasz Napierala [Sun, 4 Feb 2018 18:36:24 +0000 (18:36 +0000)]
Don't cast away the const, it's not been needed since r92925.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoRemove now-unused variable after r328809
Kyle Evans [Sun, 4 Feb 2018 17:31:50 +0000 (17:31 +0000)]
Remove now-unused variable after r328809

Fixed already in stable/11 by r328836 (emaste); remove now-unused variable.

6 years agoStart building modules for MPC85XX and MPC85XXSPE
Justin Hibbits [Sun, 4 Feb 2018 15:40:48 +0000 (15:40 +0000)]
Start building modules for MPC85XX and MPC85XXSPE

These kernels aren't restricted to development boards anymore, they are
closer in behavior to GENERIC, so build modules.

6 years agoAdd sdhci to MPC85XX build
Justin Hibbits [Sun, 4 Feb 2018 15:39:15 +0000 (15:39 +0000)]
Add sdhci to MPC85XX build

6 years agoMinimal changes for MPR to build on architectures with physical addresses larger...
Justin Hibbits [Sun, 4 Feb 2018 15:37:58 +0000 (15:37 +0000)]
Minimal changes for MPR to build on architectures with physical addresses larger than virtual

Summary:
Some architectures use large (36-bit) physical addresses, with smaller
virtual addresses.  Casting between vm_paddr_t (or bus_addr_t) and void * is
considered illegal, so cast through uintptr_t.  No functional change on existing
platforms.

Reviewed By: scottl
Differential Revision: https://reviews.freebsd.org/D14042

6 years agogeom: don't write stack garbage in disk labels
Alan Somers [Sun, 4 Feb 2018 14:49:55 +0000 (14:49 +0000)]
geom: don't write stack garbage in disk labels

Most consumers of g_metadata_store were passing in partially unallocated
memory, resulting in stack garbage being written to disk labels. Fix them by
zeroing the memory first.

gvirstor repeated the same mistake, but in the kernel.

Also, glabel's label contained a fixed-size string that wasn't
initialized to zero.

PR: 222077
Reported by: Maxim Khitrov <max@mxcrypt.com>
Reviewed by: cem
MFC after: 3 weeks
X-MFC-With: 323314
X-MFC-With: 323338
Differential Revision: https://reviews.freebsd.org/D14164

6 years agoCreate GENERIC64-NODEBUG for powerpc64
Steve Wills [Sun, 4 Feb 2018 14:27:12 +0000 (14:27 +0000)]
Create GENERIC64-NODEBUG for powerpc64

Approved by: jhibbits
Differential Revision: https://reviews.freebsd.org/D14192

6 years agoInitialize all the fields. This is one of the steps required to bump WARNS.
Edward Tomasz Napierala [Sun, 4 Feb 2018 13:58:31 +0000 (13:58 +0000)]
Initialize all the fields.  This is one of the steps required to bump WARNS.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoReduce code duplication; no functional changes.
Edward Tomasz Napierala [Sun, 4 Feb 2018 13:55:20 +0000 (13:55 +0000)]
Reduce code duplication; no functional changes.

Obtained from: NetBSD
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoRemove unused variable.
Edward Tomasz Napierala [Sun, 4 Feb 2018 13:54:05 +0000 (13:54 +0000)]
Remove unused variable.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoAdd the ThinkPad X1 (sandybridge) to the bsdinstall blacklist
Allan Jude [Sun, 4 Feb 2018 12:16:36 +0000 (12:16 +0000)]
Add the ThinkPad X1 (sandybridge) to the bsdinstall blacklist

MFC after: 2 weeks
Sponsored by: FOSDEM IllumOS Table

6 years ago[arswitch] fix up issues on the AR8327.
Adrian Chadd [Sun, 4 Feb 2018 08:22:11 +0000 (08:22 +0000)]
[arswitch] fix up issues on the AR8327.

This correctly dumps the ethernet bridge contents on an AR8327 switch.

Tested:

* AP135 - QCA9550 + AR8327 ethernet switch:

# etherswitchcfg atu dump
 [0] c0:3f:d5:7e:6f:45: portmask 0x00000004
 [1] f6:b6:03:96:1e:ba: portmask 0x00000004
 [2] 00:03:7f:11:38:4f: portmask 0x00000040
# arp -na
? (192.168.3.170) at 00:03:7f:11:38:4f on arge0 permanent [ethernet]
? (192.168.3.12) at c0:3f:d5:7e:6f:45 on arge0 expires in 1188 seconds [ethernet]
? (192.168.3.1) at f6:b6:03:96:1e:ba on arge0 expires in 1186 seconds [ethernet]

6 years agoFix regression introduced in r328806, preventing boot at least on all
Nathan Whitehorn [Sat, 3 Feb 2018 23:49:21 +0000 (23:49 +0000)]
Fix regression introduced in r328806, preventing boot at least on all
PowerPC Apple hardware, and likely all Open Firmware systems.

The loader would allocate memory for its heap at whatever address Open
Firmware gave it, which would in general be the lowest unallocated address,
usually starting a page or two above 0. As the kernel is linked at 1 MB,
and loader insists on running the kernel at its link address, any heap
larger than 1 MB would overlap the kernel, causing loader memory allocations
to corrupt the kernel and vice versa.

Although r328806 made this problem much worse by increasing the heap size
to 8 MB, causing 88% of the loader heap to overlap with the kernel, the
problem has always existed. The old heap size was 1 MB and, unless that
started exactly at zero, which would cause other problems, some number of
pages of the loader heap still overlapped with the kernel.

This patch solves the issue in two ways and cleans up some related code:
- Moves the loader heap inside of the loader. This guarantees that the
  heap will be contiguous with the loader and simplifies the heap
  allocation code at no cost, since the heap lives in BSS.
- Moves the loader, previously at 28 MB and dangerously close to the kernel
  it loads, a bit higher to 44 MB. This has the effect of breaking loader
  on non-embedded PPC machines with < 48 MB of RAM, but we did not support
  those anyway.

The fundamental problem is that the way loader loads ELF files is
incredibly fragile, but that can't be fixed without fundamental
architectural changes.

MFC after: 10 days

6 years agoo Let rtld(1) set up psABI user trap handlers prior to executing the
Marius Strobl [Sat, 3 Feb 2018 23:14:11 +0000 (23:14 +0000)]
o Let rtld(1) set up psABI user trap handlers prior to executing the
  objects' init functions instead of doing the setup via a constructor
  in libc as the init functions may already depend on these handlers
  to be in place. This gets us rid of:
  - the undefined order in which libc constructors as __guard_setup()
    and jemalloc_constructor() are executed WRT __sparc_utrap_setup(),
  - the requirement to link libc last so __sparc_utrap_setup() gets
    called prior to constructors in other libraries (see r122883).
  For static binaries, crt1.o still sets up the user trap handlers.
o Move misplaced prototypes for MD functions in to the MD prototype
  section of rtld.h.
o Sprinkle nitems().

6 years agoFix backward conditional.
Warner Losh [Sat, 3 Feb 2018 21:56:38 +0000 (21:56 +0000)]
Fix backward conditional.

Pointed out by: david boyer

6 years agonewsyslog: fix typeo for 'zstd'
Eitan Adler [Sat, 3 Feb 2018 20:53:21 +0000 (20:53 +0000)]
newsyslog: fix typeo for 'zstd'

Reported by: swildner@DragonFlyBSD.org
MFC After: 1 week

6 years agopthread: adding missing header to man page
Eitan Adler [Sat, 3 Feb 2018 20:50:46 +0000 (20:50 +0000)]
pthread: adding missing header to man page

Reported by: swildner@DragonFlyBSD.org

6 years agoAdd new USB ID.
Hans Petter Selasky [Sat, 3 Feb 2018 09:43:32 +0000 (09:43 +0000)]
Add new USB ID.

PR: 225641
Submitted by: Ryan <ryanwinter@outlook.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoAfter r328426, g_label depends on UFS (option FFS) code to read UFS
Xin LI [Sat, 3 Feb 2018 09:15:13 +0000 (09:15 +0000)]
After r328426, g_label depends on UFS (option FFS) code to read UFS
superblock, and the kernel will fail to link when UFS is not built
in.  This commit makes it depend on a small portion of FFS bits and
thereby fixes build for this situation.

This is intended as an interim bandaid, and the actual superblock
reading code should probably be made independent of UFS, so we do
not need to depend on it (see kib@'s comment in the review for
details), and we will revisit this once the superblock check hashes
are all in place.

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

6 years agoMake cross-endian loader changes apply only to powerpc
Ed Maste [Sat, 3 Feb 2018 01:23:48 +0000 (01:23 +0000)]
Make cross-endian loader changes apply only to powerpc

The cross-endian loader change in r328536 (review D12422) broke symbol
loading on (at least) amd64 kernels.  Temporarily paper over the issue
by restricting the cross-endian support to only powerpc, until a proper
fix arrives.

Submitted by: royger

6 years ago[arswitch] add initial functionality for AR8327 ATU management.
Adrian Chadd [Sat, 3 Feb 2018 00:59:08 +0000 (00:59 +0000)]
[arswitch] add initial functionality for AR8327 ATU management.

* Add the bulk of the ATU table read function
* Correct how the ATU function and WAIT bits work

TODO:

* more testing, figure out how the multi-vlan table stuff works and push that
  up to userspace

6 years agoCheck for cd9660 support before attempting to mount created images
Brooks Davis [Fri, 2 Feb 2018 23:34:33 +0000 (23:34 +0000)]
Check for cd9660 support before attempting to mount created images

This extends the set in r316028 to allow all tests to pass or be skipped
on a system without cd9660 support.

A better approach using tar is possible, but this works today.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10516