Commit Graph

301867 Commits

Author SHA1 Message Date
rillig e6298b924c lint: warn about function definitions without header declaration
The existing warning was only issued for function declarations, not for
function definitions.

The interesting change in the tests is in msg_351.c.  Many other tests
use non-static functions due to their syntactic brevity.  In these
tests, the warning is disabled individually, to allow new functions to
be added without generating warning 351.
2023-07-07 19:45:22 +00:00
riastradh e4c8179fca Revert unintentional changes to kern_lock.c in previous commit. 2023-07-07 18:02:52 +00:00
riastradh 9401f7d8e0 heartbeat(9): Test whether curcpu is stable, not kpreempt_disabled.
kpreempt_disabled worked for my testing because I tested on aarch64,
which doesn't have kpreemption.

XXX Should move curcpu_stable() to somewhere that other things can
use it.
2023-07-07 17:05:13 +00:00
riastradh 7af195686c xcall(9): If !mp_online, raise spl or set LP_BOUND to call func.
High-priority xcalls may reasonably assume that the spl is raised to
splsoftserial, so make sure to do that in xc_broadcast.

Low-priority xcalls may reasonably enter paths that assume the lwp is
bound to a CPU, so let's make it assertable even if it doesn't have
any other consequences when !mp_online.

XXX pullup-8
XXX pullup-9
XXX pullup-10
2023-07-07 17:04:49 +00:00
uwe 92446808ba heartbeat(9): markup fixes
Use .Cd for options.  Don't use the usual <space><tab>, which is
superfluous in the man page.  Paragraph break after the config section
of synopsis, before the C API section.
2023-07-07 15:56:31 +00:00
bouyer 7202cc92d3 Unmask event after VCPUOP_stop_periodic_timer and
initializing ci->ci_xen_hardclock_systime_ns, to avoid a possible race with
xen_timer_handler()
2023-07-07 15:13:41 +00:00
riastradh 6e4d02a8ee sys/param.h: Welcome to 10.99.5, courtesy of heartbeat(9). 2023-07-07 14:05:37 +00:00
riastradh 10acd8549e heartbeat(9): Fix grammaro in man page. 2023-07-07 13:19:30 +00:00
wiz 04c9d4b262 Replace main(9) reference with code location 2023-07-07 13:15:00 +00:00
wiz 7057286892 Sort SEE ALSO 2023-07-07 12:59:45 +00:00
riastradh acf51d137d amd64/ALL: Turn on heartbeat checks. 2023-07-07 12:46:50 +00:00
riastradh 12861a663c heartbeat(9): New mechanism to check progress of kernel.
This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers.  It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future.  However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout
2023-07-07 12:34:49 +00:00
riastradh 6c8524389b crashme(9): New crash methods with raised ipl or kpreempt disabled. 2023-07-07 12:34:26 +00:00
rin 2bd1369fb8 doc/HACKS: Document PR port-alpha/57511 2023-07-07 08:39:23 +00:00
rin 4516a07eeb PR port-alpha/57511 Temporally disable secure PLT for alpha
until support is added to ld.elf_so(1).
2023-07-07 08:33:25 +00:00
martin dbf4e096ae Fix locking error when setting the multicast filter to accept all
multicast frames, pointed out by Lwazi Dube.
2023-07-07 07:22:18 +00:00
rin 9c0183255f virtio(4): Fix byte order of DMA data for armeb in the same manner as
aarch64eb.

Fix comments to explain what is going on for {arm,aarch64}eb on QEMU.
This is not due to QEMU bugs; it correctly configures everything for
little-endian environment, and we forcibly change byte order only for
CPU cores during kernel bootstrap.
2023-07-07 07:19:36 +00:00
rin b2eb12c7ba Remove extra whitespace inserted during merge. No binary changes. 2023-07-07 07:04:17 +00:00
rin 1267710ee7 Remove duplicate OpenBSD RCSID. 2023-07-07 07:02:59 +00:00
rillig 06b8093259 lint: only skip 'unused' warnings after errors, not other warnings
Previously, in -w mode, any warning suppressed further 'unused'
warnings, even though there was no need to do that.  This can be seen in
the test gcc_attribute_var.c, where only the last unused variable from a
function was marked as unused, the others slipped through.

Fixed by counting the errors and the warnings separately and only
combining them if actually desired.
2023-07-07 06:03:31 +00:00
msaitoh db06c1e0c0 tprof(8): Add support for Skylake-X and Cascade Lake. 2023-07-07 04:43:15 +00:00
msaitoh 068060949b Modify comment. No functional change. 2023-07-07 04:37:03 +00:00
riastradh 67e5e79509 select(2), poll(2): Clarify return values. 2023-07-07 01:31:25 +00:00
rillig 62962fdef2 tests/lint: test all combinations of {func,obj}_{decl,def}
For a non-static function definition that is not declared in a header,
lint doesn't currently warn.  The previous test didn't notice this.
2023-07-07 00:25:23 +00:00
rillig a9b749ce7a tests/lint: merge duplicate tests for C11 _Atomic 2023-07-07 00:20:39 +00:00
jschauma becf7fe907 +CAC - cryptographic access control 2023-07-06 21:10:15 +00:00
riastradh 7d87cccbb2 t_sig_backtrace: Flush stdout before writing to STDOUT_FILENO.
Avoids confusing ordering of output.
2023-07-06 20:44:55 +00:00
rillig f7ab48a605 lint: add type safety for accessing properties of basic types
No functional change.
2023-07-06 07:59:00 +00:00
rillig bff65bdad9 tests/lint: ensure consistent preprocessor filenames in tests
The deviations often happen when copying or renaming tests.
2023-07-06 07:33:36 +00:00
msaitoh 7c95744288 Add Alder Lake-N. 2023-07-06 02:43:44 +00:00
uwe 5c44d8113a bsdmalloc(3): fix malloc() signature 2023-07-06 01:32:52 +00:00
riastradh d2876e0fc7 tests/libexec/ld.elf_so: Fix helper library makefiles.
1. Consolidate logic into a single helper.mk to reduce duplication.
2. Set NO* variables, not MK* variables which are reserved for user.
3. Avoid eager X!= in favour of lazy ${X:sh}.
4. Mark _g.a set list entries obsolete.  Never should've been built!

PR misc/57462
2023-07-05 22:42:46 +00:00
riastradh d5888fcbdb libbsdmalloc: Use a multiply-overflow that clang supports too.
XXX pullup-10
2023-07-05 22:13:20 +00:00
lukem 2b1fd0414c BUILDING: wording tweaks 2023-07-05 16:41:12 +00:00
lukem 0ae90b729a mk.conf(5): document rump variables
Update mk.conf(5) with the rump variables from
- lib/librumpuser/README.compileopts
- sys/rump/README.compileopts

Add cross-references back to mk.conf(5) in those files.

Ensure that the Default: is listed last in a description,
for consistency with the convention in this file.
2023-07-05 16:40:33 +00:00
palle fcbcc39cb9 Update build instruction for Solaris 11.4 hosts 2023-07-05 16:26:29 +00:00
riastradh bf2cc18785 t_posix_memalign: Simplify.
No functional change intended.
2023-07-05 12:09:39 +00:00
riastradh 9e6ac21a6f libbsdmalloc: Make aligned_alloc(A, S) actually align when A > S.
XXX pullup-10
2023-07-05 12:08:49 +00:00
martin 1095510aed Fix sysctl invocation testing for missing entropy. 2023-07-05 12:07:21 +00:00
riastradh ec5bc5eca5 t_posix_memalign: Fix this to reflect restriction lifted in C17. 2023-07-05 11:43:05 +00:00
rillig 1603ef6585 tests/lint: spell platform identifiers for 'long double' consistently
The test file names don't have a hyphen, so the identifiers shouldn't
have one either.
2023-07-05 11:42:14 +00:00
rillig 581fbf1bfe tests/lint: add platform-specific tests for troublesome pointer casts 2023-07-05 11:36:56 +00:00
riastradh 976fa97423 Revert "fsck_ffs(8): Ensure A divides S before aligned_alloc(A, S)."
C17 lifted this restriction.
2023-07-05 10:59:08 +00:00
riastradh 1e73453c9d Revert "newfs(8): Ensure A divides S before aligned_alloc(A, S)."
C17 lifted this restriction.
2023-07-05 10:58:58 +00:00
riastradh e1ba8d75ab Revert "nvmectl(8): Ensure A divides S before aligned_alloc(A, S)."
C17 lifted this restriction.
2023-07-05 10:58:46 +00:00
riastradh c9e3880ca2 libbsdmalloc: Lift C11 divisibility restriction on aligned_alloc.
Restriction was lifted in C17.

XXX pullup-10
2023-07-05 10:57:44 +00:00
riastradh 82ab0d8bb4 Revert "jemalloc: Enforce alignment-must-divide-size rule of aligned_alloc."
Apparently this restriction was lifted in C17, and this was even
documented in a part of the man page I didn't notice because I got
stuck at the incomplete sentence `The aligned_alloc function conforms
to.'.  Sorry for the noise, folks.
2023-07-05 10:57:33 +00:00
nia 218e68f1dc Updates for ctwm-4.1.0 2023-07-05 08:39:24 +00:00
rillig 3cc9538e51 bsdmalloc.3: fix typos in function parameters 2023-07-05 07:13:56 +00:00
msaitoh 1f3afd7cc6 CPU model 0x5a is not Atom E3500 but Atom Z3500. 2023-07-05 02:54:37 +00:00