Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (177d) 

2024-05-09 23:59:46 UTC Now

2020-08-21 07:05:25 UTC MAIN commitmail json YAML

Ifdef out fast path that relies on atomic 64-bit load/store.

(Really this sliding window business could probably be done with
32-bit sequence numbers and careful detection of wraparound, but
that's a little more effort to work out -- let's just unbreak the
builds for now.)

(riastradh)

2020-08-21 07:04:31 UTC MAIN commitmail json YAML

make(1): clean up list handling

Lst_Init never returns NULL.  Casting postfix increment to void is
unnecessary since that is quite common.  Found a last instance of a
local variable named 'nlnode'.

(rillig)

2020-08-21 07:00:32 UTC MAIN commitmail json YAML

make(1): remove type information from local variables in list library

Every node in this file is of type LstNode, which makes the 'l' in the
name 'ln' redundant.  The name 'ln' is quite close to the name 'l',
which in turn can easily be confused with the digit '1'.  Therefore,
rename 'l' to 'list' and 'ln' to 'node'.

(rillig)

2020-08-21 06:38:30 UTC MAIN commitmail json YAML

make(1): use shorter field names in Lst and LstNode

In a doubly linked list, it is commonly known that the 'prev' and 'next'
fields of the nodes are pointers to other nodes, therefore this does not
need to be repeated in the variable name.

(rillig)

2020-08-21 06:37:30 UTC MAIN commitmail json YAML

Disable libsodium HAVE_TI_MODE for now.

This may reduce performance by not taking advantage of 64x64->128
multiplications on some platforms, but let's worry about that later
and fix the build on the other platforms instead.

(riastradh)

2020-08-21 06:30:46 UTC MAIN commitmail json YAML

2020-08-21 06:28:38 UTC MAIN commitmail json YAML

make(1): condense the API comments in the list library

Most mentioned "side effects" were either implementation details or
rather "main effects".  The wording of similar functions has been
aligned.

(rillig)

2020-08-21 06:27:41 UTC MAIN commitmail json YAML

Disable -Wshadow for libsodium.

Evidently ed25519_ref10.c has a global and a local both named `d'.

(riastradh)

2020-08-21 05:28:41 UTC MAIN commitmail json YAML

make(1): remove unnecessary type duplication in list implementation

Having both the interface types Lst/LstNode and the implementation types
List/ListNode does not make the code clearer, it is an unnecessary
abstraction.  Eliminating the implementation type means that some of the
local variables can be merged, which will make the code simpler than
before.

(rillig)

2020-08-21 05:19:48 UTC MAIN commitmail json YAML

make(1): extract creation of a list node into a separate function

(rillig)

2020-08-21 04:57:56 UTC MAIN commitmail json YAML

make(1): remove unnecessary macro PAlloc

The ptype parameter was never used, which made it redundant.  The
remaining text is so simple that it's not worth having a macro for this
purpose.  This makes it easier to read the code since the previously
implicit variable assignment is now clearly visible.

(rillig)

2020-08-21 04:42:03 UTC MAIN commitmail json YAML

make(1): use stricter list API for sequential access

In several places, it just doesn't make sense to have a null pointer
when a list is expected.

In the existing unit tests, the list passed to Lst_Open is always valid,
but that's not a guarantee for real-world usage.  Therefore, Lst_Open
has been left for now, and Lst_OpenS is only the preferred alternative
to it.

(rillig)

2020-08-21 04:09:12 UTC MAIN commitmail json YAML

make(1): assert correct usage of the Lst_Open API

All calls to Lst_Next are properly protected by Lst_Open, so there is no
possible assertion failure here.

(rillig)

2020-08-21 03:44:58 UTC MAIN commitmail json YAML

Mark up a few missed equal signs as literal.

(uwe)

2020-08-21 03:36:03 UTC MAIN commitmail json YAML

make(1): make list library code stricter

Up to now, the list library didn't distinguish between programming
mistakes (violations of invariants, illegal parameter values) and
actually interesting situations like "element not found in list".

The current code contains many branches for conditions that are neither
exercised by the unit tests nor by real-world usage.  There is no point
in keeping this unnecessary code.

The list functions will be migrated from their lenient variants to the
stricter variants in small parts, each function getting the S suffix
when it is made strict, to avoid any confusion about how strict a
particular function is.  When all functions have been migrated, they
will be renamed back to their original names.

While here, the comments of the functions are cleaned up since they
mention irrelevant implementation details in the API comments, as well
as "side effects" that are really main effects.

(rillig)

2020-08-21 03:13:30 UTC MAIN commitmail json YAML

2020-08-21 03:03:45 UTC MAIN commitmail json YAML

make(1): don't use bitfields in list processing

There is no need to squeeze unrelated fields of the struct into a single
object.  A bitset with a single flag is the same as a simple boolean
variable.

(rillig)

2020-08-21 02:56:26 UTC MAIN commitmail json YAML

make(1): properly clean up the remaining code mentioning circular lists

(rillig)

2020-08-21 02:45:34 UTC MAIN commitmail json YAML

2020-08-21 02:20:48 UTC MAIN commitmail json YAML

make(1): remove unused code for circular lists

The list library had probably been imported from a general-purpose
library that also supported circular lists.  These are not used by make
though.

After replacing Lst_Init(FALSE) with Lst_Init(), only a single call to
Lst_Init remained with a non-constant argument, and that was in
Lst_Concat, which was to be expected.

(rillig)

2020-08-21 01:36:05 UTC MAIN commitmail json YAML

Fix markup around optional command name.

Avoids emboldened brackets.  I remain fuzzy on how grouping in roff
works, or doesn't work.

(riastradh)

2020-08-20 23:36:45 UTC MAIN commitmail json YAML

fix hpcmips and evbppc builds (wrong type in panic()).

(mrg)

2020-08-20 23:19:34 UTC MAIN commitmail json YAML

Man page enhancements.

Better describe the command search procedure.
Document "trap -P"
Describe what works as a function name.
More accurate description of reserved word recognition.
Be more accurate about when field splittng happens after
expansions (and in particular note that tilde expansions are
not subject to field splitting).  Be clear that "$@" is
not field split, it simply produces multiple fields as part
of its expansion (hence IFS is irrelevant to this), but if
used as $@ (unquoted) each field produced is potentially subject
to field splitting.  Other minor wording changes.

(kre)

2020-08-20 23:09:56 UTC MAIN commitmail json YAML

Be less conservative about when we do clear_traps() when we have
traps_invalid (that is, when we actually nuke the parent shell's
caught traps in a subshell).  This allows more reasonable use of
"trap -p" (and similar) in subshells than existed before (and in
particular, that command can be in a function now - there can also
be several related commands like
traps=$(trap -p INT; trap -p QUIT; trap -p HUP)
A side effect of all of this is that
(eval "$(trap -p)"; ...)
now allows copying caught traps into a subshell environment, if desired.

Also att the ksh93 variant (the one not picked by POSIX as it isn't
generally as useful) of "trap -p" (but call it "trap -P" which extracts
just the trap action for named signals (giving more than one is usually
undesirable).  This allows
eval "$(trap -P INT)"
to run the action for SIGINT traps, without needing to attempt to parse
the "trap -p" output.

(kre)

2020-08-20 23:03:17 UTC MAIN commitmail json YAML

Add lots of comments explaining what is happening in here.

Also enhance some of the DEBUG mode trace output (nothing visible
in a normal shell build).

A couple of very minor code changes that no-one should ever notice
(eg: one less wait() call in the case that there is nothing pending).

(kre)

2020-08-20 23:03:08 UTC MAIN commitmail json YAML

Add missing description for wgconfig `set private-key' command.

(riastradh)

2020-08-20 23:01:20 UTC MAIN commitmail json YAML

Mark up argument as such and write out wgconfig command correctly.

(riastradh)

2020-08-20 22:58:06 UTC MAIN commitmail json YAML

Tweak markup so the square brackets don't become bold.

(riastradh)

2020-08-20 22:56:56 UTC MAIN commitmail json YAML

When not compiling -DSMALL permit use of names RTMIN[+n] and RTMAX[-n]
(where n is a decimal integer in the range [0 .. SIGRTMAX-SIGRTMIN].
As usual a leading "sig" is ignored and the strings are case independent.

Some implementations do not name the real time signals, and using
labels like RTMIN+3 can be the only way they can be manipulated,
so allow that technique (we still return the RTnn names on the inverse
translation though).

Because this is used by both kill(1) and sh(1) the kill and trap
commands both gain access to the new notation (when !SMALL).

(kre)

2020-08-20 22:20:50 UTC MAIN commitmail json YAML

Slightly less indentation.

(riastradh)

2020-08-20 22:19:57 UTC MAIN commitmail json YAML

Fix self-xref.  Indent example displays.

(riastradh)

2020-08-20 22:17:17 UTC MAIN commitmail json YAML

Fix up wg-userspace(8) man page.

(riastradh)

2020-08-20 21:59:55 UTC MAIN commitmail json YAML

3RDPARTY janitorial service

(riastradh)

2020-08-20 21:45:46 UTC MAIN commitmail json YAML

Note WireGuard.

(ozaki-r did the vast majority of the actual implementation in 2018;
I just dusted it off and imported it.)

(riastradh)

2020-08-20 21:36:21 UTC MAIN commitmail json YAML

Mark KASSERT-only variable as __diagused.

(riastradh)

2020-08-20 21:36:11 UTC MAIN commitmail json YAML

Add wg(4) to amd64/ALL.

(riastradh)

2020-08-20 21:36:00 UTC MAIN commitmail json YAML

2020-08-20 21:35:44 UTC MAIN commitmail json YAML

Avoid callout_halt under lock.

- We could pass the lock in, except we hold another lock too.

- We could halt before taking the other lock, but it's not safe to
  sleep after getting the session pointer before taking its lock.

- We could halt before getting the session pointer, but then there's
  no point in doing it under the lock.

So just halt a little earlier instead.

(riastradh)

2020-08-20 21:35:33 UTC MAIN commitmail json YAML

Sprinkle const.

(riastradh)

2020-08-20 21:35:24 UTC MAIN commitmail json YAML

Use container_of rather than casts via void *.

(riastradh)

2020-08-20 21:35:13 UTC MAIN commitmail json YAML

Use be32enc, rather than possibly unaligned uint32_t cast and htonl.

(riastradh)

2020-08-20 21:35:01 UTC MAIN commitmail json YAML

2020-08-20 21:34:51 UTC MAIN commitmail json YAML

Update wgconfig(8) for proplib API changes.

Also check type tags before conversion.

(riastradh)

2020-08-20 21:34:42 UTC MAIN commitmail json YAML

Use consttime_memequal, not memcmp, to compare secrets for equality.

(riastradh)

2020-08-20 21:34:32 UTC MAIN commitmail json YAML

Take advantage of prop_dictionary_util(3).

(riastradh)

2020-08-20 21:34:23 UTC MAIN commitmail json YAML

Split up wg_process_peer_tasks into bite-size functions.

(riastradh)

2020-08-20 21:34:13 UTC MAIN commitmail json YAML

Fix race in wg_worker kthread destruction.

Also allow the thread to migrate between CPUs -- just not while we're
in the middle of processing and holding onto things with psrefs.

(riastradh)

2020-08-20 21:34:03 UTC MAIN commitmail json YAML

Update for proplib API changes.

(riastradh)

2020-08-20 21:33:53 UTC MAIN commitmail json YAML

Use SYSCTL_SETUP for net.wireguard subtree.

(riastradh)

2020-08-20 21:33:43 UTC MAIN commitmail json YAML

Missed a spot -- add sys/crypto/blake2 to .PATH here.

(riastradh)

2020-08-20 21:31:47 UTC MAIN commitmail json YAML

Fix in-kernel debug build.

(riastradh)

2020-08-20 21:31:37 UTC MAIN commitmail json YAML

Implement sliding window for wireguard replay detection.

(riastradh)

2020-08-20 21:31:26 UTC MAIN commitmail json YAML

Make `wgconfig --help' and variations work.

(riastradh)

2020-08-20 21:31:16 UTC MAIN commitmail json YAML

Don't falsely assert cpu_softintr_p().

Will fail in the following stack trace:

wg_worker (kthread)
wg_receive_packets
wg_handle_packet
wg_handle_msg_data
KASSERT(cpu_softintr_p())

Instead, use kpreempt_disable/enable around softint_schedule.

XXX Not clear that softint is the right place to do this!

(riastradh)

2020-08-20 21:31:06 UTC MAIN commitmail json YAML

Convert wg(4) to if_stat.

(riastradh)

2020-08-20 21:30:56 UTC MAIN commitmail json YAML

Use cprng_strong, not cprng_fast, for ephemeral key.

(riastradh)

2020-08-20 21:30:46 UTC MAIN commitmail json YAML

Descend into wg-userspace.

(riastradh)

2020-08-20 21:30:32 UTC MAIN commitmail json YAML

2020-08-20 21:29:44 UTC MAIN commitmail json YAML

[ozaki-r] Fix bugs found by maxv's audits

(riastradh)

2020-08-20 21:28:02 UTC MAIN commitmail json YAML

2020-08-20 21:21:33 UTC MAIN commitmail json YAML

2020-08-20 21:21:05 UTC MAIN commitmail json YAML

2020-08-20 21:20:47 UTC MAIN commitmail json YAML

2020-08-20 21:20:37 UTC MAIN commitmail json YAML

Reuse temporaries in ge25519_scalarmult to reduce stack usage.

(riastradh)

2020-08-20 21:20:17 UTC MAIN commitmail json YAML

2020-08-20 20:28:13 UTC MAIN commitmail json YAML

2020-08-20 19:43:42 UTC MAIN commitmail json YAML

2020-08-20 18:47:57 UTC MAIN commitmail json YAML

make(1): move complicated boolean expression out of the function call

It's easier to inspect in a debugger this way.

(rillig)

2020-08-20 18:43:19 UTC MAIN commitmail json YAML

2020-08-20 18:05:57 UTC MAIN commitmail json YAML

make(1): enable debug logging for archive test

This test succeeds locally on NetBSD 8.0 but not in the official test
runs on https://releng.netbsd.org/test-results.html.  To see the
difference, run the test with full debug information.

This test is commented out in usr.bin/make/unit-tests/Makefile, but that
doesn't stop tests/usr.bin/make/t_make.sh from running it nevertheless,
since over there, all *.mk files are considered tests, be they commented
out or not.

(rillig)

2020-08-20 17:45:47 UTC MAIN commitmail json YAML

2020-08-20 17:23:44 UTC MAIN commitmail json YAML

2020-08-20 17:13:06 UTC MAIN commitmail json YAML

make(1): remove unused function declarations

(rillig)

2020-08-20 17:11:47 UTC MAIN commitmail json YAML

make(1): fix type of string length variables

(rillig)

2020-08-20 17:06:26 UTC MAIN commitmail json YAML

make(1): fix wrong or outdated comments

(rillig)

2020-08-20 16:16:33 UTC netbsd-9 commitmail json YAML

2020-08-20 16:15:50 UTC MAIN commitmail json YAML

Whitespace.  NFCI.

(kre)

2020-08-20 16:15:44 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by kim in ticket #1059):

share/mk/bsd.x11.mk: revision 1.133
share/mk/bsd.x11.mk: revision 1.136
external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile: revision 1.8
external/mit/xorg/server/xorg-server/doc/Makefile: revision 1.6

Allow overriding the default man substitutions with X11EXTRAMANTRANSFORMS
fix various missing transforms for man page, ala PR#55422.
add method to transform both the "__foo__" and "@foo@"
version of various transforms, while upstream are converting
from the former to the latter it seems.  convert all the
common transforms to this method.

expand the grep for .pc files to look for missing @foo@

fixes to the man page genration, and ignore a few things
(thanks uwe@ - .IN lines, and stuff between tab(@) and .TE.)

xorg-server __default_font_path__ -> @default_font_path@,
and xfree86 transform xconfigdir, xkbdir, and modulepath
using new both method.

(martin)

2020-08-20 15:54:12 UTC MAIN commitmail json YAML

2020-08-20 13:58:30 UTC MAIN commitmail json YAML

Nix trailing whitespace.

(riastradh)

2020-08-20 13:33:54 UTC MAIN commitmail json YAML

clang can't handle __aligned on anonymous structure initializers.

(riastradh)

2020-08-20 11:09:56 UTC MAIN commitmail json YAML

nvmm-x86: improve the CPUID emulation

- x86-svm: explicitly handle 0x80000007 and 0x80000008. The latter
  contains extended features we must filter out. Apply the same in
  x86-vmx for symmetry.
- x86-svm: explicitly handle extended leaves until 0x8000001F, and
  truncate to it.

(maxv)

2020-08-20 11:07:43 UTC MAIN commitmail json YAML

nvmm-x86: advertise the SERIALIZE instruction, available on future CPUs

(maxv)

2020-08-20 11:01:02 UTC MAIN commitmail json YAML

2020-08-20 07:57:01 UTC MAIN commitmail json YAML

call this bozohttpd/20200820

(mrg)

2020-08-20 07:56:27 UTC MAIN commitmail json YAML

compare mmap return again MAP_FAILED not -1 or 0.

(mrg)

2020-08-20 07:55:10 UTC MAIN commitmail json YAML

2020-08-20 07:32:40 UTC MAIN commitmail json YAML

Add cleanup of possible leftover rump processes, replacing the
non-working cleanup code just removed from ffs_common.sh.  Fixes
PR bin/48892 with respect to the t_rquotad test.

(gson)

2020-08-20 07:23:20 UTC MAIN commitmail json YAML

Remove non-functional cleanup code from test_case() and test_case_root().
It had no effect because RUMP_SOCKETS_LIST is not set in the shell
running the cleanup phase.  Even if RUMP_SOCKETS_LIST had been set,
the code would still not have worked correctly because it ran
rump.halt via "atf_check -s exit:1", which would cause the first
successful halting of a rump processes to be treated as a failure
and abort the cleanup without halting any other rump processes still
running.

(gson)

2020-08-20 07:15:52 UTC MAIN commitmail json YAML

make(1): make a few comments more precise

(rillig)

2020-08-20 07:09:06 UTC MAIN commitmail json YAML

make(1): use more descriptive variable name in ModifyWords

(rillig)

2020-08-20 07:01:39 UTC MAIN commitmail json YAML

make(1): remove VARP_SUB_MATCHED

This flag didn't really belong to the other flags.  The other flags are
set during parsing and are then left as-is by ModifyWord_Subst and
ModifyWord_SubstRegex.

It's clearer to use a separate variable for storing whether there was a
match already.

(rillig)

2020-08-20 06:48:18 UTC MAIN commitmail json YAML

make(1): consistently access args->pflags in ModifyWord_Subst

It was confusing that some accesses were via pflags and some via
args->pflags.

(rillig)

2020-08-20 06:35:14 UTC MAIN commitmail json YAML

make(1): remove unreached code from bmake_strndup

The "at most" branch was never taken since all call sites in var.c only
ever need a substring, and the target buffer is not limited.  Therefore
rename the function and make it simpler.

It's ok that bmake_strldup is defined as estrndup in case of USE_EMALLOC
since that function's implementation is compatible to the "copy
exactly", it just contains some extra null checks that will never match
since the variable values cannot (well, or should not) contain null
bytes.  Theoretically they can, but the behavior then depends on the
exact implementation and is unreliable, therefore nobody does this.
After all, Makefiles are used for text processing, not for binary data.

(rillig)

2020-08-20 05:54:32 UTC MAIN commitmail json YAML

move pmap segtab history into a new history of only 1000 entries,
but will overflow much slower than the main pmap history.

move various debug info into kernhist.  make pte array checker
into an array and use it in pmap_segtab_release() and
pmap_pte_reserve().  move check before MD callback(), incase it
wants to change ptes for some reason (they're passed in, but
this callback is currently always NULL.)

clean up some history logs to reduce the number of lines required.

(mrg)

2020-08-20 05:46:31 UTC MAIN commitmail json YAML

send close_notify for the ssl connection before closing the TCP connection
Thanks to Dr. Thomas Orgis for reporting the issue.

(spz)

2020-08-20 03:09:34 UTC MAIN commitmail json YAML

update the latest note to talk about all 3 potential ways that
failure can occur now (1 still upcoming.)

(mrg)

2020-08-20 03:08:07 UTC MAIN commitmail json YAML

make GCC 8 consumers to use gcc.old.

(mrg)

2020-08-19 22:47:09 UTC MAIN commitmail json YAML

make(1): add empty lines to separate the test cases in cond-short

(rillig)

2020-08-19 22:41:47 UTC MAIN commitmail json YAML

For now, probably forever, prohibit unquoted $ and ` in the names of
functions being defined (they can still be included if quoted).

If we parsed the way POSIX specifies (leaving the exact input text of
$ and ` expansions unaltered, until required to be expanded) this would
not be needed, as the name of a function being defined does not underbo
parameter, command, or arith expansions, so xxx$3() { : ; } would just
work.  But for many reasons we don't do that (and are unlikely to ever,
though maintaing both forms might be an option someday) - which led to
very obscure behaviour (if sh were compiled in DEBUG mode, even an abort())
and certainly nothing useful.  So just prohibit these uses for now.
(A portable function name must be a "name" so this makes no difference
at all to posix compat applications/scripts).

A doc update is pending (the updated sh.1 also contains updates in other
areas not yet appropriate to commit).

(kre)

2020-08-19 18:40:09 UTC netbsd-8 commitmail json YAML

2020-08-19 18:39:19 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by chs in ticket #1598):

sys/uvm/uvm_amap.c: revision 1.123 (via patch)

fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.

(martin)

2020-08-19 18:38:03 UTC netbsd-9 commitmail json YAML

2020-08-19 18:36:59 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by chs in ticket #1057):

sys/uvm/uvm_amap.c: revision 1.123 (via patch)

fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.

(martin)

2020-08-19 15:36:41 UTC MAIN commitmail json YAML

in uao_get(), if we unlock the uobj to read a page from swap,
we must clear the cached page array because it is now stale.
also add a missing call to uvm_page_array_fini() if the I/O fails.
fixes PR 55493.

(chs)

2020-08-19 13:11:42 UTC MAIN commitmail json YAML

Make sure pmap_kenter_pa(9) handles uncached mappings properly.

Fixes "cgfour(4) is mis-probed as bwtwo(4)" problem on 3/80
that has been broken since NetBSD 1.6.
Now Xorg 1.20 based Xsun 8bpp color server is confirmed working
on the cgfour(4).

Should be pulled up to netbsd-9.

XXX: all MD PMAP_NC flags should be replaced with MI PMAP_NOCACHE flag.

(tsutsui)

2020-08-19 09:22:05 UTC MAIN commitmail json YAML

Make descriptor_num in ixl(4) readonly
because ixl(4) does not support reallocating related resources

pointed out by knakahara@, thanks.

(yamaguchi)

2020-08-19 09:07:57 UTC MAIN commitmail json YAML

Adjust the default descriptor sizes for ixl(4)

These decreasements has no impact for throughput
while forwarding 64-1518 byte packets.

(yamaguchi)

2020-08-19 09:03:50 UTC MAIN commitmail json YAML

whitespace fix

>From msaitoh@, thanks.

(yamaguchi)

2020-08-19 07:48:12 UTC MAIN commitmail json YAML

2020-08-19 07:29:01 UTC MAIN commitmail json YAML

2020-08-19 06:30:37 UTC MAIN commitmail json YAML

make(1): don't optimize when measuring the code coverage

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622

(rillig)

2020-08-19 06:11:49 UTC MAIN commitmail json YAML

KNF.  Add some whitespace to the TLBINV_MAP macro and tlb_invalidate_op
enum.

(skrll)

2020-08-19 06:10:07 UTC MAIN commitmail json YAML

make(1): fix a few inconsistencies in the manual page

(rillig)

2020-08-19 06:08:27 UTC MAIN commitmail json YAML

Unwrap short line KASSERT

(skrll)

2020-08-19 06:07:03 UTC MAIN commitmail json YAML

Fix inverted logic test in pmap_tlb_shootdown_process for if the victim
is onproc.

(skrll)

2020-08-19 05:51:19 UTC MAIN commitmail json YAML

2020-08-19 05:40:07 UTC MAIN commitmail json YAML

2020-08-19 05:25:26 UTC MAIN commitmail json YAML

2020-08-19 05:13:18 UTC MAIN commitmail json YAML

2020-08-19 02:19:08 UTC MAIN commitmail json YAML

2020-08-18 19:26:29 UTC MAIN commitmail json YAML

2020-08-18 19:18:06 UTC MAIN commitmail json YAML

make sure errno is always set when we return -1 (Anon Ymous)

(christos)

2020-08-18 17:08:05 UTC MAIN commitmail json YAML

nvmm-x86-svm: improve the CPUID emulation

Limit the hypervisor range, and properly handle each basic leaf until 0xD.

(maxv)

2020-08-18 17:04:38 UTC MAIN commitmail json YAML

nvmm: use relaxed atomics to read nmachines

(maxv)

2020-08-18 17:03:58 UTC MAIN commitmail json YAML

nvmm: localify a variable that doesn't need to be global

(maxv)

2020-08-18 17:03:10 UTC MAIN commitmail json YAML

nvmm-x86: also flush the guest TLB when CR4.{PCIDE,SMEP} changes

(maxv)

2020-08-18 14:32:34 UTC MAIN commitmail json YAML

Fix ugen detach after partial attach.

While here, register null pmf handler even for partially attached
devices so they don't needlessly interfere with suspend.

Reported-by: syzbot+5a091d2e62da20b77259@syzkaller.appspotmail.com

(riastradh)

2020-08-18 11:48:21 UTC MAIN commitmail json YAML

Fix small tyop in a comment.

(simonb)

2020-08-18 11:21:26 UTC MAIN commitmail json YAML

Remove an extra word from a comment to make it more readable.

(simonb)

2020-08-18 10:40:20 UTC MAIN commitmail json YAML

fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.

(chs)

2020-08-18 10:35:51 UTC MAIN commitmail json YAML

We don't need to call the POW and FGA bootstrap functions from the FDT
mainbus attach, the iobus attach code does this already and is called
for both iobus-only and FDT cases anyway.

After discussion with jmcneill@.

(simonb)

2020-08-18 09:44:07 UTC MAIN commitmail json YAML

Operation union_readdirhook() stores the lower directory as un_uppervp.
This breaks the assumption that un_uppervp->v_mount is the upper mount.

Fix by storing the directory as un_lowervp and adapt union_readdir().

Should fix PR kern/55552: panic with union mount

(hannken)

2020-08-18 09:42:00 UTC netbsd-8 commitmail json YAML

2020-08-18 09:41:10 UTC netbsd-8 commitmail json YAML

Pull up following revision(s) (requested by nonaka in ticket #1597):

sys/dev/ipmi.c: revision 1.5
(applied to sys/arch/x86/x86/ipmi.c)

ipmi(4): Fixed a bug that incorrect condition is notified.

When the value obtained from the sensor is below the lower limit of
the critical threshold, it is notified that the value is below the lower
limit of the warning threshold.

(martin)

2020-08-18 09:37:41 UTC netbsd-9 commitmail json YAML

2020-08-18 09:36:36 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by nonaka in ticket #1056):

sys/dev/ipmi.c: revision 1.5

ipmi(4): Fixed a bug that incorrect condition is notified.

When the value obtained from the sensor is below the lower limit of
the critical threshold, it is notified that the value is below the lower
limit of the warning threshold.

(martin)

2020-08-18 09:29:52 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by maxv in ticket #1055):

sys/dev/nvmm/nvmm.h: revision 1.13
sys/dev/nvmm/nvmm.h: revision 1.14
sys/dev/nvmm/nvmm.c: revision 1.33
sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.67
sys/dev/nvmm/nvmm_internal.h: revision 1.17
sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.67
sys/dev/nvmm/x86/nvmm_x86.c: revision 1.10

Put the few x86-specific structures under #ifdef __x86_64__, for clarity.

Make it easier to understand what's going on, no functional change.

Add new field definitions.

Add new field definitions, and intercept everything, for future-proofness.

Add CTASSERT.

(martin)

2020-08-18 07:53:24 UTC MAIN commitmail json YAML

Add missing cases, to prevent memory corruption.

Reported-by: syzbot+f8b8a689a3560dda27f7@syzkaller.appspotmail.com

(maxv)

2020-08-18 07:41:41 UTC MAIN commitmail json YAML

2020-08-18 07:25:46 UTC MAIN commitmail json YAML

Improve a panic message ever so slightly

(skrll)

2020-08-18 07:13:59 UTC MAIN commitmail json YAML

Quoted from the top of the file:
# Note: don't delete entries from here - mark them as "obsolete" instead.

(nakayama)

2020-08-18 03:02:51 UTC MAIN commitmail json YAML

2020-08-18 02:53:25 UTC MAIN commitmail json YAML

2020-08-18 02:53:02 UTC MAIN commitmail json YAML

Add Moonbase Otago OneRNG Random Number Generator.

(simonb)

2020-08-17 21:50:14 UTC MAIN commitmail json YAML

avoid build failure on !DBB kernels.

should fix arc, emips, ews4800mips, mipsco, newsmips and pmax builds.

(mrg)

2020-08-17 21:25:12 UTC MAIN commitmail json YAML

Attach an iobus with octrnm even if using devicetree (there is no
corresponding node for this device in the DT).

(jmcneill)

2020-08-17 21:00:29 UTC MAIN commitmail json YAML

IPI_SHOOTDOWN needs to be IPL_SCHED. Spotted by nick.

(jmcneill)

2020-08-17 20:43:13 UTC MAIN commitmail json YAML

remove commented out MEMORY_DISK_* entries

(christos)

2020-08-17 19:41:32 UTC MAIN commitmail json YAML

correct MEMORY_DISK_* option docs

(christos)

2020-08-17 17:18:02 UTC MAIN commitmail json YAML

Move wayward clause to where it belongs and makes sense.

Note how blowfish-cbc chooses the CBC IV.

(riastradh)

2020-08-17 16:26:03 UTC MAIN commitmail json YAML

2020-08-17 16:26:02 UTC MAIN commitmail json YAML

Make the AES and ChaCha NEON tests work in softfloat userland.

(`Softfloat' here refers to the ABI, which of course may be running
on a CPU with NEON.)

(riastradh)

2020-08-17 15:22:51 UTC MAIN commitmail json YAML

Give a hint to what the IPI numbers are, i.e. "(A/R)" meaning active and
requested respectively

(skrll)

2020-08-17 14:38:32 UTC netbsd-9 commitmail json YAML

2020-08-17 14:17:49 UTC MAIN commitmail json YAML

Disable __HAVE_PREEMPTION.  It is currently marked

#if defined(MULTIPROCESSOR) && defined(__HAVE_FAST_SOFTINTS)

but has no chance of working on OCTEON due to at least the spl functions

(skrll)

2020-08-17 11:31:07 UTC netbsd-9 commitmail json YAML

2020-08-17 11:29:31 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by jdolecek in ticket #1054):

sys/dev/pci/cmdide.c: revision 1.46

remove explicit irqack() call for unexpected interrupt; this happens
normally during boot when running identify for the drive as polled
command, and fixes hard hang caused by the irqack() on a sun machine
the unexpected interrupt happens because cmdide doesn't respect
WDCTL_IDS bit and triggers interrupt also for polled commands

also reclassify the "bogus intr" as aprint_verbose() to avoid noise
on boot

discussed and tested by Martin Husemann

(martin)

2020-08-17 11:27:33 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1053):

sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.36

Accept ioctl(RNDADDDATA) estimates at securelevel 1 (but not 2).
securelevel=1 is supposed to be a reasonable default for normal
computers.  This got in the way of ever getting entropy from a seed
on a machine with no HWRNG -- e.g., from another machine, or by
making the executive decision that what has been sampled is good
enough and issuing `head -c 32 < /dev/urandom > /dev/random'.

(martin)

2020-08-17 11:22:45 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by mrg in ticket #1052):

sys/dev/ic/bwfm.c: revision 1.28
sys/dev/ic/bwfm.c: revision 1.29
sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.22
sys/dev/ic/bwfmreg.h: revision 1.7
sys/dev/ic/bwfmvar.h: revision 1.11
sys/dev/ic/bwfmvar.h: revision 1.12
(all via patch)

Add include guards and appropriate includes to bwfmreg.h, bwfmvar.h.

No functional change intended.

Need <sys/kmem.h> for kmem_*.

Currently accidentally side-loaded by <sys/pcq.h>.

bwfm: Switch from pcq to pool_cache.
pcq_get is required to be serialized, but it's far from clear that it
is serialized here.

(martin)

2020-08-17 11:10:20 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1051):

external/mit/xorg/server/xorg-server/fb/Makefile.fb: revision 1.12

Put back fbtile.c to SRCS.fb

(martin)

2020-08-17 11:09:15 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by tsutsui in ticket #1051):

external/mit/xorg-server/dist/fb/fbfill.c: revision 1.2
external/mit/xorg-server/dist/fb/fbtile.c: revision 1.3
external/mit/xorg-server/dist/fb/wfbrename.h: revision 1.2
external/mit/xorg-server/dist/fb/fbtile.c: revisions 1.1-1.3
external/mit/xorg-server/dist/fb/fb.h: revision 1.3

Revert upstream "fb: Remove even/odd tile slow-pathing" changes.
https://gitlab.freedesktop.org/xorg/xserver/-/commit/e572bcc7f4236b7e0f23ab762f225b3bce37db59
> fb: Remove even/odd tile slow-pathing
>
> Again, clearly meant to be a fast path, but this turns out not to be the
> case.

This causes serious performance regression on 1bpp servers.

Ok'ed by mrg@.  See my post on tech-x11@ for more details:
https://mail-index.netbsd.org/tech-x11/2020/08/07/msg002115.html

(martin)

2020-08-17 10:30:23 UTC netbsd-9 commitmail json YAML

Pull up following revision(s) (requested by riastradh in ticket #1050):

sys/ufs/lfs/lfs_subr.c: revision 1.101
sys/ufs/lfs/lfs_subr.c: revision 1.102
sys/ufs/lfs/lfs_inode.c: revision 1.158
sys/ufs/lfs/lfs_inode.h: revision 1.25
sys/ufs/lfs/lfs_balloc.c: revision 1.95
sys/ufs/lfs/lfs_pages.c: revision 1.21
sys/ufs/lfs/lfs_vnops.c: revision 1.330
sys/ufs/lfs/lfs_alloc.c: revision 1.140 (patch)
sys/ufs/lfs/lfs_alloc.c: revision 1.141 (patch)
lib/libp2k/p2k.c: revision 1.72
sys/ufs/lfs/lfs.h: revision 1.205
sys/ufs/lfs/lfs.h: revision 1.206
sys/ufs/lfs/lfs_segment.c: revision 1.284
sys/ufs/lfs/lfs.h: revision 1.207
sys/ufs/lfs/lfs_segment.c: revision 1.285
sys/ufs/lfs/lfs_debug.c: revision 1.55
sys/ufs/lfs/lfs_rename.c: revision 1.23
usr.sbin/dumplfs/dumplfs.c: revision 1.65
sys/ufs/lfs/lfs_vfsops.c: revision 1.371
sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.3
sys/ufs/lfs/lfs_vfsops.c: revision 1.372
sys/ufs/lfs/lfs_vfsops.c: revision 1.373
sbin/fsck_lfs/pass1.c: revision 1.46
sys/ufs/lfs/lfs_vnops.c: revision 1.326
sys/ufs/lfs/lfs_vnops.c: revision 1.327
sys/ufs/lfs/lfs_vfsops.c: revision 1.375 (patch)
sys/ufs/lfs/lfs_vnops.c: revision 1.328
sys/ufs/lfs/lfs_subr.c: revision 1.98
sys/ufs/lfs/lfs_extern.h: revision 1.116
sys/ufs/lfs/lfs_vnops.c: revision 1.329
sys/ufs/lfs/lfs_subr.c: revision 1.99
sys/ufs/lfs/lfs_extern.h: revision 1.117
sys/ufs/lfs/lfs_accessors.h: revision 1.49
sys/ufs/lfs/lfs_extern.h: revision 1.118
sys/rump/fs/lib/liblfs/Makefile: revision 1.15
sys/ufs/lfs/lfs_bio.c: revision 1.146 (patch)
sys/ufs/lfs/lfs_bio.c: revision 1.147
sys/ufs/lfs/lfs_subr.c: revision 1.100

Fix kassert in lfs by initializing vp first.

Use a marker node to iterate lfs_dchainhd / i_lfs_dchain.

I believe elements can be removed while the lock is dropped,
including the next node we're hanging on to.

Just use VOP_BWRITE for lfs_bwrite_log.
Hope this doesn't cause trouble with vfs_suspend.

Teach lfs to transition ro<->rw.

Prevent new dirops while we issue lfs_flush_dirops.

lfs_flush_dirops assumes (by KASSERT((ip->i_state & IN_ADIROP) == 0))
that vnodes on the dchain will not become involved in active dirops
even while holding no other locks (lfs_lock, v_interlock), so we must
set lfs_writer here.  All other callers already set lfs_writer.

We set fs->lfs_writer++ without explicitly doing lfs_writer_enter
because
(a) we already waited for the dirops to drain, and
(b) we hold lfs_lock and cannot drop it before setting lfs_writer.

Assert lfs_writer where I think we can now prove it.

Serialize access to the splay tree with lfs_lock.

Change some cheap KDASSERT into KASSERT.

Take a reference and fix assertions in lfs_flush_dirops.
Fixes panic:
KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.

Don't lfs_writer_enter while holding v_interlock.

There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.

Break deadlock in PR kern/52301.

The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):
(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.
(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:
(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.
(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.

Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.

Fixes reloading lfs.kmod.

In lfs_update, hold lfs_writer around lfs_vflush.

Otherwise, we might do
lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
  -> lfs_writer_enter
which is the reverse of the lfs_writer -> lfs_seglock ordering.

Call lfs_orphan in lfs_rename while we're still in the dirop.
lfs_writer_enter can't fail; keep it simple and don't pretend it can.

Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.

Teach LFS_ORPHAN_NEXTFREE about lfs64.

Dust off the orphan detection code and try to make it work.

Fix !DIAGNOSTIC compile

Fix userland references to LFS_ORPHAN_NEXTFREE.

Forgot to grep for these or do a full distribution build, oops!

Fix missing <sys/evcnt.h> by removing the evcnts instead.

Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.

OR into bp->b_cflags; don't overwrite.

CTASSERT lfs on-disk structure sizes.

Avoid misaligned access to lfs64 on-disk records in memory.
lfs64 directory entries are only 32-bit aligned in order to conserve
space in directory blocks, and we had a hack to stuff a 64-bit inode
in them.  This replaces the hack by __aligned(4) __packed, and goes
further:

1. It's not clear that all the other lfs64 data structures are 64-bit
  aligned on disk to begin with.  We can go through these later and
  upgrade them from
        struct foo64 {
                ...
        } __aligned(4) __packed;
        union foo {
                struct foo64 f64;
                ...
        };
  to
        struct foo64 {
                ...
        };
        union foo {
                struct foo64 f64 __aligned(8);
                ...
        } __aligned(4) __packed;
  if we really want to take advantage of 64-bit memory accesses.
  However, the __aligned(4) __packed must remain on the union
  because:
2. We access even the lfs32 data structures via a union that has
  lfs64 members, and it turns out that compilers will assume access
  through a union with 64-bit aligned members implies the whole
  union has 64-bit alignment, even if we're only accessing a 32-bit
  aligned member.

Fix clang build after packed lfs64 accessor change.

Suppress spurious address-of-packed error in rump lfs too.

(martin)

2020-08-17 09:03:03 UTC MAIN commitmail json YAML

2020-08-17 08:56:27 UTC MAIN commitmail json YAML

add pmaphist calls around seg_tab[] manipulation.  hopefully will
help find what causes this:

panic: pmap_segtab_alloc: pm_segtab.seg_tab[1010] != 0 (0x980000004eeb6068): from free list

(mrg)

2020-08-17 08:34:36 UTC MAIN commitmail json YAML

ipmi(4): Fixed a bug that incorrect condition is notified.

When the value obtained from the sensor is below the lower limit of
the critical threshold, it is notified that the value is below the lower
limit of the warning threshold.

(nonaka)

2020-08-17 08:23:30 UTC MAIN commitmail json YAML

Simplify SFP+ check. No functional change.

(msaitoh)

2020-08-17 07:59:06 UTC MAIN commitmail json YAML

Re-enabling interrupt is required only when a work is scheduled form the
interrput context.

(msaitoh)

2020-08-17 07:50:42 UTC MAIN commitmail json YAML

2020-08-17 07:26:55 UTC MAIN commitmail json YAML

Fix a bug that the driver sometimes missed module insertion.

The ixgbe_sfp_probe() function was only for 82598 and other chips had no
way to poll SFP+ cage. The ixgbe_handle_mod() already has function to treat
module insertion/removal for all chips, so enqueue the work if the cage
status changed. All of ixgbe chips' SFP+ module interrupt is only on the
inserstion. This change also detect the removal by the timer.

(msaitoh)

2020-08-17 07:22:47 UTC MAIN commitmail json YAML

remove duplicate symbol now published in shared mips.

(mrg)

2020-08-17 06:30:25 UTC MAIN commitmail json YAML

Add missing workqueue_wait() for the recovery_mode_timer workqueue.

(msaitoh)

2020-08-17 06:23:01 UTC MAIN commitmail json YAML

Handle using "octeth" as root device by converting "octethN" to "cnmacN"
for any N < 100.  This allows booting for u-boot to use root=$(ethact)
on the command line and the kernel can use the ethernet interface the
kernel was loaded on as the NFS root device.

(simonb)

2020-08-17 06:18:39 UTC MAIN commitmail json YAML

Remove unused function rump_shutdown()

(gson)

2020-08-17 06:07:53 UTC MAIN commitmail json YAML

cprng(9): Remove trailing comma.

(wiz)

2020-08-17 04:16:24 UTC MAIN commitmail json YAML

note mips crash(8).

(mrg)

2020-08-17 04:15:34 UTC MAIN commitmail json YAML

mostly complete basic port of crash(8) to mips.

tested on mipsel and mips64eb.  basic functionality works
on the running kernel, not yet tested on crash dumps.

(mrg)

2020-08-17 03:22:13 UTC MAIN commitmail json YAML

2020-08-17 03:19:35 UTC MAIN commitmail json YAML

port crash(8) to mips.  (most of the kernel side.)

- expose parts of _KERNEL to _KMEMUSER as well
- hide more things for _KERNEL
- avoid DB_MACHINE_COMMANDS in crash(8)
- XXX add mips_label_t for !_KERNEL and use it in the pcb to
  avoid conflicting with the ddb/crash one
- enable dumppcb

some changes to make stack trace fail instead of SEGV and
the userland changes to crash itself not part of this change.

(mrg)

2020-08-17 03:14:09 UTC MAIN commitmail json YAML

add a "special3 offset" type of decode to ddb disasm so we see the
offsets properly decoded.  add mips r6 "cache" insn.

avoid signed/unsigned compare and ufetch_32() for upcoming crash(8).

(mrg)

2020-08-17 01:52:59 UTC MAIN commitmail json YAML

swap sys/param.h for machine/param.h.  this still obtains the
wanted COHERENCY_UNIT, while avoiding have a cascade of
failures where sys/mutex.h ends up including arm/cpu.h which
ends up including sys/resourcevar.h and then sys/mutex.h,
but as the first includer of sys/mutex.h has defined the
idempotent header define, the second one is empty, and as
kmutex_t isn't defined by the first attempt yet the kmutex_t
used in resourcevar.h generates an error.

should fix evbarm v5/v5eb, hpcarm, iyonix and zaurus builds.

tested building iyonix, zaurus and evbarmv7hf.

(mrg)

2020-08-17 00:57:37 UTC MAIN commitmail json YAML

- Track the currently-activated pmap in struct cpu_info.
- Reserve some space in struct cpu_info for future pmap changes.

(thorpej)

2020-08-17 00:55:05 UTC MAIN commitmail json YAML

Update cprng_strong API documentation.

Should maybe just get rid of the flags arguments.

(riastradh)

2020-08-17 00:49:53 UTC MAIN commitmail json YAML

Update cprng(9) man page for CTR_DRBG -> Hash_DRBG change last year.

(riastradh)

2020-08-17 00:43:16 UTC MAIN commitmail json YAML

Update cgd(4) man page.

- Highlight security model at top.
- Add adiantum and aes-xts.
- Split ciphers into `ciphers' and `obsolete ciphers'.
- Specify the parameters to the ciphers: tweak, CBC IV.
- Relegate obsolete `IV method' concept to a much shorter section.
- Add references.

(riastradh)

2020-08-16 20:43:01 UTC MAIN commitmail json YAML

make(1): move tests for the :Ox modifier into separate file

The test has been extended by ensuring that the shuffled words are still
the same.  Comparing two shuffled lists is probabilistic, but comparing
their sorted results is not, therefore that's completely sensible to do.

When writing this test, by coincidence I discovered how to generate the
"Undefined variable" error message.  Unfortunately, the error message is
wrong since the variable NUMBERS is defined at that point.  In summary,
that error message is shown when it shouldn't, and when it should it is
not shown.  Still, I'm glad that I finally found it.

(rillig)

2020-08-16 20:13:10 UTC MAIN commitmail json YAML

2020-08-16 20:04:36 UTC MAIN commitmail json YAML

- Undo part of rev 1.264; go back to not acquiring the pmap lock in
  pmap_activate().  As of rev 1.211, the pmap::pm_lev1map field is
  stable across the life of the pmap, and so the conditino that
  the change in 1.264 was intended to avoid would not have happened
  anyway.
- Explicitly use __cacheline_aligned / COHERENCY_UNIT rather than 64
  in a couple of places.
- Update comments around the lev1map lifecycle, and add some assertions
  to enforce the assumptions being described.
- Remove some dubious DEBUG tests that are not MP-safe.
- Chage some long-form #ifdef DIAGNOSTIC checks / panics to KASSERTs.
- Remove the PMAP_ACTIVATE() macro because it's no longer used anywhere
  except for pmap_activate().  Just open-code the equivalent there.
- In pmap_activate(), only perform the SWPCTX if either the PTBR or the
  ASN are different than what the PCB already has.  Also assert that
  preemption is disabled and that the specified lwp is curlwp.
- In pmap_deactivate(), add similar assertions, and add a comment explaining
  why a SWPCTX to get off of the deactivated lev1map is not necessaray.
- Refactor some duplicated code in pmap_growkernel() into a new
  pmap_kptpage_alloc() function.
- In pmap_growkernel(), assert that any user pmap published on the all-pmaps
  list does not reference the kernel_lev1map.
- In pmap_asn_alloc(), get out early if we're called with the kernel pmap,
  since all kernel mappings are ASM.  Remove bogus assertions around the
  value of pmap::pm_lev1map and the current ASN, and simply assert that
  pmap::pm_lev1map is never kernel_lev1map.  Also assert that preemption
  is disabled, since we're manipulating per-cpu data structures.
- Convert the "too much uptime" panic to a simple KASSERT, and update the
  comment to reflect that we're only subject to the longer 75 billion year
  ASN generation overflow (because CPUs that don't implement ASNs never go
  through this code path).

(thorpej)

2020-08-16 20:03:53 UTC MAIN commitmail json YAML

make(1): move tests for the :M modifier into separate files

The test for the different escaping has been adjusted to actually show
the different parsing results in the test output.  To do this, it had to
get its own file since it needs the -dv debug flag and specialized
post-processing.

(rillig)

2020-08-16 18:40:13 UTC MAIN commitmail json YAML

make(1): run tests in an almost empty, controlled environment

Several of the tests use simple variable names that might be influenced
by environment variables of the same name.  Especially the tests for the
?= variable assignment operator need an empty environment to start with,
to produce reliable results.

The PATH must be in the base environment since several tests depend on
the usual tools like echo(1), sleep(1), grep(1).  Setting the PATH to a
fixed value would have made it impossible to run the tests in a custom
environment that don't have a /bin directory.  It's the user's
responsibility to provide a sane PATH.

(rillig)

2020-08-16 18:17:17 UTC MAIN commitmail json YAML

make(1): force all tests to be run with the -r flag

Without that flag, <sys.mk> is loaded before the tests.  The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.

If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched.  The system-default rules and definitions are still
available, they are just not active by default.

Suggested by sjg.

(rillig)

2020-08-16 18:05:52 UTC MAIN commitmail json YAML

In cpu_lwp_fork(), make sure that the PTBR field in l2's HWPCB references
the lev1map associated with l2's pmap.  Otherwise, the first time we
SWPCTX to l2, we'll be on l1's page tables until the first pmap_activate()
call for l2.

(thorpej)

2020-08-16 18:04:33 UTC MAIN commitmail json YAML

make(1): use consistent formatting for running the tests

With the many newly added tests, having two messages ("testing xzy" and
"postprocessing xyz") made the output too noisy since the words were not
aligned nicely.  Use the same formatting as for MAKEVERBOSE=0, and
remove the message for postprocessing.  If there should ever be problems
during postprocessing, it's trivial to run "../make TESTS=bad-test -dl"
to find out where the problem is.

(rillig)

2020-08-16 18:02:03 UTC MAIN commitmail json YAML

Fix AES NEON code for big-endian softfp ARM.

...which is how the kernel runs.  Switch to using __SOFTFP__ for
consistency with how it gets exposed to C, although I'm not sure how
to get it defined automagically in the toolchain for .S files so
that's set manually in files.aesneon for now.

(riastradh)

2020-08-16 17:58:48 UTC MAIN commitmail json YAML

make(1): clean up cleaning of test files

The variables CLEANFILES and CLEANDIRS are not supposed to be
user-settable, thus use a simple "=" instead of "+=".

Since CLEANDIRS is always set, there is no point in making the rm
conditional.

(rillig)

2020-08-16 16:48:08 UTC MAIN commitmail json YAML

Be explcit that all calls to pmap_activate() and pmap_deactivate()
from MI code are made with preemption disabled and with l == curlwp.

(thorpej)

2020-08-16 16:01:35 UTC MAIN commitmail json YAML

G/C MP_CPU_INFO_MEMBERS

(skrll)

2020-08-16 15:52:14 UTC MAIN commitmail json YAML

Restrict the NEON code to v7hf - the softfloat toolchain does not like
it (nor is it likely to work if there is no FPU present).

(martin)

2020-08-16 14:39:50 UTC MAIN commitmail json YAML

make(1): fix archive test

At the beginning of that test, the library archive obviously does not
exist yet.

This test failure is a bit hard to detect since the test is disabled in
usr.bin/make, but not in tests/usr.bin/make.  This is because the latter
just runs all .mk files as tests, no matter whether they are commented
out or not.

(rillig)

2020-08-16 14:25:16 UTC MAIN commitmail json YAML