]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFV r361322:
Cy Schubert [Thu, 21 May 2020 21:00:46 +0000 (21:00 +0000)]
MFV r361322:

Update unbound 1.9.6 --> 1.10.1.

Bug Fixes:
 - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
   query into a large number of queries directed to a target.
 - CVE-2020-12663 Malformed answers from upstream name servers can be
   used to make Unbound unresponsive.

Reported by: emaste
MFC after: 3 days
Relnotes: yes
Security: CVE-2020-12662, CVE-2020-12663

4 years agolinuxkpi: Add rcu_work functions
Emmanuel Vadot [Thu, 21 May 2020 20:18:38 +0000 (20:18 +0000)]
linuxkpi: Add rcu_work functions

The rcu_work function helps to queue some work after waiting for a grace
period.
This is needed by DRM drivers.

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24942

4 years agoFix ACCEPT_FILTER_DEFINE to pass the version to MODULE_VERSION.
Mark Johnston [Thu, 21 May 2020 18:38:41 +0000 (18:38 +0000)]
Fix ACCEPT_FILTER_DEFINE to pass the version to MODULE_VERSION.

MFC with: r361263

4 years agoindent(1): add fallthrough markers
Piotr Pawel Stefaniak [Thu, 21 May 2020 17:34:31 +0000 (17:34 +0000)]
indent(1): add fallthrough markers

This silences -Wimplicit-fallthrough warnings.

Submitted by: Michael Paquier
Obtained from: postgresql.org
MFC after: 3 days

4 years ago[PowerPC] Fix kernel boot on powerpc
Brandon Bergren [Thu, 21 May 2020 15:53:16 +0000 (15:53 +0000)]
[PowerPC] Fix kernel boot on powerpc

Recent changes have caused the vmspace objects to start coming from KVA
instead of direct-mapped memory on powerpc. As far as I can tell, this is
not actually a problem, so we should stop arbitrarily asserting that it is.

I do not know why this was not being triggered before.

Approved by: jhibbits
Sponsored by: Tag1 Consulting, Inc.

4 years agols: fix WITHOUT_LS_COLORS build
Kyle Evans [Thu, 21 May 2020 15:15:50 +0000 (15:15 +0000)]
ls: fix WITHOUT_LS_COLORS build

*sigh* references to colorflags should be gated by COLORLS.

Pointy hat to: kevans
Reported by: jenkins (rescue build)
X-MFC-With: r361318

4 years agols(1): actually restore proper behavior
Kyle Evans [Thu, 21 May 2020 14:39:00 +0000 (14:39 +0000)]
ls(1): actually restore proper behavior

Highlights:
- CLICOLOR in the environment should imply --color=auto to maintain
  compatibility with historical behavior
- -G should set CLICOLOR and imply --color=auto

The manpage has been updated to draw the connection between -G and --color;
the former is in-fact a sort of compromise between --color=always and
--color=auto, where we'll output color regardless of the environment lacking
CLICOLOR/COLORTERM assuming stdout is a tty.

X-MFC-With: r361318

4 years agolibprocstat: fix reading of file descriptor table via kvm
Andriy Gapon [Thu, 21 May 2020 13:46:30 +0000 (13:46 +0000)]
libprocstat: fix reading of file descriptor table via kvm

This seems to have been broken since r247602 (from year 2013!).
Can be easily tested with
  fstat -N /boot/kernel/kernel -M /var/crash/vmcore.last

MFC after: 1 week
Sponsored by: Panzura

4 years agoBring in support for single core Zynq devices. Turns out that real
John-Mark Gurney [Thu, 21 May 2020 06:40:51 +0000 (06:40 +0000)]
Bring in support for single core Zynq devices.  Turns out that real
hardware, the registers appear like there's two cores, but the second
core does not work, so base the number of cores upon the chip id.

Tested on a XC7Z007S.

also, previous commit was suppose to be D14429.

Submitted by:   Thomas Skibo
Differential Revision:  https://reviews.freebsd.org/D14429

4 years agominor cleanup of white space, and function name in panic...
John-Mark Gurney [Thu, 21 May 2020 06:17:54 +0000 (06:17 +0000)]
minor cleanup of white space, and function name in panic...

This is a partial commit of the review.

Submitted by:   Thomas Skibo
Differential Revision:  https://reviews.freebsd.org/D23319
Reviewed by: andrew

4 years agoFor the case when RB_REMOVE requires a nontrivial search to find the
Doug Moore [Thu, 21 May 2020 05:34:02 +0000 (05:34 +0000)]
For the case when RB_REMOVE requires a nontrivial search to find the
node to replace the one being removed, restructure to first remove the
replacement node and correct the parent pointers around it, and then
let the all-cases code at the end deal with the parent of the deleted
node, making it point to the replacement node. This removes one or two
conditional branches.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D24845

4 years agoVendor import of Unbound 1.10.1.
Cy Schubert [Thu, 21 May 2020 05:01:52 +0000 (05:01 +0000)]
Vendor import of Unbound 1.10.1.

Security: CVE-2020-12662, CVE-2020-12663

4 years ago[ath] Hopefully recover better-er upon RX restart on AR9380.
Adrian Chadd [Thu, 21 May 2020 04:35:12 +0000 (04:35 +0000)]
[ath] Hopefully recover better-er upon RX restart on AR9380.

This is all very long-standing bug stuff that is touchy and still poorly
documented. Ok, here goes.

The basic bug:

* deleting a VAP causes the RX path (and TX path too) to be restarted
  without a full chip reset, which causes RX hangs on the AR9380 and later.
  (ie, the ones with the newer DMA engine.)

The basic fix:

* do an RX flush when stopping RX in ath_vap_delete() to match what happens
  when RX is stopped elsewhere.  This ensures any pending frames are completed
  and we restart at the right spot; it also ensures we don't push new RX buffers
  into the hardware if we're stopping receive.

The other issues I found:

* Don't bother checking the RX packet ring in the deferred read taskqueue;
  that's specifically supposed to be for completing frames rather than
  just yanking them off the receive ring.

* Cancel/drain any pending deferred read taskqueue.  This isn't done inside
  any locks so we should be super careful here.  This stops the hardware
  being reprogrammed at the same time in another thread/CPU whilst we're
  stopping RX.

* .. (yes, this should be better serialised, but that's for another day. maybe.)

* Add more debugging to trace what's going on here.

And the fun bit:

* Reinitialise the RX FIFO ONLY if we've been reset or stopped, rather than just
  reset.  I noticed that after all the above was done I was STILL seeing RXEOL.
  RXEOL isn't enabled on the AR9380 so I'd only see it if I was sending TX frames
  (ie a ping where it'd be transmitted but never received) so I was not being
  spammed by RXEOL.  So, as long as stuff is stopped, restart it.

This seems to be doing the right thing in both AP and STA modes.

What I should do next, if I ever get time:

* as I said above, serialise the receive stop/start to include taskqueues
* monitor RXEOL on the AR9380 and I keep seeing it spammed / lockups, just
  go do a full chip reset to get things back on track. It sucks, but it
  is better than nothing.

Tested:

* AR9380 AP/STA mode, adding/deleting a hostap VAP to trigger the TX/RX
  queue stop/start; whilst also running an iperf through it.  Lots of times.
  Lots.  Of.. Times.

4 years ago[ath] reset hardware if this particular mac bug is seen.
Adrian Chadd [Thu, 21 May 2020 04:26:20 +0000 (04:26 +0000)]
[ath] reset hardware if this particular mac bug is seen.

I have to dig into why I'm seeing it on chips as late as the AR9380 era
stuff (as it's marked as an AR5416 bug, but who knows!) but i'm seeing
aggregate TX frames complete with no blockack bit set.  So, everything
should be treated as a failure and do a hardware reset for good measure.

Tested:

* AR9380, STA mode
* AR9580 (5GHz), AP mode

4 years ago[ath_rate_sample] Obey the maximum frame length even when using static rates.
Adrian Chadd [Thu, 21 May 2020 03:53:45 +0000 (03:53 +0000)]
[ath_rate_sample] Obey the maximum frame length even when using static rates.

I wasn't enforcing the maximum packet length when using static rates
so although the driver was enforcing it itself OK, the statistics were
sometimes going into the wrong bin.

Tested:

* AR9380, STA mode

4 years agols: fix a --color regression from r337956
Kyle Evans [Thu, 21 May 2020 03:50:56 +0000 (03:50 +0000)]
ls: fix a --color regression from r337956

The regression is in-fact that I flipped the default from never to auto. The
incorrect impression was based on an alias that I failed to notice,
installed by the Linux distribution that I used for testing compatibility
here. Users that want the old default should be doing so with a shell alias
as is done elsewhere, rather than making this decision in ls(1).

Many thanks to rgrimes for pointing out the alias that I clearly overlooked
that resulted in this; if you despised colors in your terminal from this,
consider buying him a beer at the next venue that you see him at.

MFC after: 1 week
Relnotes: yes

4 years agopowerpc: Handle machine checks caused by D-ERAT multihit
Justin Hibbits [Thu, 21 May 2020 03:33:20 +0000 (03:33 +0000)]
powerpc: Handle machine checks caused by D-ERAT multihit

Instead of crashing the user process when a D-ERAT multihit is detected, try
to flush the ERAT, and continue.  This machine check indicates a likely PMAP
invalidation shortcoming that will need to be addressed, but it's
recoverable, so just recover.  The recovery is pmap-specific to flush the
ERAT, so add a pmap function to do so, currently only implemented by the
POWER9 radix pmap.

4 years agoDecode the file descriptor argument to closefrom(2) as an Integer.
Christian S.J. Peron [Thu, 21 May 2020 02:10:45 +0000 (02:10 +0000)]
Decode the file descriptor argument to closefrom(2) as an Integer.
This is consistent with what we are doing for close(2) and it makes
it a bit easier to follow when debugging file descriptor operations.
i.e. many other syscalls are decoding fds as integers rather than
base 16 numbers.

MFC after: 1 week

4 years agoDeduplicate fsid comparisons
Ryan Moeller [Thu, 21 May 2020 01:55:35 +0000 (01:55 +0000)]
Deduplicate fsid comparisons

Comparing fsid_t objects requires internal knowledge of the fsid structure
and yet this is duplicated across a number of places in the code.

Simplify by creating a fsidcmp function (macro).

Reviewed by: mjg, rmacklem
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D24749

4 years agoMerge bmake-20200517
Simon J. Gerraty [Wed, 20 May 2020 22:25:46 +0000 (22:25 +0000)]
Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
  plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
  a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
  earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
  patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
  returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
  filemon implementation.  filemon_dev.c uses the kernel module
  while filemon_ktrace.c leverages the fktrace api available in
  NetBSD.  filemon_ktrace.c can hopefully form the basis for
  adding support for other tracing mechanisms such as strace on
  Linux.
o meta.c: when target is out-of-date per normal make rules
  record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
  some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests

4 years agoFix libstand build breakage after r361298.
John Baldwin [Wed, 20 May 2020 22:25:41 +0000 (22:25 +0000)]
Fix libstand build breakage after r361298.

- Use enc_xform_aes_xts.setkey() directly instead of duplicating the code
  now that it no longer calls malloc().
- Rather than bringing back all of xform_userland.h, add a conditional
  #include of <stand.h> to xform_enc.h.
- Update calls to encrypt/decrypt callbacks in enc_xform_aes_xts for
  separate input/output pointers.

Pointy hat to: jhb

4 years agoChange the samantic of struct link_map l_addr member.
Konstantin Belousov [Wed, 20 May 2020 22:08:26 +0000 (22:08 +0000)]
Change the samantic of struct link_map l_addr member.

It previously returned the object map base address, while all other
ELF operating systems return load offset, i.e. the difference between
map base and the link base.

Explain the meaning of the field in the man page.

Stop filling the mips-only l_offs member, which is apparently unused.

PR: 246561
Requested by: Damjan Jovanovic <damjan.jov@gmail.com>
Reviewed by: emaste, jhb, cem (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24918

4 years agoamd64: Add a knob to flush RSB on context switches if machine has SMEP.
Konstantin Belousov [Wed, 20 May 2020 22:00:31 +0000 (22:00 +0000)]
amd64: Add a knob to flush RSB on context switches if machine has SMEP.

The flush is needed to prevent cross-process ret2spec, which is not handled
on kernel entry if IBPB is enabled but SMEP is present.
While there, add i386 RSB flush.

Reported by: Anthony Steinhauser <asteinhauser@google.com>
Reviewed by: markj, Anthony Steinhauser
Discussed with: philip
admbugs: 961
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoFix indentation in bsdinstall-created wpa_supplicant.conf
Devin Teske [Wed, 20 May 2020 21:39:19 +0000 (21:39 +0000)]
Fix indentation in bsdinstall-created wpa_supplicant.conf

PR: base/221982
Reported by: emaste
Reviewed by: emaste, allanjude
MFC after: 0 days
X-MFC-to: stable/11
Differential Revision: https://reviews.freebsd.org/D23641

4 years agoDo not consider CAP_RDCL_NO as an indicator for all MDS vulnerabilities
Konstantin Belousov [Wed, 20 May 2020 21:22:25 +0000 (21:22 +0000)]
Do not consider CAP_RDCL_NO as an indicator for all MDS vulnerabilities
handled by hardware.

Reported by: Anthony Steinhauser <asteinhauser@google.com>
admbugs: 962
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agoVarious cleanups to the software encryption transform interface.
John Baldwin [Wed, 20 May 2020 21:21:01 +0000 (21:21 +0000)]
Various cleanups to the software encryption transform interface.

- Consistently use 'void *' for key schedules / key contexts instead
  of a mix of 'caddr_t', 'uint8_t *', and 'void *'.

- Add a ctxsize member to enc_xform similar to what auth transforms use
  and require callers to malloc/zfree the context.  The setkey callback
  now supplies the caller-allocated context pointer and the zerokey
  callback is removed.  Callers now always use zfree() to ensure
  key contexts are zeroed.

- Consistently use C99 initializers for all statically-initialized
  instances of 'struct enc_xform'.

- Change the encrypt and decrypt functions to accept separate in and
  out buffer pointers.  Almost all of the backend crypto functions
  already supported separate input and output buffers and this makes
  it simpler to support separate buffers in OCF.

- Remove xform_userland.h shim to permit transforms to be compiled in
  userland.  Transforms no longer call malloc/free directly.

Reviewed by: cem (earlier version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D24855

4 years agoPrint CPU informtion later in boot.
John Baldwin [Wed, 20 May 2020 21:16:54 +0000 (21:16 +0000)]
Print CPU informtion later in boot.

Match other architectures and print CPU information during
cpu_startup().  In particular, this prints the information after the
message buffer is initialized which allows it to be retrieved after
boot via dmesg(8).

While here, add some extern declarations to <machine/md_var.h> in
place of duplicated declarations in various source files.

Reviewed by: brooks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24936

4 years agoSimplify hot-patching cpu_switch() for lack of UserLocal register.
John Baldwin [Wed, 20 May 2020 21:15:43 +0000 (21:15 +0000)]
Simplify hot-patching cpu_switch() for lack of UserLocal register.

Rather than walking all of cpu_switch looking for the sequence of
instructions to patch, add a global label at the location that needs
the patch applied.

Reviewed by: brooks, Alfredo Mazzinghi <alfredo.mazzinghi_cl.cam.ac.uk>
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24931

4 years agoloader: fix userboot's ability to detect a guest's interpreter
Kyle Evans [Wed, 20 May 2020 21:02:08 +0000 (21:02 +0000)]
loader: fix userboot's ability to detect a guest's interpreter

Some time after r338418, I believe with -Os/-Oz -ffunction-sections
-fdata-sections, the bootprog_interp variable that held our "$Interpreter:"
marker started getting strip from all loaders, with exception to userboot
since it used bootprog_interp to determine what flavor of userboot it was.

At some point, it had been brought to my attention that this was no longer
working and I had worked up some potential solutions to use the variable
that involved printing it out. My vague recollection is that this was
rejected, and I forgot to explore the alternatives; I cannot find records of
this discussion anymore.

Fast forward to present day, Andrew reported that it was non-functional and
offered (effectively) this patch (sans comment) to stop the compiler from
optimizing it out by assigning it to a volatile variable. This removes
concerns about user-facing change while retaining the interpreter marker.
Furthermore, it could certainly be uglier.

Reported and tested by: Andrew Gierth <andrew_tao173.riddles.org.uk>
MFC after: 3 days

4 years agoMFV r361280:
Martin Matuska [Wed, 20 May 2020 20:58:48 +0000 (20:58 +0000)]
MFV r361280:
Update libarchive to 3.4.3

Relevant vendor changes:
  PR #1352: support negative zstd compression levels
  PR #1359: improve zstd version checking
  PR #1348: support RHT.security.selinux from GNU tar
  PR #1357: support for archives compressed with pzstd
  PR #1367: fix issues in acl tests
  PR #1372: child handling cleanup
  PR #1378: fix memory leak from passphrase callback

4 years agoRemove copyinfrom() and copyinstrfrom().
John Baldwin [Wed, 20 May 2020 20:58:17 +0000 (20:58 +0000)]
Remove copyinfrom() and copyinstrfrom().

These functions were added in 2001 and are currently unused.
copyinfrom() looks to have never been used.  copyinstrfrom() was used
for two weeks before the code was refactored to remove it's sole use.

Reviewed by: brooks, kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24928

4 years agovt: fix duplicate keymap descriptions
Ed Maste [Wed, 20 May 2020 20:24:37 +0000 (20:24 +0000)]
vt: fix duplicate keymap descriptions

PR: 246495
Submitted by: Jorge Maidana
MFC after: 1 week

4 years agoMerge freebsd32_exec_setregs() into exec_setregs() on MIPS.
John Baldwin [Wed, 20 May 2020 19:51:39 +0000 (19:51 +0000)]
Merge freebsd32_exec_setregs() into exec_setregs() on MIPS.

The stack pointer was being decremented by 64k twice previously.

Reviewed by: brooks
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24930

4 years agopkgbase: use -dev,-dbg instead of -development,-debug
Ed Maste [Wed, 20 May 2020 19:45:22 +0000 (19:45 +0000)]
pkgbase: use -dev,-dbg instead of -development,-debug

-development is long and awkward, and is also inconsistent with prior art
from the Linux world, which uses -dev (Debian) or -devel (Red Hat).  Follow
the Debian convention, and similarly for debug info packages.

Also remove redundant pkgbase development tag from includes.  We already tag
include files with package=runtime,dev; there is no need to separately tag
them as dev.

Discussed with: bapt
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24139

4 years agoImport bmake-20200517
Simon J. Gerraty [Wed, 20 May 2020 19:34:48 +0000 (19:34 +0000)]
Import bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
  plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
  a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
  earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
  patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
  returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
  filemon implementation.  filemon_dev.c uses the kernel module
  while filemon_ktrace.c leverages the fktrace api available in
  NetBSD.  filemon_ktrace.c can hopefully form the basis for
  adding support for other tracing mechanisms such as strace on
  Linux.
o meta.c: when target is out-of-date per normal make rules
  record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
  some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests

4 years agoDon't block on the range lock in zfs_getpages().
Mark Johnston [Wed, 20 May 2020 18:29:23 +0000 (18:29 +0000)]
Don't block on the range lock in zfs_getpages().

After r358443 the vnode object lock no longer synchronizes concurrent
zfs_getpages() and zfs_write() (which must update vnode pages to
maintain coherence).  This created a potential deadlock between ZFS
range locks and VM page busy locks: a fault on a mapped file will cause
the fault page to be busied, after which zfs_getpages() locks a range
around the file offset in order to map adjacent, resident pages;
zfs_write() locks the range first, and then must busy vnode pages when
synchronizing.

Solve this by adding a non-blocking mode for ZFS range locks, and using
it in zfs_getpages().  If zfs_getpages() fails to acquire the range
lock, only the fault page will be populated.

Reported by: bdrewery
Reviewed by: avg
Tested by: pho
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24839

4 years agoAvoid hard-coding pipe buffer sizes in the pipe and fifo kqueue tests.
Mark Johnston [Wed, 20 May 2020 17:48:18 +0000 (17:48 +0000)]
Avoid hard-coding pipe buffer sizes in the pipe and fifo kqueue tests.

Fix some style issues in the modified tests while here.

Reported by: Jenkins via lwhsu
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agovmm(4): Add 12 user ABI compat after r349948
Conrad Meyer [Wed, 20 May 2020 17:27:54 +0000 (17:27 +0000)]
vmm(4): Add 12 user ABI compat after r349948

Reported by: kp
Reviewed by: jhb, kp
Tested by: kp
Differential Revision: https://reviews.freebsd.org/D24929

4 years agosrc.conf.5: regen after r361282, GNU_DIFF knob descriptions
Ed Maste [Wed, 20 May 2020 17:27:22 +0000 (17:27 +0000)]
src.conf.5: regen after r361282, GNU_DIFF knob descriptions

4 years agoUpdate GNU_DIFF knob descriptions
Ed Maste [Wed, 20 May 2020 17:20:48 +0000 (17:20 +0000)]
Update GNU_DIFF knob descriptions

After r317209 the WITH_/WITHOUT_GNU_DIFF knob controls only diff3;
diff is always BSD diff.

MFC after: 1 week

4 years agoUpdate vendor/libarchive/dist to git fc6563f5130d8a7ee1fc27c0e55baef35119f26c
Martin Matuska [Wed, 20 May 2020 16:13:02 +0000 (16:13 +0000)]
Update vendor/libarchive/dist to git fc6563f5130d8a7ee1fc27c0e55baef35119f26c

Libarchive 3.4.3

Relevant vendor changes:
  PR #1352: support negative zstd compression levels
  PR #1359: improve zstd version checking
  PR #1348: support RHT.security.selinux from GNU tar
  PR #1357: support for archives compressed with pzstd
  PR #1367: fix issues in acl tests
  PR #1372: child handling cleanup
  PR #1378: fix memory leak from passphrase callback

4 years agobnxt: isc_nrxd_max and isc_ntxd_max must be powers of two
Kristof Provost [Wed, 20 May 2020 16:07:37 +0000 (16:07 +0000)]
bnxt: isc_nrxd_max and isc_ntxd_max must be powers of two

Reviewed by: gallatin, rpokala
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24922

4 years agoFix i386 build for r361275
Li-Wen Hsu [Wed, 20 May 2020 13:51:27 +0000 (13:51 +0000)]
Fix i386 build for r361275

kponsored by: The FreeBSD Foundation

4 years agomlx5_core: add more port module event types to decode.
Konstantin Belousov [Wed, 20 May 2020 11:20:45 +0000 (11:20 +0000)]
mlx5_core: add more port module event types to decode.

Reviewed by: hselasky
Sponsored by: Mellanox Technologies
MFC after: 3 days

4 years agomlx5_core: add "PMD type not enabled" port module event type.
Konstantin Belousov [Wed, 20 May 2020 11:10:10 +0000 (11:10 +0000)]
mlx5_core: add "PMD type not enabled" port module event type.

Reviewed by: hselasky
Sponsored by: Mellanox Technologies
MFC after: 3 days

4 years agoHyperV socket implementation for FreeBSD
Wei Hu [Wed, 20 May 2020 11:03:59 +0000 (11:03 +0000)]
HyperV socket implementation for FreeBSD

This change adds Hyper-V socket feature in FreeBSD. New socket address
family AF_HYPERV and its kernel support are added.

Submitted by: Wei Hu <weh@microsoft.com>
Reviewed by: Dexuan Cui <decui@microsoft.com>
Relnotes: yes
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D24061

4 years agodev/xenstore: fix return with locks held
Roger Pau Monné [Wed, 20 May 2020 11:01:10 +0000 (11:01 +0000)]
dev/xenstore: fix return with locks held

Fix returning from xenstore device with locks held, which triggers the
following panic:

# cat /dev/xen/xenstore
^C
userret: returning with the following locks held:
exclusive sx evtchn_ringc_sx (evtchn_ringc_sx) r = 0 (0xfffff8000650be40) locked @ /usr/src/sys/dev/xen/evtchn/evtchn_dev.c:262

Note this is not a security issue since access to the device is
limited to root by default.

Sponsored by: Citrix Systems R&D
MFC after: 1 week

4 years agoiwm: improve rfkill handling
Andriy Gapon [Wed, 20 May 2020 08:15:09 +0000 (08:15 +0000)]
iwm: improve rfkill handling

Previously the driver handled the bit within itself, but did not expose
the state change to net80211 and interface layers.
This change uses net80211 KPI for rfkill signaling.
The code is modeled after similar code in iwn and wpi.

Reviewed by: adrian
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24923

4 years agoSilence the once per second CTRL-EVENT-SCAN-FAILED errors when the WiFi
Cy Schubert [Wed, 20 May 2020 04:16:13 +0000 (04:16 +0000)]
Silence the once per second CTRL-EVENT-SCAN-FAILED errors when the WiFi
radio is disabled through the communication device toggle key (also known
as the RF raidio kill button). Only the CTRL-EVENT-DISCONNECTED will be
issued.

Submitted by: avg
Reported by: avg
MFC after: 1 week

4 years agopowerpc/radix mmu: No need for delayed TLB invalidation
Justin Hibbits [Wed, 20 May 2020 02:33:41 +0000 (02:33 +0000)]
powerpc/radix mmu: No need for delayed TLB invalidation

x86 needs delayed TLB invalidation because invalidation requires an
expensive IPI.  PowerPC has had a TLB invalidation instruction since the
POWER1 in 1990, so there's no need to delay anything.

4 years agoMake sys.net.if_bridge_test depend on python; sys.net.if_bridge_test.span
Edward Tomasz Napierala [Tue, 19 May 2020 21:55:29 +0000 (21:55 +0000)]
Make sys.net.if_bridge_test depend on python; sys.net.if_bridge_test.span
requires it.

MFC after: 2 weeks
Sponsored by: DARPA

4 years agoMake sys.netinet.output and sys.netinet6.output6 tests depend on python;
Edward Tomasz Napierala [Tue, 19 May 2020 21:48:45 +0000 (21:48 +0000)]
Make sys.netinet.output and sys.netinet6.output6 tests depend on python;
they need to be able to run net_receiver.py.

MFC after: 2 weeks
Sponsored by: DARPA

4 years agolz4 hash table does not start zeroed
Toomas Soome [Tue, 19 May 2020 19:53:12 +0000 (19:53 +0000)]
lz4 hash table does not start zeroed

illumos issue: https://www.illumos.org/issues/12757

Submitted by: andyf

4 years agoMention new jail(8) command hooks in RELNOTES
Ryan Moeller [Tue, 19 May 2020 18:41:46 +0000 (18:41 +0000)]
Mention new jail(8) command hooks in RELNOTES

Reported by: 0mp
Approved by: mmacy (mentor)

4 years agoMention new dd flags in RELNOTES
Ryan Moeller [Tue, 19 May 2020 18:38:46 +0000 (18:38 +0000)]
Mention new dd flags in RELNOTES

Approved by: mmacy (mentor)
Sponsored by: iXsystems, Inc.

4 years agoDefine a module version for accept filter modules.
Mark Johnston [Tue, 19 May 2020 18:35:08 +0000 (18:35 +0000)]
Define a module version for accept filter modules.

Otherwise accept filters compiled into the kernel do not preempt
preloaded accept filter modules.  Then, the preloaded file registers its
accept filter module before the kernel, and the kernel's attempt fails
since duplicate accept filter list entries are not permitted.  This
causes the preloaded file's module to be released, since
module_register_init() does a lookup by name, so the preloaded file is
unloaded, and the accept filter's callback points to random memory since
preload_delete_name() unmaps the file on x86 as of r336505.

Add a new ACCEPT_FILTER_DEFINE macro which wraps the accept filter and
module definitions, and ensures that a module version is defined.

PR: 245870
Reported by: Thomas von Dein <freebsd@daemon.de>
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

4 years agoUse the symbolic name for "modmetadata_set".
Mark Johnston [Tue, 19 May 2020 18:34:50 +0000 (18:34 +0000)]
Use the symbolic name for "modmetadata_set".

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agocxgbe/iw_cxgbe: Add an async callback to notify iw_cxgbe in case of a
Navdeep Parhar [Tue, 19 May 2020 16:28:20 +0000 (16:28 +0000)]
cxgbe/iw_cxgbe: Add an async callback to notify iw_cxgbe in case of a
fatal error.

Submitted by: Krishnamraju Eraparaju @ Chelsio
MFC after: 2 weeks
Sponsored by: Chelsio Communications

4 years agoUpdate leap-seconds to leap-seconds.3676924800.
Xin LI [Tue, 19 May 2020 16:06:03 +0000 (16:06 +0000)]
Update leap-seconds to leap-seconds.3676924800.

Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after: 3 days

4 years agoStop performing a full icache sync when the DIC and IDC flags are set
Andrew Turner [Tue, 19 May 2020 16:04:27 +0000 (16:04 +0000)]
Stop performing a full icache sync when the DIC and IDC flags are set

The DIC and IDC bits in the CTR_EL0 register signal to the kernel when it
can relax the instruction cache synchronisation operations. The IDC bit
means we can relax cleaning the data cache to the point of unification
while the DIC bit means we don't need to invalidate the instruction cache
for data coherence. In both cases an appropriate barrier is still needed.

For now only implement the case where both bits are set, as is the case
on the Neoverse-N1 as used in the Amazon AWS Graviton 2 CPU. Note that
this behaviour is a optional on the N1 so we may later need to implement
only one or the other bit being set.

There is a tunable to disable each flag on boot.

Testing on a 4 core Graviton 2 instance found a significant improvement
in sys and real time when running "make buildkernel -j4", with no
significant difference in user time.

Reviewed by: markj
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D24853

4 years agoCreate MSI/MSI-X isrcs as needed in the GICv3 ITS driver
Andrew Turner [Tue, 19 May 2020 15:27:20 +0000 (15:27 +0000)]
Create MSI/MSI-X isrcs as needed in the GICv3 ITS driver

Previously we would create an isrc for each MSI/MSI-X interrupt. This
causes issues for other interrupt sources in the system, e.g. a GPIO
driver, as they may be unable to allocate interrupts. This works around
this by allocating the isrc only when needed.

Reported by: alisaidi@amazon.com
Reviewed by: mmel
Sponsored by: Innovaate UK
Differential Revision: https://reviews.freebsd.org/D24876

4 years agobsdinstall: do a `certctl rehash` upon installation of configuration
Kyle Evans [Tue, 19 May 2020 15:19:39 +0000 (15:19 +0000)]
bsdinstall: do a `certctl rehash` upon installation of configuration

If certctl is installed on the system we're configuring, do a certctl
rehash.

Note that certctl may not be present if the world we've installed was built
either WITHOUT_OPENSSL or WITHOUT_CAROOT. In this scenario, we don't
currently see if the host has a certctl as this may be an indication that
the system *shouldn't* have certs installed into /etc/ssl.

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

4 years agoFix Typo in ng_hci_le_connection_complete_ep struct.
Takanori Watanabe [Tue, 19 May 2020 13:58:52 +0000 (13:58 +0000)]
Fix Typo in ng_hci_le_connection_complete_ep struct.

PR: 246538
Submitted by: Marc Veldman

4 years agoBelatedly add a RELNOTES entry for r347532.
Mark Johnston [Tue, 19 May 2020 13:54:33 +0000 (13:54 +0000)]
Belatedly add a RELNOTES entry for r347532.

4 years agoAdd LE Whitelist commands to hccontrol
Takanori Watanabe [Tue, 19 May 2020 13:44:32 +0000 (13:44 +0000)]
Add LE Whitelist commands to hccontrol

PR: 214555
Submitted by Marc Veldman

4 years agoThe -F flag of swapon(8) requires -a to work.
Benedict Reuschling [Tue, 19 May 2020 12:16:44 +0000 (12:16 +0000)]
The -F flag of swapon(8) requires -a to work.

Before this change, swapon(8) implied that -F works as a standalone option,
which is not the case and would produce a usage message. This change extends
the description of the -F option to mention that -a is required with it.

PR: 238551
Submitted by: Christian Baltini
MFC after: 5 days

4 years agoFix a typo: argments -> arguments
Benedict Reuschling [Tue, 19 May 2020 11:05:27 +0000 (11:05 +0000)]
Fix a typo: argments -> arguments

PR: 243294
Submitted by: Igor Ostapenko
MFC after: 5 days

4 years agoUpdate SYNOPSIS section to be consistent regarding -u, -i, and -I.
Benedict Reuschling [Tue, 19 May 2020 09:17:20 +0000 (09:17 +0000)]
Update SYNOPSIS section to be consistent regarding -u, -i, and -I.

Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.

With the updated SYNOPSIS, it is now allowed (and consistent) to run:

sed -i BAK s/foo/bar/g some_file

PR: 240556
Submitted by: Oliver Fromme
MFC after: 5 days

4 years agolinuxkpi: Add irq_work.h
Emmanuel Vadot [Tue, 19 May 2020 09:04:35 +0000 (09:04 +0000)]
linuxkpi: Add irq_work.h

Since handlers are call in a thread context we can simply use a workqueue
to emulate those functions.
The DRM code was patched to do that already, having it in linuxkpi allows us
to not patch the upstream code.

Sponsored-by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D24859

4 years agolinuxkpi: add pci_dev_present
Emmanuel Vadot [Tue, 19 May 2020 08:44:33 +0000 (08:44 +0000)]
linuxkpi: add pci_dev_present

pci_dev_present shows if a set of pci ids are present in the system.
It just wraps pci_find_device.
Needed by DRMv5.2

Submitted by: Austing Shafer (ashafer@badland.io)
Differential Revision: https://reviews.freebsd.org/D24796

4 years agolinuxkpi: Add __init_waitqueue_head
Emmanuel Vadot [Tue, 19 May 2020 08:43:17 +0000 (08:43 +0000)]
linuxkpi: Add __init_waitqueue_head

The only difference with init_waitqueue_head is that the name and the
lock class key are provided but we don't use those so use init_waitqueue_head
directly.

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

4 years agoReplace snprintf() by SCTP_SNPRINTF() and let SCTP_SNPRINTF() map
Michael Tuexen [Tue, 19 May 2020 07:23:35 +0000 (07:23 +0000)]
Replace snprintf() by SCTP_SNPRINTF() and let SCTP_SNPRINTF() map
to snprintf() on FreeBSD. This allows to check for failures of snprintf()
on platforms other than FreeBSD kernel.

4 years agoRevert r361209:
Michael Tuexen [Tue, 19 May 2020 07:21:11 +0000 (07:21 +0000)]
Revert r361209:

cem noted that on FreeBSD snprintf() can not fail and code should not
check for that.

A followup commit will replace the usage of snprintf() in the SCTP
sources with a variadic macro SCTP_SNPRINTF, which will simply map to
snprintf() on FreeBSD and do a checking similar to r361209 on
other platforms.

4 years agoRevert r361237, it's fixed by r361231
Li-Wen Hsu [Tue, 19 May 2020 07:16:09 +0000 (07:16 +0000)]
Revert r361237, it's fixed by r361231

PR: 246560
Sponsored by: The FreeBSD Foundation

4 years agoBelated RELNOTES entry for r361238
Kyle Evans [Tue, 19 May 2020 03:19:01 +0000 (03:19 +0000)]
Belated RELNOTES entry for r361238

This may get revised later if the larger change lands, but we should note
this.

4 years agozfs: reject read(2) of a dirfd with EISDIR
Kyle Evans [Tue, 19 May 2020 02:41:05 +0000 (02:41 +0000)]
zfs: reject read(2) of a dirfd with EISDIR

This is independent of the recently-discussed global change, which is still
in review/discussion stage.

This is effectively a measure for consistency in the ZFS world, where
FreeBSD was the only platform (as far as I could find) that allowed this.
What ZFS exposes is decidedly not useful for any real purposes, to
paraphrase (hopefully faithfully) jhb's findings when exploring this:

The size of a directory in ZFS is the number of directory entries within.
When reading a directory, you would instead get the leading part of its raw
contents; the amount you get being dictated by the "size," i.e. number of
directory entries. There's decidedly (luckily) no stack disclosure happening
here, though the behavior is bizarre and almost certainly a historical
accident.

This change has already been upstreamed to OpenZFS.

MFC after: 1 week

4 years agoTemporarily disable test case causes kernel panic in CI:
Li-Wen Hsu [Tue, 19 May 2020 02:07:08 +0000 (02:07 +0000)]
Temporarily disable test case causes kernel panic in CI:

- sys.netinet.so_reuseport_lb_test.basic_ipv6

PR: 246560
Sponsored by: The FreeBSD Foundation

4 years agopowerpc/mmu: Don't use the cache instructions to zero pages
Justin Hibbits [Tue, 19 May 2020 01:06:31 +0000 (01:06 +0000)]
powerpc/mmu: Don't use the cache instructions to zero pages

A page (even physmem) can be marked as cache-inhibited.  Attempting to use
'dcbz' to zero a page mapped cache-inhibited triggers an alignment
exception, which is fatal in kernel.  This was seen when testing hardware
acceleration with X on POWER9.

At some point in the future, this should be changed to a more straight
forward zero loop instead of bzero(), and a similar change be made to the
other pmaps.

Reported by: pkubaj@

4 years agoFix NULL-pointer bug from r361228.
Mike Karels [Tue, 19 May 2020 01:05:13 +0000 (01:05 +0000)]
Fix NULL-pointer bug from r361228.

Note that in_pcb_lport and in_pcb_lport_dest can be called with a NULL
local address for IPv6 sockets; handle it.  Found by syzkaller.

Reported by: cem
MFC after: 1 month

4 years agoblacklistd.conf.5: typo/grammar fixes
Ed Maste [Tue, 19 May 2020 00:15:19 +0000 (00:15 +0000)]
blacklistd.conf.5: typo/grammar fixes

PR: 246467
Submitted by: Mike Lempriere

4 years agoRevert 357780, `dtrace -c` has been fixed in head`
Li-Wen Hsu [Mon, 18 May 2020 23:43:48 +0000 (23:43 +0000)]
Revert 357780, `dtrace -c` has been fixed in head`

PR: 244053
Sponsored by: The FreeBSD Foundation

4 years agoAllow TCP to reuse local port with different destinations
Mike Karels [Mon, 18 May 2020 22:53:12 +0000 (22:53 +0000)]
Allow TCP to reuse local port with different destinations

Previously, tcp_connect() would bind a local port before connecting,
forcing the local port to be unique across all outgoing TCP connections
for the address family. Instead, choose a local port after selecting
the destination and the local address, requiring only that the tuple
is unique and does not match a wildcard binding.

Reviewed by: tuexen (rscheff, rrs previous version)
MFC after: 1 month
Sponsored by: Forcepoint LLC
Differential Revision: https://reviews.freebsd.org/D24781

4 years agoRemove assignment without effect.
Michael Tuexen [Mon, 18 May 2020 19:48:38 +0000 (19:48 +0000)]
Remove assignment without effect.

MFC after: 3 days

4 years agoDon't check an unsigned variable for being negative.
Michael Tuexen [Mon, 18 May 2020 19:35:46 +0000 (19:35 +0000)]
Don't check an unsigned variable for being negative.

MFC after: 3 days.

4 years agoRemove redundant assignment.
Michael Tuexen [Mon, 18 May 2020 19:23:01 +0000 (19:23 +0000)]
Remove redundant assignment.

MFC after: 3 days

4 years agoCleanup, no functional change intended.
Michael Tuexen [Mon, 18 May 2020 18:42:43 +0000 (18:42 +0000)]
Cleanup, no functional change intended.

MFC after: 3 days

4 years agofusefs: fix intermittency in some ENOENT tests
Alan Somers [Mon, 18 May 2020 18:36:32 +0000 (18:36 +0000)]
fusefs: fix intermittency in some ENOENT tests

When a FUSE operation other than LOOKUP returns ENOENT, the kernel will
reclaim that vnode, resuling in a FUSE_FORGET being sent a short while
later.  Many of the ENOENT tests weren't expecting those FUSE_FORGET
operations.  They usually passed by luck since FUSE_FORGET is often delayed.
This commit adds appropriate expectations.

MFC after: 2 weeks

4 years agoAvoid an integer underflow.
Michael Tuexen [Mon, 18 May 2020 18:32:58 +0000 (18:32 +0000)]
Avoid an integer underflow.

MFC after: 3 days

4 years agoRemove redundant check.
Michael Tuexen [Mon, 18 May 2020 18:27:10 +0000 (18:27 +0000)]
Remove redundant check.

MFC after: 3 days

4 years agoCorrect the order of arguments to copyin() for Q_SETQUOTA.
John Baldwin [Mon, 18 May 2020 16:47:44 +0000 (16:47 +0000)]
Correct the order of arguments to copyin() for Q_SETQUOTA.

MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24656

4 years agoGNU as: move deprecation message after option parsing
Ed Maste [Mon, 18 May 2020 16:07:14 +0000 (16:07 +0000)]
GNU as: move deprecation message after option parsing

Some cmake test parses the output of the first line of as --version, and
emits an error if it does not contain some expected strings:

Checking whether the ASM compiler is GNU using "--version" did not match
"(GNU assembler)|(GCC)|(Free Software Foundation)"

Emit the deprecation message later, after parsing argv and thus --version.

PR: 246540
Reported by: dch
Sponsored by: The FreeBSD Foundation

4 years agoAllow the FACS and XFACS to be zero in acpidump.
Andrew Turner [Mon, 18 May 2020 15:05:59 +0000 (15:05 +0000)]
Allow the FACS and XFACS to be zero in acpidump.

These are allowed to be zero when the hardware reduced APCI flag is set

Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D23207

4 years agobhyve(8): Add the netgraph network backend decription to the manpage.
Aleksandr Fedorov [Mon, 18 May 2020 15:03:52 +0000 (15:03 +0000)]
bhyve(8): Add the netgraph network backend decription to the manpage.

Reviewed by: vmaffione, bcr
Approved by: vmaffione (mentor)
Sponsored by: vstack.com
Differential Revision: https://reviews.freebsd.org/D24846

4 years agoFix logical condition by looking at usecs.
Michael Tuexen [Mon, 18 May 2020 15:02:15 +0000 (15:02 +0000)]
Fix logical condition by looking at usecs.

This issue was found by cpp-check running on the userland stack.

MFC after: 3 days

4 years agoWhitespace change.
Michael Tuexen [Mon, 18 May 2020 15:00:18 +0000 (15:00 +0000)]
Whitespace change.

MFC after: 3 days

4 years agoTemporarily disable failing case in CI of amd64:
Li-Wen Hsu [Mon, 18 May 2020 12:36:28 +0000 (12:36 +0000)]
Temporarily disable failing case in CI of amd64:

- lib.libexecinfo.backtrace_test.backtrace_fmt_basic

PR: 246537
Sponsored by: The FreeBSD Foundation

4 years agoHandle failures of snprintf().
Michael Tuexen [Mon, 18 May 2020 10:07:01 +0000 (10:07 +0000)]
Handle failures of snprintf().

MFC after: 3 days

4 years agoAdd ebsnvme-id to EC2 AMIs and enable /dev/aws/disk
Colin Percival [Mon, 18 May 2020 02:14:25 +0000 (02:14 +0000)]
Add ebsnvme-id to EC2 AMIs and enable /dev/aws/disk

The ebsnvme-id utility exposes information about EC2 disks -- for
Elastic Block Store volumes, their volume IDs and "linux device
names", and for Instance Store (aka "Ephemeral") disks, their
serial numbers.

The dev_aws_disk rc.d script and associated devd.conf rule maintains
a tree under /dev/aws/disk:
/dev/aws/disk/ebs/<volume ID>
/dev/aws/disk/linuxname/<linux device name>
/dev/aws/disk/ephemeral/<serial number>
which are symlinks to the corresponding nda or nvd devices.

MFC after: 1 week
Sponsored by: https://www.patreon.com/cperciva

4 years agoRevert r360833, r360882: certctl rehash in installworld
Kyle Evans [Mon, 18 May 2020 01:48:55 +0000 (01:48 +0000)]
Revert r360833, r360882: certctl rehash in installworld

This was solving the correct-ish problem in the wrong place. Noted by
brooks; while he didn't request a prompt revert, doing so now will
facilitate proper testing for the revised version of this.

4 years agocertctl: don't fall over flat with relative DESTDIR
Kyle Evans [Mon, 18 May 2020 01:35:44 +0000 (01:35 +0000)]
certctl: don't fall over flat with relative DESTDIR

Up until now, all of our DESTDIR use has been with absolute paths. It turned
out that the cd in/out dance we do here breaks us down later on, as the
relative path no longer resolves.

Convert EXTENSIONS to an ERE that we'll use to grep ls -1 of the dir we're
inspecting, rather than cd'ing into it and globbing it up.

MFC after: 3 days