]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoFix compilation of libsysdecode after r365522, should have been part of it.
kib [Wed, 9 Sep 2020 22:18:44 +0000 (22:18 +0000)]
Fix compilation of libsysdecode after r365522, should have been part of it.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoSupport for userspace non-transparent superpages (largepages).
kib [Wed, 9 Sep 2020 22:12:51 +0000 (22:12 +0000)]
Support for userspace non-transparent superpages (largepages).

Created with shm_open2(SHM_LARGEPAGE) and then configured with
FIOSSHMLPGCNF ioctl, largepages posix shared memory objects guarantee
that all userspace mappings of it are served by superpage non-managed
mappings.

Only amd64 for now, both 2M and 1G superpages can be requested, the
later requires CPU feature.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoUpdate nexthop handling for route addition/deletion in preparation for mpath.
melifaro [Wed, 9 Sep 2020 22:07:54 +0000 (22:07 +0000)]
Update nexthop handling for route addition/deletion in preparation for mpath.

Currently kernel requests deletion for the certain routes with specified gateway,
 but this gateway is not actually checked. With multipath routes, internal gateway
 checking becomes mandatory. Add the logic performing this check.

Generalise RTF_PINNED routes to the generic route priorities, simplifying the logic.

Add lookup_prefix() function to perform exact match search based on data in @info.

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

3 years agovm_map: Add a map entry kind that can only be clipped at specific boundary.
kib [Wed, 9 Sep 2020 22:02:30 +0000 (22:02 +0000)]
vm_map: Add a map entry kind that can only be clipped at specific boundary.

The entries and their clip boundaries must be aligned on supported
superpages sizes from pagesizes[].  vm_map operations return Mach
error KERN_INVALID_ARGUMENT, which is usually translated to EINVAL, if
it would require clip not at the boundary.

In other words, entries force preserving virtual addresses superpage
properties.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoAdd pmap_enter(9) PMAP_ENTER_LARGEPAGE flag and implement it on amd64.
kib [Wed, 9 Sep 2020 21:50:24 +0000 (21:50 +0000)]
Add pmap_enter(9) PMAP_ENTER_LARGEPAGE flag and implement it on amd64.

The flag requests entry of non-managed superpage mapping of size
pagesizes[psind] into the page table.

Pmap supports fake wiring of the largepage mappings.  Only attributes
of the largepage mapping can be changed by calling pmap_enter(9) over
existing mapping, physical address of the page must be unchanged.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoRetain marking net.fibs sysctl as a tunable.
melifaro [Wed, 9 Sep 2020 21:45:18 +0000 (21:45 +0000)]
Retain marking net.fibs sysctl as a tunable.

Suggested by: avg

3 years agoAdd vm_map_find_aligned(9).
kib [Wed, 9 Sep 2020 21:44:59 +0000 (21:44 +0000)]
Add vm_map_find_aligned(9).

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoMove MAP_32BIT_MAX_ADDR definition to sys/mman.h.
kib [Wed, 9 Sep 2020 21:39:06 +0000 (21:39 +0000)]
Move MAP_32BIT_MAX_ADDR definition to sys/mman.h.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoFix assert.
kib [Wed, 9 Sep 2020 21:35:44 +0000 (21:35 +0000)]
Fix assert.

Noted by: alc
MFC after: 1 week

3 years agoPrepare to handle non-trivial errors from vm_map_delete().
kib [Wed, 9 Sep 2020 21:34:31 +0000 (21:34 +0000)]
Prepare to handle non-trivial errors from vm_map_delete().

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoamd64 pmap: teach functions walking user page tables about PG_PS bit in PDPE.
kib [Wed, 9 Sep 2020 21:08:45 +0000 (21:08 +0000)]
amd64 pmap: teach functions walking user page tables about PG_PS bit in PDPE.

Only unmanaged 1G superpages are handled.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoamd64: report support for 1G superpages in getpagesizes(2).
kib [Wed, 9 Sep 2020 21:01:36 +0000 (21:01 +0000)]
amd64: report support for 1G superpages in getpagesizes(2).

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agouipc_shm.c: Move comment where it belongs.
kib [Wed, 9 Sep 2020 21:00:11 +0000 (21:00 +0000)]
uipc_shm.c: Move comment where it belongs.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoFollow-up r364753 by enabling compiler-rt's atomic implementation only
dim [Wed, 9 Sep 2020 20:48:57 +0000 (20:48 +0000)]
Follow-up r364753 by enabling compiler-rt's atomic implementation only
for clang, as it uses clang specific builtins, and does not compile
correctly with gcc. Note that gcc packages usually come with their own
libatomic, providing these primitives.

PR: 230888
MFC after: 3 days
X-MFC-With: r364753

3 years agoperiodic.conf(5): don't truncate interface names reported by 420.status-network.
rew [Wed, 9 Sep 2020 19:07:34 +0000 (19:07 +0000)]
periodic.conf(5): don't truncate interface names reported by 420.status-network.

The daily periodic script, 420.status-network uses netstat(1) to report
interface status. By default, netstat(1) truncates interface names.

Add the '-W' flag (avoid truncating interface names) as the default for
'daily_status_network_netstat_flags' in periodic.conf(5).

The default 420.status-network command is now 'netstat -i -d -W -n'.

PR:     163572
Reported by: kes-kes@yandex.ru
Reviewed by: allanjude (mentor) bcr (manpages)
Approved by: allanjude (mentor)
MFC after:  1 week
Differential Revision:  https://reviews.freebsd.org/D26023

3 years agoMerge commit e6bb4c8e7 from llvm git (by Craig Topper):
dim [Wed, 9 Sep 2020 18:11:04 +0000 (18:11 +0000)]
Merge commit e6bb4c8e7 from llvm git (by Craig Topper):

  [X86] SSE4_A should only imply SSE3 not SSSE3 in the frontend.

  SSE4_1 and SSE4_2 due imply SSSE3. So I guess I got confused when
  switching the code to being table based in D83273.

  Fixes PR47464

This should fix builds with -march=amdfam10 emitting SSSE3 instructions
such as pshufb, which lead to programs crashing with SIGILL on such
processors.

Reported by: avg
MFC after: 6 weeks
X-MFC-With: r364284

3 years agogetlogin_r: fix the type of len
kevans [Wed, 9 Sep 2020 18:07:13 +0000 (18:07 +0000)]
getlogin_r: fix the type of len

getlogin_r is specified by POSIX to to take a size_t len, not int. Fix our
version to do the same, bump the symbol version due to ABI change and
provide compat.

This was reported to break compilation of Ruby 2.8.

Some discussion about the necessity of the ABI compat did take place in the
review. While many 64-bit platforms would likely be passing it in a 64-bit
register and zero-extended and thus, not notice ABI breakage, some do
sign-extend (e.g. mips).

PR: 247102
Submitted by: Bertram Scharpf <software@bertram-scharpf.de> (original)
Submitted by: cem (ABI compat)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26335

3 years agostand/efihttp: Work around a bug in edk2 http instance reconfiguration
scottph [Wed, 9 Sep 2020 16:35:51 +0000 (16:35 +0000)]
stand/efihttp: Work around a bug in edk2 http instance reconfiguration

A bug in the EFI HTTP driver of TianoCore EDK2 causes memory
corruption when an http instance that uses tls is reconfigured,
leading to a crash.

Work around this by forcing a new http instance for each request
instead of reconfiguring the existing one.

The upstream bug report is https://bugzilla.tianocore.org/show_bug.cgi?id=1917

Submitted by: bcran
Reviewed By: imp, kevans, tsoome
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21281

3 years agoIn r354148 the goal was to check THREAD_CAN_SLEEP() only once for the
glebius [Wed, 9 Sep 2020 16:13:33 +0000 (16:13 +0000)]
In r354148 the goal was to check THREAD_CAN_SLEEP() only once for the
purpose of epoch_trace() and for calling subsequent panic, but to keep
code fully under INVARIANTS, so don't use bare function call to panic().
However, at the last stage of review a true value slipped in, while
always false was assumed.  I checked that in email archive with kib@.

Noticed by: trasz

3 years agoggate: Fix ggated/ggatec debug print of offsets.
markj [Wed, 9 Sep 2020 12:58:19 +0000 (12:58 +0000)]
ggate: Fix ggated/ggatec debug print of offsets.

The request offset and length are always unsigned, so print them as
such.

Submitted by: Yoshihiro Ota <ota@j.email.ne.jp>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21388

3 years agoSo it turns out that syzkaller hit another crash. It has to do with switching
rrs [Wed, 9 Sep 2020 11:11:50 +0000 (11:11 +0000)]
So it turns out that syzkaller hit another crash. It has to do with switching
stacks with a SENT_FIN outstanding. Both rack and bbr will only send a
FIN if all data is ack'd so this must be enforced. Also if the previous stack
sent the FIN we need to make sure in rack that when we manufacture the
"unknown" sends that we include the proper HAS_FIN bits.

Note for BBR we take a simpler approach and just refuse to switch.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D26269

3 years agocertctl: fix hashed link generation with duplicate subjects
kevans [Wed, 9 Sep 2020 09:08:09 +0000 (09:08 +0000)]
certctl: fix hashed link generation with duplicate subjects

Currently, certctl rehash will just keep clobbering .0 rather than
incrementing the suffix upon encountering a duplicate. Do this, and do it
for blacklisted certs as well.

This also improves the situation with the blacklist to be a little less
flakey, comparing cert fingerprints for all certs with a matching subject
hash in the blacklist to determine if the cert we're looking at can be
installed.

Future work needs to completely revamp the blacklist to align more with how
it's described in PR 246614. In particular, /etc/ssl/blacklisted should go
away to avoid potential confusion -- OpenSSL will not read it, it's
basically certctl internal.

PR: 246614
Reviewed by: Michael Osipov <michael.osipov siemens com>
Tested by: Michael Osipov
With suggestions from: Michael Osipov
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26167

3 years agoUpdate nvi to 2.2.0
bapt [Wed, 9 Sep 2020 08:38:47 +0000 (08:38 +0000)]
Update nvi to 2.2.0

Main changes:
* Vim-style expandtab option
* Provides Turkish translation
* Backspace now deletes \ rather than being escaped
* T during motion commands is now VI-compatible
* Encoding related fixes, such as UTF-8 detection
* Fixed a number of memory management issues

MFC after: 3 weeks

3 years agoImport missing files from the nvi 2.2.0 previous half done import
bapt [Wed, 9 Sep 2020 08:18:04 +0000 (08:18 +0000)]
Import missing files from the nvi 2.2.0 previous half done import

3 years agoImport nvi 2.2.0
bapt [Wed, 9 Sep 2020 07:57:59 +0000 (07:57 +0000)]
Import nvi 2.2.0

3 years agolibc tests: dynthr_mod: fix some WARNS issues
kevans [Wed, 9 Sep 2020 02:45:47 +0000 (02:45 +0000)]
libc tests: dynthr_mod: fix some WARNS issues

This is being addressed as part of a side-patch I'm working on that builds
all the things with WARNS=6, instead of relying on it being supplied in just
shallow parts of the build with higher-level Makefile.inc.

Provide a prototype for mod_main and annotate the thread function argument
as unused.

MFC after: 1 week

3 years agolibc/resolv: attempt to fix the test under WARNS=6
kevans [Wed, 9 Sep 2020 02:42:21 +0000 (02:42 +0000)]
libc/resolv: attempt to fix the test under WARNS=6

In a side-change that I'm working on to start defaulting src builds to
WARNS=6 where WARNS isn't otherwise specified, GCC6 (and clang, to a lesser
extent) pointed out a number of issues with the resolv tests:

- Global method variable that gets shadowed in run_tests()
- Signed/unsigned comparison between i in run_tests() and hosts->sl_cur

The shadowed variable looks like it might actually be bogus as written, as
we pass it to RUN_TESTS -> run_tests, but other parts use the global method
instead. This change is mainly geared towards correcting that by removing
the global and plumbing the method through from run_tests -> run into the
new thread.

For the signed/unsigned comparison, there's no compelling reason to not just
switch i/nthreads/nhosts to size_t.

The review also included a change to the load() function that was better
addressed by jhb in r365302.

Reviewed by: ngie, pstef
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24844

3 years agosrc.conf(5): regen after r365491
kevans [Wed, 9 Sep 2020 00:41:31 +0000 (00:41 +0000)]
src.conf(5): regen after r365491

3 years agoopts: FREEBSD_UPDATE no longer relies on PORTSNAP
kevans [Wed, 9 Sep 2020 00:40:54 +0000 (00:40 +0000)]
opts: FREEBSD_UPDATE no longer relies on PORTSNAP

phttpget is no longer tied to the portsnap build as of r365490.

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26255

3 years agophttpget: move out of portsnap
kevans [Wed, 9 Sep 2020 00:39:47 +0000 (00:39 +0000)]
phttpget: move out of portsnap

Currently, WITHOUT_PORTSNAP forces WITHOUT_FREEBSD_UPDATE because the
latter relies on phttpget, which lives inside the portsnap build bits.

Remove the dependency between these two options by moving phttpget out into
^/libexec and building/installing it if either WITH_PORTSNAP or
WITH_FREEBSD_UPDATE.

Future work could remove the conditional if it's decided that users will use
it independently of either the current in-base consumers.

Reported by: swills
Reviewed by: jilles, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26255

3 years ago[PowerPC64LE] PPC64LE support for libelf.
bdragon [Wed, 9 Sep 2020 00:06:35 +0000 (00:06 +0000)]
[PowerPC64LE] PPC64LE support for libelf.

Fix native detection when building on powerpc64le.

I will be submitting this and r361104 upstream shortly.

Sponsored by: Tag1 Consulting, Inc.

3 years agoAllow consumer to customize physical pager.
kib [Wed, 9 Sep 2020 00:00:43 +0000 (00:00 +0000)]
Allow consumer to customize physical pager.

Add support for user-supplied callbacks into phys pager operations,
providing custom getpages(), haspage(), and populate() methods
implementations.  Pager stores user data ptr/val in the object to
provide context.

Add phys_pager_allocate() helper that takes user ops table as one of
the arguments.

Current code for these methods is moved to the 'default' ops table,
assigned automatically when vm_pager_alloc() is used.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years ago[PowerPC64] Fix xive order calculation in qemu TCG
bdragon [Tue, 8 Sep 2020 23:48:49 +0000 (23:48 +0000)]
[PowerPC64] Fix xive order calculation in qemu TCG

When emulating a single thread system for testing reasons, mp_maxid can
be 0. This trips up our math for calculating the order.

Account for this to fix xive attachment when emulating a single-thread
core on qemu powernv (a configuration that doesn't exist in the real world.)

Sponsored by: Tag1 Consulting, Inc.

3 years agoAdd kern_mmap_racct_check(), a helper to verify limits in vm_mmap*().
kib [Tue, 8 Sep 2020 23:48:19 +0000 (23:48 +0000)]
Add kern_mmap_racct_check(), a helper to verify limits in vm_mmap*().

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoConvert allocations of the phys pager to vm_pager_allocate().
kib [Tue, 8 Sep 2020 23:38:49 +0000 (23:38 +0000)]
Convert allocations of the phys pager to vm_pager_allocate().

Future changes would require additional initialization of OBJT_PHYS
objects, and vm_object_allocate() is not suitable for it.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoAdd interruptible variant of vm_wait(9), vm_wait_intr(9).
kib [Tue, 8 Sep 2020 23:28:09 +0000 (23:28 +0000)]
Add interruptible variant of vm_wait(9), vm_wait_intr(9).

Also add msleep flags argument to vm_wait_doms(9).

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D24652

3 years agoFix 64-bit build of libofw.
bdragon [Tue, 8 Sep 2020 23:22:11 +0000 (23:22 +0000)]
Fix 64-bit build of libofw.

Adjust a couple of printf() lines that deal with dumping out addresses
to cast to uintmax_t.

This allows building a 64-bit libofw for use in things like a future
Petitboot loader for PowerPC64, and other FDT platforms that require
a 64-bit loader binary and want to use forth.

Sponsored by: Tag1 Consulting, Inc.

3 years ago[PowerPC64] Hide dssall instruction from llvm assembler
bdragon [Tue, 8 Sep 2020 22:59:43 +0000 (22:59 +0000)]
[PowerPC64] Hide dssall instruction from llvm assembler

When doing a build for a modern CPUTYPE, llvm will throw errors if obsolete
instructions are used, even if they will never run due to runtime checks.

Hiding the dssall instruction from the assembler fixes kernel build when
overriding CPUTYPE, without having any effect on the generated binary.

This has been in my local tree for over a year and is well tested across
a variety of machines.

Sponsored by: Tag1 Consulting, Inc.

3 years ago[PowerPC] Add root_pic assertion.
bdragon [Tue, 8 Sep 2020 22:42:41 +0000 (22:42 +0000)]
[PowerPC] Add root_pic assertion.

When enabling an interrupt, assert that we do in fact have a root PIC.

This would have saved me some debugging effort.

Sponsored by: Tag1 Consulting, Inc.

3 years agoDon't return errors from the cryptodev_process() method.
jhb [Tue, 8 Sep 2020 22:41:35 +0000 (22:41 +0000)]
Don't return errors from the cryptodev_process() method.

The cryptodev_process() method should either return 0 if it has
completed a request, or ERESTART to defer the request until later.  If
a request encounters an error, the error should be reported via
crp_etype before completing the request via crypto_done().

Fix a few more drivers noticed by asomers@ similar to the fix in
r365389.  This is an old bug, but went unnoticed since crypto requests
did not start failing as a normal part of operation until digest
verification was introduced which can fail requests with EBADMSG.

PR: 247986
Reported by: asomers
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D26361

3 years agogeom_part: extend kern.geom.part.check_integrity to work on GPT
eugen [Tue, 8 Sep 2020 22:23:53 +0000 (22:23 +0000)]
geom_part: extend kern.geom.part.check_integrity to work on GPT

There are multiple USB/SATA bridges on the market that unconditionally
cut some LBAs off connected media. This could be a problem
for pre-partitioned drives so GEOM complains and does not create
devices in /dev for slices/partitions preventing access to existing data.

We have kern.geom.part.check_integrity that allows us to correct
partitioning if changed from default 1 to 0 but it works for MBR only.
If backup copy of GPT is unavailable due to decreases number of LBAs,
kernel still does not give access to partitions and prints to dmesg:

GEOM: md0: corrupt or invalid GPT detected.
GEOM: md0: GPT rejected -- may not be recoverable.

This change makes it work for GPT too, so it created partitions in /dev
and prints to dmesg this instead:

GEOM: md0: the secondary GPT table is corrupt or invalid.
GEOM: md0: using the primary only -- recovery suggested.

Then "gpart recover" re-created backup copy of GPT
and allows further manipulations with partitions.

This change is no-op for default configuration having
kern.geom.part.check_integrity=1

Reported by: Alex Korchmar
MFC after: 3 days.

3 years agoFix panic with net.fibs tunable set in loader.conf.
melifaro [Tue, 8 Sep 2020 21:39:34 +0000 (21:39 +0000)]
Fix panic with net.fibs tunable set in loader.conf.

Fix by removing forgotten CTLFLAG_RWTUN flag from the sysctl,
 loader variable will be read later in vnet_rtables_init().

Reported by: mav

3 years agoZFS: remove some extra defines
mmacy [Tue, 8 Sep 2020 17:47:30 +0000 (17:47 +0000)]
ZFS: remove some extra defines

When merging a number of defines that are needed in the standalone
build made it in to the module makefile.

Reported by: markj@

3 years agofd: fix fhold on an uninitialized var in fdcopy_remapped
mjg [Tue, 8 Sep 2020 16:07:47 +0000 (16:07 +0000)]
fd: fix fhold on an uninitialized var in fdcopy_remapped

Reported by: gcc9

3 years agocache: drop write-only tvp_seqc vars
mjg [Tue, 8 Sep 2020 16:06:46 +0000 (16:06 +0000)]
cache: drop write-only tvp_seqc vars

3 years agovfs: drop a write-only var in vfs_periodic_msync_inactive
mjg [Tue, 8 Sep 2020 16:06:26 +0000 (16:06 +0000)]
vfs: drop a write-only var in vfs_periodic_msync_inactive

3 years agoarm64: check for CRC32 support via HWCAP
mhorne [Tue, 8 Sep 2020 15:39:19 +0000 (15:39 +0000)]
arm64: check for CRC32 support via HWCAP

Doing it this way eliminates the assumption about homogeneous support
for the feature, since HWCAP values are only set if support is present
on all CPUs.

Reviewed by: tuexen, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26032

3 years agoarm64: export new HWCAP features
mhorne [Tue, 8 Sep 2020 15:36:38 +0000 (15:36 +0000)]
arm64: export new HWCAP features

Expose some of the new HWCAP features added in r65304. This includes the
addition of elf_hwcap2 into the sysvec, and a separate function to parse
for those features.

This only exposes features which require no further configuration, e.g.
indicating the presence of certain instructions. Larger features (SVE)
will not be advertised until we actually support them. The exact list of
features/extensions this patch exposes is:
  - ARMv8.0-DGH
  - ARMv8.0-SB
  - ARMv8.2-BF16
  - ARMv8.2-DCCVADP
  - ARMv8.2-I8MM
  - ARMv8.4-LRCPC
  - ARMv8.5-CondM
  - ARMv8.5-FRINT
  - ARMv8.5-RNG
  - PSTATE.SSBS

While here, annotate elf_hwcap and elf_hwcap2 as __read_frequently, and
move the declarations to the machine/md_var.h header.

Submitted by: mikael@ (D22314 portion)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26031
Differential Revision: https://reviews.freebsd.org/D22314

3 years agoarm64: fix incorrect HWCAP definitions
mhorne [Tue, 8 Sep 2020 15:08:20 +0000 (15:08 +0000)]
arm64: fix incorrect HWCAP definitions

FreeBSD exports CPU features as bits in the AT_HWCAP and AT_HWCAP2
vectors via elf_aux_info(3). This interface is similar to getauxval(3)
on Linux, and for simplicity to consumers we try to maintain an
identical set of feature flags on arm64.

The first batch of AT_HWCAP flags were added in r350166, corresponding
to definitions that already existed in Linux. Unfortunately, one flag
was missed, and a portion of the values are shifted one bit to the right
as a result.

Add the missing definition for HWCAP_ASIMDHP, and adjust the affected
values to match their Linux counterparts.

Although this is an ABI-breaking change, there is no plan to provide
compat code for old binaries. An audit of our ports tree and other
software via Debian code search indicates that there are not yet any
consumers of this interface for FreeBSD/arm64.

Bump __FreeBSD_version to be on the safe side, in case compat code needs
to be added in the future.

Reviewed by: emaste, manu
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26329

3 years agosort(1): Remove duplicate option check
gbe [Tue, 8 Sep 2020 15:01:49 +0000 (15:01 +0000)]
sort(1): Remove duplicate option check

Reviewed by: lwhsu, emaste
Approved by: emaste
Obtained from: DragonFlyBSD
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23892

3 years agonet: mitigate vnet / epair cleanup races
kp [Tue, 8 Sep 2020 14:54:10 +0000 (14:54 +0000)]
net: mitigate vnet / epair cleanup races

There's a race where dying vnets move their interfaces back to their original
vnet, and if_epair cleanup (where deleting one interface also deletes the other
end of the epair). This is commonly triggered by the pf tests, but also by
cleanup of vnet jails.

As we've not yet been able to fix the root cause of the issue work around the
panic by not dereferencing a NULL softc in epair_qflush() and by not
re-attaching DYING interfaces.

This isn't a full fix, but makes a very common panic far less likely.

PR: 244703, 238870
Reviewed by: lutz_donnerhacke.de
MFC after: 4 days
Differential Revision: https://reviews.freebsd.org/D26324

3 years agoRISC-V: enable MK_FORMAT_EXTENSIONS
mhorne [Tue, 8 Sep 2020 13:24:44 +0000 (13:24 +0000)]
RISC-V: enable MK_FORMAT_EXTENSIONS

This option was marked as broken because our riscv64-xtoolchain-gcc
package lacked support. Since we are moving away from xtoolchain gcc in
favor of freebsd-gcc9, there should be no issue in enabling this option
by default.

Notably, this enables -Wformat errors.

Reviewed by: kp, jhb
Differential Revision: https://reviews.freebsd.org/D26320

3 years agoRISC-V: fix some mismatched format specifiers
mhorne [Tue, 8 Sep 2020 13:21:13 +0000 (13:21 +0000)]
RISC-V: fix some mismatched format specifiers

RISC-V is currently built with -Wno-format, which is how these went
undetected. Address them now before re-enabling those warnings.

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

3 years agoMove gpio and hwpmc to the correct place in files.arm64
andrew [Tue, 8 Sep 2020 11:46:33 +0000 (11:46 +0000)]
Move gpio and hwpmc to the correct place in files.arm64

Sponsored by: Innovate UK

3 years agoAdd a GPIO driver for the Arm pl061 controller
andrew [Tue, 8 Sep 2020 11:35:35 +0000 (11:35 +0000)]
Add a GPIO driver for the Arm pl061 controller

A PL061 is a simple 8 pin GPIO controller. This GPIO device is used to
signal an internal request for shutdown on some virtual machines including
Arm-based Amazon EC2 instances.

Submitted by: Ali Saidi <alisaidi_amazon.com> (previouss version)
Reviewed by: Ali Saidi, manu
Differential Revision: https://reviews.freebsd.org/D24065

3 years agoAdd a few features to rcorder:
ae [Tue, 8 Sep 2020 10:36:11 +0000 (10:36 +0000)]
Add a few features to rcorder:

o Enhance dependency loop logging: print full chain instead of the
  last link competing the loop;
o Add -g option to generate dependency graph suitable for GraphViz
  visualization, loops and other graph generation issues are highlighted
  automatically;
o Add -p option that enables grouping items that can be processed in
  parallel.

Submitted by: Boris Lytochkin <lytboris at gmail>
Reviewed by: melifaro
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25389

3 years agommc_da: universally use uint8_t for the partition index
avg [Tue, 8 Sep 2020 06:19:23 +0000 (06:19 +0000)]
mmc_da: universally use uint8_t for the partition index

Also, assert in sdda_init_switch_part() that the index is within the
defined range.

MFC after: 1 week

3 years agommc_da: fix a typo and a too long line
avg [Tue, 8 Sep 2020 06:18:34 +0000 (06:18 +0000)]
mmc_da: fix a typo and a too long line

MFC after: 1 week

3 years agommc_da: make sure that part_index is not used uninitialized in sddastart
avg [Tue, 8 Sep 2020 05:46:10 +0000 (05:46 +0000)]
mmc_da: make sure that part_index is not used uninitialized in sddastart

This is a fix to r334065.

Without this change I once got stuck I/O with endless partition switching:

(sdda0:aw_mmc_sim2:0:0:0): sddastart
(sdda0:aw_mmc_sim2:0:0:0): Partition  0 -> -525703168
(sdda0:aw_mmc_sim2:0:0:0): xpt_action: func 0x91d XPT_MMC_IO
(sdda0:aw_mmc_sim2:0:0:0): xpt_done: func= 0x91d XPT_MMC_IO status 0x1
(sdda0:aw_mmc_sim2:0:0:0): sddadone
(sdda0:aw_mmc_sim2:0:0:0): Card status: 00000000
(sdda0:aw_mmc_sim2:0:0:0): Current state: 4
(sdda0:aw_mmc_sim2:0:0:0): Compteting partition switch to 0

Note that -525703168 (an int) is 0xe0aa6800 in binary representation.
The partition indexes are actually stored as uint8_t, so that value
was converted / truncated to zero.

MFC after: 1 week

3 years agoAdd support to BELKIN B2B128 USB3 Ethernet Adapter to axge(4)
lwhsu [Tue, 8 Sep 2020 04:44:37 +0000 (04:44 +0000)]
Add support to BELKIN B2B128 USB3 Ethernet Adapter to axge(4)

Github PR: https://github.com/freebsd/freebsd/pull/439
Submitted by: https://github.com/jdpc86
MFC after: 2 weeks

3 years ago[PowerPC] Implement VDSO timebase access on powerpc*
bdragon [Tue, 8 Sep 2020 03:00:31 +0000 (03:00 +0000)]
[PowerPC] Implement VDSO timebase access on powerpc*

Implement the remaining pieces needed to allow userland timestamp reading.

Rewritten based on an intial essay into the problem by Justin Hibbits.
(Copyright changed to my own on his request.)

Tested on ppc64 (POWER9 Talos II), powerpcspe (e500v2 RB800), and
powerpc (g4 PowerBook).

Reviewed by: jhibbits (in irc)
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D26347

3 years ago[PowerPC] Work around -O miscompile on powerpc 32 bit.
bdragon [Tue, 8 Sep 2020 01:27:03 +0000 (01:27 +0000)]
[PowerPC] Work around -O miscompile on powerpc 32 bit.

Work around llvm 11 miscompile in 32 bit powerpc that appears to cause ifuncs
to branch to the wrong address by forcing -O2. This worked in previous
versions because -O was mapped to -O2 previously (but is now -O1.)

While here, remove the old temporary workaround from r224882 that does the
opposite thing for powerpc non-DEBUG kernels, bringing it in line with other
platforms that compile at -O2.

This fixes kernel boot on powerpc and powerpcspe after the llvm11 transition.

Sponsored by: Tag1 Consulting, Inc.

3 years agosrc.conf.5: regen after r365439, WITH_/WITHOUT_CLEAN option
emaste [Tue, 8 Sep 2020 00:48:18 +0000 (00:48 +0000)]
src.conf.5: regen after r365439, WITH_/WITHOUT_CLEAN option

3 years agoAdd WITH_/WITHOUT_CLEAN option to replace NO_CLEAN
emaste [Tue, 8 Sep 2020 00:44:35 +0000 (00:44 +0000)]
Add WITH_/WITHOUT_CLEAN option to replace NO_CLEAN

This allows use of the standard src.conf configuration for controlling
whether the tree is cleaned before build or not.  The default is still
to clean.

Setting either NOCLEAN or NO_CLEAN will mention the new src.conf option.
NOCLEAN remains a .warning, while for now NO_CLEAN is .info.

Reviewed by: bdrewery (earlier version)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22762

3 years agoretire an old NO_CLEAN dependency cleanup hack
emaste [Tue, 8 Sep 2020 00:15:18 +0000 (00:15 +0000)]
retire an old NO_CLEAN dependency cleanup hack

We have some hacks to remove stale dependency files for NO_CLEAN
builds that are missed by make's dependency handling.  These are
intended to upport ongoing NO_CLEAN builds, and are no longer needed
after a sufficient amount of time elapses.

3 years agovm_object_split(): Handle orig_object type changes.
markj [Mon, 7 Sep 2020 23:28:33 +0000 (23:28 +0000)]
vm_object_split(): Handle orig_object type changes.

orig_object->type can change from OBJT_DEFAULT to OBJT_SWAP while
vm_object_split() is sleeping.  In this case some pages in new_object
may be left unbusied, but vm_object_split() attempts to unbusy all of
them.

Track the beginning of the busied range.  Add an assertion to verify
that pages are not re-added to the source object while sleeping.

Reported by: Olympios Petrakis <olympios.petrakis@netapp.com>
Reviewed by: alc, kib
Tested by: pho
MFC after: 1 week
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D26223

3 years agoimgact_elf.c: unify check for phdr fitting into the first page.
kib [Mon, 7 Sep 2020 21:37:16 +0000 (21:37 +0000)]
imgact_elf.c: unify check for phdr fitting into the first page.

Similar to the userspace rtld check.

Reviewed by: dim, emaste (previous versions)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26339

3 years agortld: pass argc/argv/env to dso inits.
kib [Mon, 7 Sep 2020 21:32:27 +0000 (21:32 +0000)]
rtld: pass argc/argv/env to dso inits.

This is consistent with how array inits are called, and also makes us
more compatible with glibc environment.

Requested by: Alex S <iwtcex@gmail.com>
PR: 249162
Reviewed by: dim, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D26351

3 years ago[PowerPC] Initialize ELFv1 as a secondary sysvec to ELFv2.
bdragon [Mon, 7 Sep 2020 20:25:54 +0000 (20:25 +0000)]
[PowerPC] Initialize ELFv1 as a secondary sysvec to ELFv2.

In order to enable VDSO timekeeping, it is necessary that there be exactly
one primary FreeBSD sysvec for each of the host and (optionally) compat32.

So, switch ELFv1 to being a secondary sysvec of ELFv2, so it does not get
double-allocated in the shared page.

Since secondary sysvecs use the same sigcode allocation as the primary,
define both to use the main sigcode64, and adjust the sv_sigcode_base on
ELFv2 after initialization to point to the correct offset.

This has the desirable side effect of avoiding having a separate copy of
the signal trampoline in the shared page. Our sigcode64 was already written
to take advantage of trampoline sharing, it was just not being allocated
that way until now.

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

3 years agoMerge commit 47b0262d3 from llvm git (by me):
dim [Mon, 7 Sep 2020 20:10:03 +0000 (20:10 +0000)]
Merge commit 47b0262d3 from llvm git (by me):

  Add <stdarg.h> include to kmp_os.h, to get the va_list type, required
  after cde8f4c164a2. Sort system includes, while here.

The original merged commit works fine by itself on head, but fails to
compile on stable branches because stdarg.h is not implicitly pulled in.

MFC after: immediately, to fix failing builds on stable/{11,12}

3 years agoFix vdso compat32 timekeeping on !=x86.
bdragon [Mon, 7 Sep 2020 20:05:18 +0000 (20:05 +0000)]
Fix vdso compat32 timekeeping on !=x86.

Since x86 is the only 32-bit arch that has a 32-bit time_t, adjust the
private bintime32 struct in vdso to only use a 32 bit sec on amd64.

This matches the existing behavior in the compat code.

Noticed while implementing vdso timekeeping on powerpc.

This should also theoretically fix vdso timekeeping for arm binaries on
aarch64.

See tools attached to https://reviews.freebsd.org/D26347 for testing.

Reviewed by: kib (in irc)
Sponsored by: Tag1 Consulting, Inc.

3 years agoCall atf_skip function in cleanup procedure as it also triggers zfs.ko loading
lwhsu [Mon, 7 Sep 2020 18:15:58 +0000 (18:15 +0000)]
Call atf_skip function in cleanup procedure as it also triggers zfs.ko loading

PR: 249055
Sponsored by: The FreeBSD Foundation

3 years agontp: whitespace and typo fix in conf file
emaste [Mon, 7 Sep 2020 17:19:31 +0000 (17:19 +0000)]
ntp: whitespace and typo fix in conf file

PR: 248942
Submitted by: Jose Luis Duran (whitespace), igor (typo)
MFC after: 1 week

3 years agoWiFi: fix ieee80211_media_change() callers
bz [Mon, 7 Sep 2020 15:35:40 +0000 (15:35 +0000)]
WiFi: fix ieee80211_media_change() callers

In r178354 with the introduction of multi-bss ("vap") support factoring
out started and with r193340 ieee80211_media_change() no longer returned
ENETRESET but only 0 or error.
As ieee80211(9) tells the ieee80211_media_change() function should not
be called directly but is registered with ieee80211_vap_attach() instead.

Some drivers have not been fully converted.  After fixing the return
checking some of these functions were simply wrappers between
ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra
function, where possible as well.

PR: 248955
Submitted by: Tong Zhang (ztong0001 gmail.com) (original)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

3 years agonsswitch.conf.5: style fixes
asomers [Mon, 7 Sep 2020 13:44:54 +0000 (13:44 +0000)]
nsswitch.conf.5: style fixes

Fix some whitespace, and remove the .Tn macro

Reported by: mandoc, igor
Reviewed by: bcr (manpages)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26345

3 years agoConsistently use the same gateway when adding/deleting interface routes.
melifaro [Mon, 7 Sep 2020 10:13:54 +0000 (10:13 +0000)]
Consistently use the same gateway when adding/deleting interface routes.

Use the same link-level gateway when adding or deleting interface routes.
This helps nexthop checking in the upcoming multipath changes.

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

3 years agoSlightly improve usb(4)
lwhsu [Mon, 7 Sep 2020 07:44:14 +0000 (07:44 +0000)]
Slightly improve usb(4)

- Mention USB 3.0
- Update links
- Fix `mandoc -T lint` warnings

Reviewed by: bcr, hselasky
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26349

3 years agomusb/allwinner: add support for configuring phy as well as device mode
avg [Mon, 7 Sep 2020 06:53:29 +0000 (06:53 +0000)]
musb/allwinner: add support for configuring phy as well as device mode

At least on Orange Pi PC Plus even the host mode does not work without
enabling the phy and setting it to the host mode.

The driver will now parse dr_mode property and will try to configure
itself and the phy accordingly.
OTG mode is not supported yet, so it is treated as the device / peripheral
mode.

The phy is enabled -- powered on -- only for the host mode.

The device mode requires support from a phy driver, e.g., aw_usbphy on
Allwinner platform.
aw_usbphy does not support the device mode, so it cannnot work yet.

MFC after: 6 weeks

3 years agomusb/allwinner: add H3 support
avg [Mon, 7 Sep 2020 06:49:07 +0000 (06:49 +0000)]
musb/allwinner: add H3 support

MFC after: 6 weeks

3 years agomusb/allwinner: apply register filter in awusbdrd_bs_r_2() as well
avg [Mon, 7 Sep 2020 06:48:08 +0000 (06:48 +0000)]
musb/allwinner: apply register filter in awusbdrd_bs_r_2() as well

Otherwise, I get this panic:
panic: awusbdrd_reg: Invalid register 0x342

It looks that musb code both writes and reads at least MUSB2_REG_TXDBDIS.

MFC after: 5 weeks
X-MFC after: r365399

3 years agofixup r365398: add a missed file with all the new Allwinner musb_otg code
avg [Mon, 7 Sep 2020 06:44:24 +0000 (06:44 +0000)]
fixup r365398: add a missed file with all the new Allwinner musb_otg code

Obtained from: andrew
MFC after: 5 weeks
X-MFC with: r365398

3 years agoAllwinner USB DRD support (musb_otg)
avg [Mon, 7 Sep 2020 06:39:00 +0000 (06:39 +0000)]
Allwinner USB DRD support (musb_otg)

Allwinner USB DRD is based on the Mentor USB OTG controller, with a
different register layout and a few missing registers.

The code is by Andrew Turner (andrew).

Reviewed by: hselasky, manu
Obtained from: andrew
MFC after: 5 weeks
Differential Revision: https://reviews.freebsd.org/D5881

3 years agotwsi: some variants clear interrupt flag by writing 0, others by writing 1
avg [Mon, 7 Sep 2020 06:32:03 +0000 (06:32 +0000)]
twsi: some variants clear interrupt flag by writing 0, others by writing 1

Make that distinction more explicit and regular in the code.
The difference in behavior is documented in the respective datasheets.

Previously, the code handled the distinction by writing the control
register multiple times where at least one write was zero and another
was one.

This can be considered a follow-up to r363021.

Reviewed by: manu
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D26308

3 years agotwsi: use tsleep instead of pause for better responsiveness
avg [Mon, 7 Sep 2020 06:29:41 +0000 (06:29 +0000)]
twsi: use tsleep instead of pause for better responsiveness

wakeup() does not have any effect on pause(), so if a transfer was
not finished by the time of the first check, then the thread
would sleep full 30 ms.

To do: protect the transfer and interrupt code with the mutex,
switch from tsleep from msleep

Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D26309

3 years agoaw_clk_nm: fix incorrect use of abs()
avg [Mon, 7 Sep 2020 06:27:18 +0000 (06:27 +0000)]
aw_clk_nm: fix incorrect use of abs()

abs() takes a (signed) int as input.
Instead, it was used with unsigned 64-bit integers.

So, add and use a new helper function to calculate a difference between
two uint64_t-s.

Reviewed by: manu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26307

3 years agonsswitch.conf(5): recommend placing cache after files
asomers [Sun, 6 Sep 2020 20:32:13 +0000 (20:32 +0000)]
nsswitch.conf(5): recommend placing cache after files

When cache precedes files, and nscd is configured to allow negative caching,
commands like "pw groupadd" can fail. The sequence of events looks like:

1. A command like pkg(8) looks up the group, and finds it absent.
2. pkg invokes pw(8) to add the group
3. pkg queries the group, but nscd says it doesn't exist, since it has a
   negative cache entry for that group.

See also: https://lists.freebsd.org/pipermail/freebsd-current/2012-January/031595.html

Reviewed by: bcr (manpages)
MFC after: 1 week
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D26184

3 years agopadlock(4): fix instapanics with geli authentication
asomers [Sun, 6 Sep 2020 19:25:31 +0000 (19:25 +0000)]
padlock(4): fix instapanics with geli authentication

cryptodev_process implementations are supposed to return 0

PR: 247986
Submitted by: jhb
MFC after: 1 week

3 years agoRemove duplicated line.
oshogbo [Sun, 6 Sep 2020 15:44:09 +0000 (15:44 +0000)]
Remove duplicated line.

Reported by: lwhsu

3 years agotraceroute6: capsicumize it
oshogbo [Sun, 6 Sep 2020 14:04:02 +0000 (14:04 +0000)]
traceroute6: capsicumize it

Submitted by: Shubh Gupta <shubh@freebsd.org>
Sponsored by: Google (GSOC 2020)
Differential Revision: https://reviews.freebsd.org/D25604

3 years agoFollow-up r365371 by removing sentences which indicate the state of the
dim [Sun, 6 Sep 2020 09:08:06 +0000 (09:08 +0000)]
Follow-up r365371 by removing sentences which indicate the state of the
MK_MALLOC_PRODUCTION option on -CURRENT.

Also, for the sake of backwards compatibility, support the old way of
enabling 'production malloc', e.g. by adding a define in make.conf(5).

MFC after: 1 week
X-MFC-With: r365371

3 years agoTurn MALLOC_PRODUCTION into a regular src.conf(5) option
dim [Sat, 5 Sep 2020 23:30:17 +0000 (23:30 +0000)]
Turn MALLOC_PRODUCTION into a regular src.conf(5) option

For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
been used to turn off potentially expensive debug checks and statistics
gathering in the implementation of malloc(3).

It seems more consistent to turn this into a regular src.conf(5) option,
e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
be toggled similar to any other source build option, and turned on or
off by default for e.g. stable branches.

Reviewed by: imp, #manpages
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D26337

3 years agoUndo 'fix off by one' part of r365360.
kib [Sat, 5 Sep 2020 22:48:27 +0000 (22:48 +0000)]
Undo 'fix off by one' part of r365360.

Noted by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 6 days

3 years agortld: do not refuse to relocate objects without dynamic symtabs.
kib [Sat, 5 Sep 2020 22:44:38 +0000 (22:44 +0000)]
rtld: do not refuse to relocate objects without dynamic symtabs.

Such objects can still have valid relocations not requiring symbolic
references.

PR: 249121
Reported by: wsh@riski.sh
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agortld: do not process absent dynamic.
kib [Sat, 5 Sep 2020 22:41:31 +0000 (22:41 +0000)]
rtld: do not process absent dynamic.

If object has no dynamic phdr, do not try to dereference NULL.  This
means that we cannot process any relocation, and that there cannot be
symbols defined, but it is up to static linker to produce meaningful
objects.

PR: 249121
Reported by: wsh@riski.sh
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

3 years agosx: fix up manpage after r363113
mjg [Sat, 5 Sep 2020 20:22:02 +0000 (20:22 +0000)]
sx: fix up manpage after r363113

No date change as there is no new information.

Submitted by: sigsys@gmail.com
Differential Revision: https://reviews.freebsd.org/D26341

3 years agoUpdate to bmake-20200902
sjg [Sat, 5 Sep 2020 19:29:42 +0000 (19:29 +0000)]
Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
  used to run scripts (as defined by  the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
  variable assignments so that file and line number are reported for
  variable parse errors.

3 years agoci-qemu-test.sh: use pkgbase
emaste [Sat, 5 Sep 2020 19:03:34 +0000 (19:03 +0000)]
ci-qemu-test.sh: use pkgbase

Reviewed by: bcran (earlier), manu (earlier), imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24276

3 years agotag bmake-20200902
sjg [Sat, 5 Sep 2020 16:44:37 +0000 (16:44 +0000)]
tag bmake-20200902

3 years agortsock.c: remove extraneous space
emaste [Sat, 5 Sep 2020 16:13:36 +0000 (16:13 +0000)]
rtsock.c: remove extraneous space

Submitted by: Neel Chauhan <neel AT neelc DOT org>
Differential Revision: https://reviews.freebsd.org/D26249

3 years agoImport bmake-20200902
sjg [Sat, 5 Sep 2020 16:11:04 +0000 (16:11 +0000)]
Import bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
  used to run scripts (as defined by  the .SHELL target).

o new debug option -dl: LINT mode, does the equivalent of := for all
  variable assignments so that file and line number are reported for
  variable parse errors.