Commit Graph

278925 Commits

Author SHA1 Message Date
martin
e6ac0f80fe Skip interfaces that are already UP before the test starts. We can
not change state of the test host this way, it breaks e.g. test systems
with the root filesystem on NFS.
2020-07-22 05:47:24 +00:00
msaitoh
984bb2b315 s/reseting/resetting/ 2020-07-22 01:24:39 +00:00
rillig
a218bd8f70 make(1): remove parameter from ModifyWordCallback
Most modifiers don't need a variable context, and those that do already
get all their parameters in a custom Args struct.
2020-07-21 23:47:50 +00:00
rillig
717dc9869b make(1): make implementation of the :C modifier simpler 2020-07-21 23:22:45 +00:00
rillig
d5de9f10d7 make(1): add test for :S,,sep
The empty string does not match anywhere.  In other implementations of
string replacement, an empty string matches at every position of the
source string.

This only works for the :S modifier.  The :C modifier does not allow an
empty search pattern.
2020-07-21 23:19:46 +00:00
rillig
856660a0fb make(1): add test for :Q and .newline 2020-07-21 21:34:41 +00:00
rillig
011db151f6 make(1): only ask for newline if :Q actually needs it
This simple change reduces the binary size of var.o by 96 bytes (Clang,
x86_64). Given that the code is still the same, just in a different
order, this is a bit surprising.
2020-07-21 21:32:55 +00:00
rillig
25ff14505c make(1): clean up various things in var.c 2020-07-21 21:13:24 +00:00
rillig
1f3945ef69 make(1): use consistent and descriptive names for callback functions 2020-07-21 20:56:56 +00:00
rillig
2d7df07d16 make(1): remove unnecessary VarSelectWords_t struct 2020-07-21 20:08:44 +00:00
pgoyette
95e145a85a Remove spurious call to canloopinit() in an attempt to fix kern/55489
This attempt at fixing is a result of IRC discussions with martin@ and
riastradh@
2020-07-21 18:38:18 +00:00
tsutsui
090a690dad Switch x68k to HAVE_XORG_SERVER_VER=120.
Confirmed both color "Graph" VRAM and mono "Text" VRAM servers on XM6i.
2020-07-21 14:42:44 +00:00
roy
1c95b6ce56 mdnsd: starting and stopping are informational messages 2020-07-21 14:11:39 +00:00
roy
b27c70cad6 mdnsd: Treat EADDRNOTAVAIL as a transient error 2020-07-21 14:04:07 +00:00
thorpej
13dd0fa419 Sort op_mskqh, op_insqh, and op_extqh. 2020-07-21 13:37:18 +00:00
roy
95ed12b952 wpa_supplicant: Matching unspecified interfaces should not log driver fails
If there is no matching interface given, but interface matching is enabled
then all interfaces on the system will try to be initialized.

Non wireless interfaces will fail and the loopback device will be one
of these, so just log a diagnostic rather than an error.
2020-07-21 13:18:58 +00:00
roy
c22eef219f wpa_supplicant: Don't report an error when there are no op classes to add
Instead, log a diagnostic so that noise to the user is reduced.
2020-07-21 12:19:52 +00:00
roy
dad129c1ca wpa_supplicant: don't log SIOCG80211 errors during interface setup
Unless debugging.
wpa_supplicant will log it failed to initialized the driver for the
interface anyway so this just silences some noise for users.
2020-07-21 10:34:16 +00:00
rin
87dfc27289 Align tmpstk to 4-byte boundary in the same manner as mac68k.
However, unfortunately, this does not fix strange crashes of GCC8-compiled
kernel, for which I cannot even enter DDB nor obtain crash dump.

We need further investigation...
2020-07-21 06:39:31 +00:00
rin
f0f5c33535 For GCC8, do not omit frame pointer for intr_dispatch() and via1_intr()
(-fomit-frame-pointer is enabled for -O and higher for GCC8).

This is required by rtclock_intr() which unwinds stack frame of caller!

XXXXXX
We need to get rid of this hackest hack for rtclock_intr(). This problem
was discussed back in 2014:

http://mail-index.netbsd.org/port-mac68k/2014/08/15/msg000595.html
http://mail-index.netbsd.org/port-mac68k/2014/08/17/msg000600.html
http://mail-index.netbsd.org/port-mac68k/2014/08/17/msg000601.html

However, unfortunately, the problem has been left untouched until today.

The patch attached in the third message works around the problem. But,
it adds hard-coded magic numbers to intr_dispatch() and via1_intr().
For real fix, we should probably reconsider whole interrupt handling.

Anyway, now kernel compiled by GCC8 works fine as far as I can see.
2020-07-21 06:10:26 +00:00
simonb
04478e2260 Support "boot -1" to start an MP kernel in uniprocessor mode.
Sort sys/* includes while here.
2020-07-21 06:01:10 +00:00
rin
3361b5f8db Align tmpstk to 4-byte boundary as required by System V (ELF) ABI.
Fix GCC8-compiled kernel crash during very early boot stage when
printf decimal numbers; __umoddi3 corrupts stack frame which is not
aligned properly.
2020-07-21 05:45:38 +00:00
simonb
41b59d1a20 Add lockstat(1) ioctl handling.
mrg@: "looks ok."
2020-07-21 05:33:51 +00:00
gutteridge
5c46104e5e netstat.1: add various xrefs present in the body to "See Also" 2020-07-21 04:58:43 +00:00
nia
6e4479f819 fortune: arc4random_uniform for better uniform values than random() % ... 2020-07-21 03:05:40 +00:00
nia
6ad85e2cf9 tetris: Use arc4random_uniform instead of modulo for better randomness 2020-07-21 02:42:05 +00:00
nia
970d926d53 Fix location of device trees 2020-07-21 02:21:12 +00:00
rillig
ce5a7d84b5 make(1): extract :ts<separator> modifier into separate function 2020-07-20 21:33:13 +00:00
riastradh
0a5240447d viadrmums: Stop gracefully at the end of the PCI id list. 2020-07-20 21:29:38 +00:00
rillig
54377a3dde make(1): clean up implementation of :[...] and other modifiers 2020-07-20 20:56:39 +00:00
rillig
e7adb96342 make(1): fix edge cases with $ at the end of the :@ modifier
In both parts of the :@ modifier, by passing &pflags to
ParseModifierPart, a final $ was interpreted as an anchor, which only
makes sense in the :S and :C modifiers.

This edge case is neither used by src nor by pkgsrc, except for the unit
tests that have been adjusted.
2020-07-20 19:53:40 +00:00
rillig
58f4db2e7d make(1): add test for nested assignments
This test demonstrates that in ApplyModifier_Assign, the call to
ParseModifierPart must get its pflags.
2020-07-20 19:03:25 +00:00
sjg
bfa35b9119 Make DEBUG_HASH less of a fire-hose.
Reporting keys on every lookup is overkill unless
playing with a new HASH, so wrap in #ifdef DEBUG_HASH_LOOKUP
Also add some stats at the end so we can see
final size and max chain length - maxchain is a better
variable name than maxlen.
2020-07-20 18:12:48 +00:00
jmcneill
8bf8eed88c Fix coreX/IP4 summary register offsets 2020-07-20 17:56:13 +00:00
rillig
396186ceac make(1): make conditions work without pattern flags
The "pattern flag" VARP_NOSUBST was used to prevent evaluating
irrelevant conditions.  Omitting the evaluation flag VARE_WANTRES has the
same effect.
2020-07-20 16:55:10 +00:00
riastradh
bbc1ed881b Revert 1.112 "Disable x86 in-kernel AES temporarily."
The bug in fpu_kern_enter motivating this appears to have been fixed.
2020-07-20 16:45:41 +00:00
riastradh
60dedb5904 Fix fpu_kern_enter in a softint that interrupted a softint.
We need to find the lwp that was originally interrupted to save its
fpu state.

With this, fpu-heavy programs (like firefox) are once again stable,
at least under modest stress testing, on systems configured to use
wifi with WPA2 and CCMP.
2020-07-20 16:43:03 +00:00
riastradh
33ee64ee91 Save fpu state at IPL_VM to exclude fpu_kern_enter/leave.
This way fpu_kern_enter/leave cannot interrupt the transition, so the
transition from state-on-CPU to state-in-memory (with TS set) is
atomic whether in an interrupt or not.

(I am not 100% convinced that this is necessary, but it makes
reasoning about the transition simpler.)
2020-07-20 16:41:18 +00:00
riastradh
f62a83e7d2 Revert 1.66 "Fix race in fpu save with fpu_kern_enter in softint."
This only fixed part of the race, and we can do it more simply.
2020-07-20 16:38:47 +00:00
riastradh
42b2e9dc0b Revert 1.67 "Restore the lwp's fpu state, not zeros, and leave with fpu enabled."
This didn't actually avoid double-restore, and it doesn't solve the
problem anyway, and made it harder to detect in-kernel fpu abuse.
2020-07-20 16:37:34 +00:00
rillig
d802fc9c37 make(1): fix obscure edge case for ${VAR:e$=x}
The characters "$=" do not occur in either src or pkgsrc, therefore this
case is unlikely to occur in practice.
2020-07-20 16:32:14 +00:00
rillig
274b9fb5a7 make(1): demonstrate obscure edge case in SysV modifier 2020-07-20 16:27:55 +00:00
rillig
bf9a254a57 make(1): move documentation for assignment modifiers 2020-07-20 16:12:52 +00:00
rillig
317c5a3676 make(1): add test for :tu modifier with spaces 2020-07-20 16:12:02 +00:00
rillig
65c0da7b0b make(1): prefer memcmp over strncmp 2020-07-20 15:48:50 +00:00
rillig
b27184d9a8 make(1): fix type of VarPattern.lhsLen and rhsLen
String length is measured in size_t, not int.
2020-07-20 15:44:12 +00:00
rillig
14d545daea make(1): fix undefined behavior in :S modifier
The expression word + wordLen - leftLen had resulted in an out-of-bounds
pointer before.  Luckily the heap addresses were high enough in typical
applications to prevent a wrap-around.
2020-07-20 15:15:32 +00:00
riastradh
8f5a67bbb4 Disable x86 in-kernel AES temporarily.
There's a bug in the FPU state handling that it triggers -- likely
limited to the softint path since I've only ever seen it on a system
using wifi configured with WPA2 and CCMP, which uses AES heavily in
softint.

This is to be reverted once we diagnose the bug.  (There is also a
performance regression on wifi with WPA2 and CCMP, which I plan to
fix too once we figure out the FPU state handling bug.)
2020-07-20 15:11:29 +00:00
rillig
9b9cedd7d3 make(1): make implementation of the :S modifier simpler 2020-07-20 15:10:35 +00:00
jmcneill
51d8a97b81 No need for cpu_hatch_lock after all since we hatch secondaries one at a time 2020-07-20 14:59:57 +00:00