Commit Graph

279674 Commits

Author SHA1 Message Date
riastradh
25f11de3b9 mmap MAP_FAILED audit. 2020-08-20 15:54:11 +00:00
riastradh
f1323c812d Nix trailing whitespace. 2020-08-20 13:58:30 +00:00
riastradh
f3d2f6ec55 clang can't handle __aligned on anonymous structure initializers. 2020-08-20 13:33:54 +00:00
maxv
f44525c377 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.
2020-08-20 11:09:56 +00:00
maxv
0a88106ee0 nvmm-x86: advertise the SERIALIZE instruction, available on future CPUs 2020-08-20 11:07:43 +00:00
roy
5fbf94c10a Sprinkle some const 2020-08-20 11:01:02 +00:00
mrg
1172b145cf call this bozohttpd/20200820 2020-08-20 07:57:01 +00:00
mrg
0370405840 compare mmap return again MAP_FAILED not -1 or 0. 2020-08-20 07:56:26 +00:00
mrg
560f0b4f2d update for recent changes. 2020-08-20 07:55:10 +00:00
gson
b134f0a332 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.
2020-08-20 07:32:40 +00:00
gson
912167fe43 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.
2020-08-20 07:23:20 +00:00
rillig
6ed1ad7c05 make(1): make a few comments more precise 2020-08-20 07:15:52 +00:00
rillig
4bb6285a90 make(1): use more descriptive variable name in ModifyWords 2020-08-20 07:09:06 +00:00
rillig
6d0340ad3b 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.
2020-08-20 07:01:39 +00:00
rillig
5f4976a30a make(1): consistently access args->pflags in ModifyWord_Subst
It was confusing that some accesses were via pflags and some via
args->pflags.
2020-08-20 06:48:18 +00:00
rillig
0cbd5c0e4f 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.
2020-08-20 06:35:14 +00:00
mrg
58e1cf785c 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.
2020-08-20 05:54:32 +00:00
spz
0acfa6caa5 send close_notify for the ssl connection before closing the TCP connection
Thanks to Dr. Thomas Orgis for reporting the issue.
2020-08-20 05:46:31 +00:00
mrg
1d16bf7391 update the latest note to talk about all 3 potential ways that
failure can occur now (1 still upcoming.)
2020-08-20 03:09:34 +00:00
mrg
8b6f6bbcd0 make GCC 8 consumers to use gcc.old. 2020-08-20 03:08:07 +00:00
rillig
0b2ca5a549 make(1): add empty lines to separate the test cases in cond-short 2020-08-19 22:47:09 +00:00
kre
36d40de856 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).
2020-08-19 22:41:47 +00:00
chs
a8aa7072a7 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.
2020-08-19 15:36:41 +00:00
tsutsui
dd79f1e46f 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.
2020-08-19 13:11:42 +00:00
yamaguchi
17537a36ef Make descriptor_num in ixl(4) readonly
because ixl(4) does not support reallocating related resources

pointed out by knakahara@, thanks.
2020-08-19 09:22:05 +00:00
yamaguchi
cff67cd8e8 Adjust the default descriptor sizes for ixl(4)
These decreasements has no impact for throughput
while forwarding 64-1518 byte packets.
2020-08-19 09:07:57 +00:00
yamaguchi
2544b2817b whitespace fix
From msaitoh@, thanks.
2020-08-19 09:03:50 +00:00
mrg
a2dc1f3fac merge GCC 8.4 into gcc.old. 2020-08-19 07:46:31 +00:00
simonb
bf74807839 Remove trailing \n from UVMHIST_LOG() format strings. 2020-08-19 07:29:00 +00:00
rillig
2ea44cf014 make(1): don't optimize when measuring the code coverage
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622
2020-08-19 06:30:37 +00:00
skrll
40a6ec7f3d KNF. Add some whitespace to the TLBINV_MAP macro and tlb_invalidate_op
enum.
2020-08-19 06:11:49 +00:00
rillig
60fd66e933 make(1): fix a few inconsistencies in the manual page 2020-08-19 06:10:06 +00:00
skrll
57bc4fb9c6 Unwrap short line KASSERT 2020-08-19 06:08:27 +00:00
skrll
0c8273cd62 Fix inverted logic test in pmap_tlb_shootdown_process for if the victim
is onproc.
2020-08-19 06:07:03 +00:00
rillig
316fae6cdd make(1): add test for the .newline variable 2020-08-19 05:51:18 +00:00
rillig
57bd6e4e52 make(1): add test for the $$ expression 2020-08-19 05:40:06 +00:00
rillig
697a5bfd15 make(1): add test for the -n option 2020-08-19 05:25:26 +00:00
rillig
e2eaadf3b7 make(1): add test for the -q option 2020-08-19 05:13:18 +00:00
msaitoh
cc67c5474a s/ be be / be / 2020-08-19 02:19:06 +00:00
mrg
cef8759bd7 initial GCC 8.4 -> gcc.old import. 2020-08-18 23:31:16 +00:00
christos
0c510515ef use opendisk()/dehumanize_number 2020-08-18 19:26:29 +00:00
christos
9630bba2c9 make sure errno is always set when we return -1 (Anon Ymous) 2020-08-18 19:18:06 +00:00
maxv
82a320a02c nvmm-x86-svm: improve the CPUID emulation
Limit the hypervisor range, and properly handle each basic leaf until 0xD.
2020-08-18 17:08:05 +00:00
maxv
6d90c51498 nvmm: use relaxed atomics to read nmachines 2020-08-18 17:04:37 +00:00
maxv
49bcb63b40 nvmm: localify a variable that doesn't need to be global 2020-08-18 17:03:58 +00:00
maxv
536d725bb4 nvmm-x86: also flush the guest TLB when CR4.{PCIDE,SMEP} changes 2020-08-18 17:03:10 +00:00
riastradh
257aaf9afb 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
2020-08-18 14:32:34 +00:00
simonb
bc5b96679a Fix small tyop in a comment. 2020-08-18 11:48:21 +00:00
simonb
c4cbc27b38 Remove an extra word from a comment to make it more readable. 2020-08-18 11:21:25 +00:00
chs
752f40af2e fix amap_extend() to handle amaps where we previously failed to allocate
the ppref memory.
2020-08-18 10:40:20 +00:00