Commit Graph

303963 Commits

Author SHA1 Message Date
riastradh c73729f0bb t_dlinfo, t_rtld_r_debug: Audit ATF_REQUIRE/CHECK, sprinkle messages.
Make sure to use ATF_REQUIRE when the subsequent code doesn't work if
the check fails.
2023-11-24 17:40:20 +00:00
riastradh e441ef5517 rtld tests: Don't use RZ for dlinfo.
Use

	ATF_REQUIRE_EQ_MSG(dlinfo(...), 0, "dlinfo: %s", dlerror())

instead, in order to accurately report the error on failure.  RZ is
only for functions like pthread_create(3) that return zero on success
and errno(3) code on failure, but dlinfo returns -1 on failure and
sets dlerror() to report the nature of the error.
2023-11-24 17:40:09 +00:00
riastradh ef23f679e4 tests: Audit RZ abuse.
RZ succeeds if x is zero, and fails if x is nonzero, treating a
nonzero value as a error number as in errno(3) to print the message.

The following library routines instead return -1 on failure and set
errno to the error code:

fuse_opt_add_arg
fuse_opt_add_opt
fuse_opt_add_opt_escaped
fuse_opt_insert_arg
lseek
system

So use RL instead for those -- succeeds if x is zero, and fails if x
is -1.

This shouldn't make any tests newly fail or newly succeed -- the
functions in question only ever return 0 or -1 -- but if the tests
were already failing anywhere, they will now fail with meaningful
messages.

TBD: dlinfo, which isn't fit for RL or RZ since it reports errors via
dlerror() rather than errno.
2023-11-24 17:31:03 +00:00
christos e757b4ce33 t_setrlimit uses alloca now 2023-11-24 17:19:55 +00:00
christos e43fe3179e Make this compile again with options RESIDUAL_DATA_DUMP (Andrius V) 2023-11-24 16:49:59 +00:00
riastradh 8f4b2a189f t_rnd: Nix trailing whitespace.
No functional change intended.
2023-11-24 16:36:23 +00:00
riastradh 290ca0f2a9 t_rnd: Fix misuse of RZ.
Not likely to matter, but in the unlikely event that rump_sys_close
fails, it will return -1 and set errno as RL expects, not return the
error code as RZ expects.
2023-11-24 16:35:51 +00:00
riastradh 5b36b4ea47 pthread: Add tests for pthread user stack allocation.
PR lib/57721

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-24 16:21:17 +00:00
brad 2b390b836b Style changes. No functional change. 2023-11-24 15:13:35 +00:00
rin ed0e6dc14c share/man/man7/Makefile: Hook stack.7 2023-11-23 23:29:42 +00:00
riastradh 3c3bf573d7 stack(7): Consistently say `(in)accessible pages', not `... stack'.
PR pkg/57708

XXX pullup-10
2023-11-23 21:44:55 +00:00
riastradh bfb59bbae5 stack(7): Clarify some wording and diagrams.
PR pkg/57708

XXX pullup-10
2023-11-23 21:30:03 +00:00
riastradh 623621d665 stack(7): Clarify thread stack guard vs program stack guard.
Just in case this confuses anyone dealing with PR pkg/57708.

XXX pullup-10
2023-11-23 21:27:08 +00:00
riastradh 001acc2f8e stack(7): New man page.
Should help with PR pkg/57708.

XXX pullup-10
2023-11-23 21:20:49 +00:00
riastradh 1166ce8489 share/man/man7/Makefile: Split MAN on separate lines, and sort.
Makes sorting and merging changes easier.

No functional change intended.

Preparing for a new stack(7) in the service of PR pkg/57708.

XXX pullup-10
2023-11-23 21:16:13 +00:00
andvar 25d314a112 Few more changes for playstation2 specific code to adapt to interface or method
declaration changes. Still long way before port code can be built though...

reviewed by martin.
2023-11-23 20:40:08 +00:00
rjs 8b9f9ee36e Include some more files.
Add a build-id note to gallium.
2023-11-22 17:48:35 +00:00
riastradh fdf689ec4f vfs(9): Make sure to kpause at least one tick, not zero.
kpause(9) forbids zero.

Local workaround for wider problem in PR kern/57718, to address
immediate symptom of crash on any system with hz=50, e.g. alpha in
qemu:

panic: kernel diagnostic assertion "timo != 0 || intr" failed: file "/usr/src/sys/kern/kern_synch.c", line 249

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-22 13:19:50 +00:00
riastradh 4cb23c1777 kpause(9): KASSERT -> KASSERTMSG
PR kern/57718 (might help to diagnose manifestations of the problem)
2023-11-22 13:18:48 +00:00
martin 2bf4702d1d PAGE_SIZE will not evaluate to a vaddr_t expression on all architectures
(e.g. sparc), so cast it to that.
2023-11-22 12:15:09 +00:00
yamaguchi 3a6bbf5f61 lagg(4): Added logs about LACP processing 2023-11-22 03:52:58 +00:00
yamaguchi 71d2a73a59 Set the fastest linkspeed in each physical interface to lagg(4) 2023-11-22 03:49:13 +00:00
yamaguchi 6e31a1b0ed Set ETHERCAP_VLAN_HWTAGGING on lagg(4)
that doesn't has physical interfaces
2023-11-22 03:30:57 +00:00
yamaguchi 9252591906 lagg(4): Fix missing pfil_run_hooks() and bpf_mtap() 2023-11-22 03:28:57 +00:00
yamaguchi 0cc830439a Update sending interval when the partner's state is changed 2023-11-22 03:27:00 +00:00
yamaguchi 4a3046a2c9 Change LACPDU sending interval by TIMEOUT bit in partner's state 2023-11-22 03:23:54 +00:00
riastradh 6cfac959ea t_setrlimit: Fix typos in comments and messages.
No substantive change intended.  Suggested by rillig@.

PR kern/57711

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-22 02:20:34 +00:00
thorpej 699823c2cb Add Alpha glue for crash(8). 2023-11-22 02:01:07 +00:00
thorpej 541de8cd15 Changes to let the Alpha DDB code build in user-space for crash(8). 2023-11-22 01:58:02 +00:00
thorpej 4d8e1c8841 If not _KERNEL, include <stddef.h> to make sure we have offsetof(). 2023-11-22 01:56:14 +00:00
gutteridge 0a4cb760d3 pci_machdep.c & pci_msi_machdep.c: comment fixes
Correct spelling and grammar in some comments.
2023-11-21 23:22:23 +00:00
gutteridge cd080f1e3c if_wm.c: fix spelling and grammar in a comment 2023-11-21 23:09:40 +00:00
thorpej 30e97ef49a Expose alpha_print_instruction_context to not-_KERNEL. 2023-11-21 22:27:41 +00:00
thorpej bb5982f8bb pal_opname(): Make the static buffer for unknown PALcode ops large enough
to hold all possible values.
alpha_print_instruction(): Make this private if not-_KERNEL.
2023-11-21 22:25:16 +00:00
thorpej 2d93273ebd Move alpha/alpha/db_instruction.h -> alpha/include/alpha_instruction.h 2023-11-21 22:19:12 +00:00
thorpej 4130e3fd1a Ensure that all fields of db_regs[] are initialized. 2023-11-21 21:53:06 +00:00
thorpej eea5a8dc2f Adjust proc/lwp access for user-space (crash(8)). 2023-11-21 21:23:56 +00:00
thorpej 94d7e4ea33 Reduce db_trace.c's exposure to proc/lwp. 2023-11-21 20:40:24 +00:00
thorpej e3bf466230 decode_prologue(): Make pc a db_addr_t, not a db_expr_t.
db_stack_trace_print_ra(): Missed one direct reference to XentSys; fix.
2023-11-21 20:29:47 +00:00
thorpej 8a3d61b79c Refactor the special symbol handling out of db_trace.c into
db_interface.c, and abstract it away from having to read kernel
symbols directly.
2023-11-21 19:59:07 +00:00
thorpej f5ae7971ac Don't access insns or frame values directly; use db_read_bytes(). 2023-11-21 18:57:29 +00:00
thorpej df08d03b69 Don't open-code tailq access. 2023-11-21 17:52:51 +00:00
riastradh 82de273b52 pax(9): Rework header file more coherently to nix some needless #ifs.
Cleans up some of the fallout from PR kern/57711 fixes.

Could do a little more to nix PAX_SEGVGUARD conditionals but maybe
not worth it.
2023-11-21 14:35:36 +00:00
riastradh fddc6b2f61 ddb: New db_stack_trace_print_ra.
Takes an optional extra argument for the return address so that the
stack parser has a chance to use instruction-dependent interpretation
of the frame to find parent frames.

Implemented only on Alpha for now, which needs it.  Other
architectures just ignore the extra argument.

PR port-alpha/57716

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-21 14:35:01 +00:00
martin 0d92cf4b8d Stopgap build fix for kernels w/o PAX_MPROTECT after the fixes
for PR 57711: mark variable as unused (sometimes, e.g. in macppc kernels).
2023-11-21 12:12:26 +00:00
riastradh bf53af405a exec: Map noaccess part of stack with prot=NONE, maxprot=READ|WRITE.
This way, setrlimit(RLIMT_STACK) can grant READ|WRITE access when
increasing the stack size.

PR kern/57711

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-21 00:09:18 +00:00
thorpej 9c0baf1c81 pciide_dma_dmamap_setup(): If we end up with a DMA segment with an odd
length or odd starting address, unload the map and return EINVAL.  Some
controllers get really upset if a DMA segment has an odd address or length.
This can happen if a physio user performs a virtually-contiguous I/O that
starts at an odd address and spans a page boundary where the resulting
physical pages are discontiguous.  The EINVAL return will cause the upper
layers in the ATA code to re-try the I/O using PIO, which should (will
in all of my tests) succeed.

PR port-alpha/56434
2023-11-20 21:59:38 +00:00
thorpej 60465b0c92 Revert previous. I'm going to make a slight change to the patch, and
want it collapsed into a single commit to make it easier to pull into
netbsd-10.
2023-11-20 21:45:34 +00:00
jschauma 6f86118736 sort 2023-11-20 21:16:41 +00:00
jschauma 52a375a636 +ML-KEM module-lattice based key-encapsulation mechanism
(I previously added "KEM", but now that Kyber is ML-KEM it comes up frequently
enough that 'wtf ml; 'wtf kem' doesn't help folks find the answer.)
2023-11-20 21:11:20 +00:00