1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-17 23:03:29 +02:00

245151 Commits

Author SHA1 Message Date
claudio b2ce4751b3 Implement bgscan, add hooks for set and delete key and improve mwx_stop
so that there is a better chance to recover after down/up.
On top of this implement mwx_activate() so that suspend/resume works.
None of this is perfect but hopefully good enough.

Tested on MT7921
2026-06-17 13:34:53 +00:00
helg 51cdf7b684 Everything needed to bring the FUSE kernel protocol in line with
the Linux implementation is now in place. With this update, the
kernel can support ports that talk directly to /dev/fuse0 rather
than relying on libfuse.

sys/fusebuf.h is retained rather than introducing fuse_kernel.h

OK claudio@
2026-06-17 13:29:01 +00:00
nicm 9f1303c651 Tidy up server_client_check_redraw. Get rid of the bitmask tracking
panes which want redraw for deferred clients - if they are deferred then
they can just have a full redraw instead. Also return earlier if no
redraw is actually needed, and improve the comments.
2026-06-17 13:22:48 +00:00
nicm f0fa2b8f70 Fix shifts to 1ULL and check scrollbar even if pane is not being redrawn. 2026-06-17 12:32:54 +00:00
tb ce3f70aa3b rpki-client: indent some out labels for consistency 2026-06-17 08:47:28 +00:00
tb abb34060f5 rpki-client: unify CMS signed object parsers
This commit starts unifying various CMS signed object parsers in
preparation for a lot more refactoring of this long-accumulated
copy-paste mess.

The signed object is passed as a void * object to various handlers, so
these handlers all have the same signature.

In this step, *_parse() is essentially split into allocation plus:

1. *_cert_info(), which checks some basic things on the EE cert (usually
   inheritance, presence or absence of RFC 3779 extensions). For MFTs
   it also extracts some info and hangs that off mft.

2. the already existing *_parse_econtent()

3. *_validate() that does some validation steps and sets ->valid.
   In most signed object handlers the validate step can't currently
   fail. This is one of the many warts we've accumulated and is marked
   with an /* XXX */.

This is all straightforward and should not change anything.

The reason cert_info comes after parse_econtent is that the latter
usually has some helpers and it is easier to reason about this if
the future struct members are somewhat close to each other.

ok claudio job
2026-06-17 08:22:21 +00:00
nicm 97f9edd570 Add -M to move-pane and default bindings for M-drag. From Michael Grant. 2026-06-17 07:52:21 +00:00
nicm 0ded08716e FIx a couple of minor errors in use of layout_cell_is_tiled. 2026-06-17 07:43:55 +00:00
millert 9bba069e63 Make the behavior of the '(' command match the ')' command.
Previously, the ')' command required a sentence to end with two
blanks, but '(' only required a single space.  Historic vi (and the
documentation) requires two spaces in both directions.

Based on a diff from Walter Alejandro Iglesias.
2026-06-16 22:59:03 +00:00
dtucker 95aaafce93 Factor out hex2bin into a shared helper function. Replace sscanf %hhx
(which is C99) with plain %x for better compatibility in -portable.
ok djm@
2026-06-16 22:27:10 +00:00
bluhm d92f77debe When releasing, read trace index before reference counter decrement.
When btrace(8) is active, refcounting is traced using an index field
to the dt(4) backend.  When two CPU simultaneously decrement the
reference count, one could free the object while the other is still
reading the index.  Move the load before the dec separated by a
membar.  Crashes seen while testing an experimental diff from dlg@.

OK cludwig@
2026-06-16 19:29:25 +00:00
hshoexer 2f229140c8 isakmpd: Fix NULL dereference in message_validate_sa()
When the responder cookie is non-zero but sa_lookup_by_header()
finds no matching SA, msg->isakmp_sa is NULL.  Thus check before
dereferencing.
2026-06-16 11:50:53 +00:00
dtucker 50d94f9ab6 Use awk instead of cut to help -portable.
Some platforms have size limits on cut.
2026-06-16 10:58:42 +00:00
nicm b13c09525e Rename the visible ranges functions since they really relate to windows
and put them nto a new file.
2026-06-16 10:47:35 +00:00
nicm 8a924ff760 Allow rectangle selection to extend past end of current line to behave
the same as vi with virtualedit=block set. From Mark Kelly in GitHub
issue 5227.
2026-06-16 09:28:17 +00:00
dtucker fb37e3accf Include stdarg.h for va_list (needed for xmalloc.h). 2026-06-16 09:00:47 +00:00
nicm 19d6ce4a78 Initialize wname so it we are not freeing garbage if it is not used. 2026-06-16 09:00:25 +00:00
nicm e867bf5b68 Fix resizing floating pane with a left scrollbar, from Michael Grant. 2026-06-16 08:57:07 +00:00
nicm 0c619e1cf8 Fix missing border when drawing floating panes. From Michael Grant. 2026-06-16 08:53:14 +00:00
dtucker 8bf0905d41 Include stdlib.h for malloc/free and sort headers. 2026-06-16 08:15:35 +00:00
nicm 3cf96d7d15 Fix default window check in break-pane, from Dane Jensen. 2026-06-16 07:07:49 +00:00
nicm 07c6c78897 Add layout_cell_is_tiled and layout_cell_has_tiled_child helper
functions, from Dane Jensen.
2026-06-16 07:06:32 +00:00
jsg 0baeb99d04 botton -> bottom 2026-06-16 05:01:56 +00:00
millert 268d15e32f Fix behavior of ')' used in a range when setence reaches EOF.
For a sentence spanning more than one line at the end of the file,
when the cursor is placed at the first character of any line except
for the last one, running '!)<cmd>' won't affect the last line.

From Walter Alejandro Iglesias
2026-06-16 02:15:14 +00:00
millert e0d9c349b9 Check for E_CLRFLAG in ecp->cmd->flags, not ecp->iflags.
Fixes a problem where an extra line is printed at the end of the
output when the "number" command is given the "l" (literal display)
flag.

From Jeremy Mates Walter Alejandro Iglesias and
2026-06-16 02:03:35 +00:00
nicm 4c8f4d2f10 Rename window_pane_visible to match other functions, from Dane Jensen. 2026-06-15 21:47:01 +00:00
nicm da8468681b Be more strict about what names and titles we allow and reject them
immediately when possible, but allow # again for those directly set by
commands (but not escape sequences). From Barrett Ruth in GitHub issue
5175.
2026-06-15 21:41:39 +00:00
nicm 3770940176 Add pane-border-lines none like popups (-B to new-pane). 2026-06-15 17:34:25 +00:00
tb fe1f371be0 rpki-client: reject certs with duplicate extension OIDs
We check this for extensions we know about in cert_parse_extensions().
We keep doing it there since we need to keep track of the extensions we
encountered anyway.

While cert_parse_extensions() rejects certs with critical extensions we
don't know about, we allow duplicate non-critical ones mainly because
that's annoying to keep track of. LibreSSL's libcrypto checks for this
and rejects the cert when caching the extensions, OpenSSL 4 adds a new
EXFLAG_DUPLICATE flag and accepts the cert, and OpenSSL 3 simply ignores
duplicates. In short: we get to do it ourselves.

This check is basically lifted from libcrypto's x509_purp.c with a few
extra contortions due to const sprinkling and making things opaque. The
warnx is the same as the one already present in cert_parse_extensions().

We do not NULL check X509_EXTENSION_get_object() because the extension
parsed, so an OID is present.

ok job
2026-06-15 17:30:04 +00:00
florian 3894b14b3d Prevent the engine from sending us a negative amount of routes.
Pointed out by Andrew Griffiths, thanks!
2026-06-15 17:09:29 +00:00
florian c0a817ed4d We need to accept one more route from the engine process.
Off-by-one pointed out by Andrew Griffiths, thanks!
2026-06-15 17:08:15 +00:00
florian a69b13d93c Make sure UDP header length field at least covers the UDP header.
We clamp the amount of data we are willing to parse to the length of
the UDP packet as indicated by the UDP header length field. While we
made sure that the length field did not point past the received data,
we never checked if the length is smaller than the udp header. Since
we are using BPF, the kernel also does not doe this for us. This might
in turn lead to an underflow and a subsequent crash of the engine
process.

Pointed out and diff provided by Andrew Griffiths, thanks!
2026-06-15 17:07:34 +00:00
nicm 071960dc61 If the client is blocked, defer the redraw because it may end up
partially discarded leading to redraw artifacts.
2026-06-15 15:05:12 +00:00
nicm 9bd110165a Convert cursor position back to pane coordinates for tty_cmd_cell. 2026-06-15 14:56:30 +00:00
job 10c123100a Add some guardrails to rsync_base_uri() against future programmer error
OK tb@
2026-06-15 14:45:19 +00:00
job 91fddc0d93 Tighten well-formedness checks on AIA & SIA extensions in certs
Valid Rsync URIs always contain a module component.

To avoid duplication of URI validation code, refactor rsync_base_uri()
to optionally allocate & dup the base URI portion.

Thanks to Ties de Kock for reporting.

OK tb@ claudio@
2026-06-15 14:30:53 +00:00
mvs 4baec750da Drop unused 'struct proc' argument from msg_copyin() and msg_copyout().
ok claudio
2026-06-15 13:41:47 +00:00
mvs 2c78b5fefe Make functions arguments list to be newer than K&R. Otherwise modern
Clang compiler produces warnings.

ok claudio
2026-06-15 13:40:41 +00:00
nicm f0c49bac36 Tidy up screen_redraw_get_visible_ranges by using a couple of
temporaries for start and end of range.
2026-06-15 12:07:49 +00:00
nicm e0d0f3a7d2 Use correct x position when drawing clipped line. 2026-06-15 11:45:51 +00:00
kirill 4bc4a388a4 sys/sparc64: accept ide nodes in IDE bootpaths
OpenBIOS reports QEMU IDE disks with an intermediate ide node, while the
sparc64 bootpath code only treats ata as a channel node.

The disk is attached as wd0, but the final disk component is not nailed
as the boot device, so the kernel asks for the root device.

No QEMU level option seems possible to enforce ata disk.

OK: claudio@
2026-06-15 11:35:19 +00:00
rsadowski 78600f9306 relayd: knfmt, no functional change
OK tb
2026-06-15 11:02:13 +00:00
jsg 81bb5dc40f fix indentation in local version of amdgpu_gem_fault() 2026-06-15 10:36:51 +00:00
nicm c8249f6768 Add -B to new-pane to select the floating pane border. 2026-06-15 09:21:40 +00:00
job 320aa6b0a9 Clear last_modified after each response on a persistent HTTP connection
(In case a later response doesn't contain its own "Last-Modified" header field.)

Reported by Ties de Kock.

OK tb@ claudio@
2026-06-15 09:20:21 +00:00
kevlo bff906b101 Add missing break
ok claudio@
2026-06-15 08:53:14 +00:00
nicm e258f212aa Add top-floating and bottom-floating to pane-border-status to show
status line only on floating panes.
2026-06-15 08:16:05 +00:00
nicm e015fbd1ed When redrawing a whole pane line, fall into tty_draw_line for any
characters that are not plain ASCII. Fixes redraw issues with partial
tabs and other wide characters when a pane is partly outside the window.
2026-06-15 07:40:45 +00:00
djm 955cfc7c55 use different strategy to check whether keys are present or absent
in the agent; helps some -portable tests on platforms that have
stupid grep(1)
2026-06-15 06:36:52 +00:00
jsg 632f324b7c more closely match how linux maps vram on xgmi parts
map cacheable not wc for xgmi parts connected to cpu on x86
don't try to map vram if there isn't any
2026-06-15 06:30:58 +00:00