Reject d_secsize exceeding MAXPHYS in (init|set)disklabel
readdisklabel() reads one sector into one buffer with
geteblk(d_secsize), and vnd(4) takes d_secsize from userland. The
buffer cache allocates kva one MAXPHYS slot per buffer but maps and
unmaps b_bufsize worth of it, so an oversize sector lays one buffer
across the slots that follow and unmaps them when it is freed, leaving
other buffer users with a b_data that is no longer mapped.
ok krw@
Reported-by: syzbot+aed2c23886430a6eaedb at syzkaller.appspotmail.com
Some corrections and updates in the introductory paragraph:
* From 1979 to 1989, not only AT&T UNIX used man(7), but so did all other
Unix-like systems including BSD, SunOS, and all the others.
* While the statement that man(7) was "purely presentational" was
mostly (though not entirely) true when written, it is no longer
accurate. A number of semantic macros have since been added, even
though far less systematically than in mdoc(7).
* Mention the situation in Linux and GNU roff. Knowing about that is
relevant for all, including our users, because it means people will
continue to find many man(7) pages in the wild, including some that
will fail badly with old versions of groff(1).
* Point to GNU roff documentation for the unlikely case that someone
sees themselves forced to write new man(7) code.
About half of the the ideas and a few wordings were suggested to me
by G. Branden Robinson.
ttys(5): a few editorial cleanups
- name init(8) as the primary consumer of /etc/ttys and use login(1) and
ttyflags(8) as example users of the getttyent(3) interface.
- rewrite the on/off/secure more simply
- modernize EXAMPLES
- add .Xr terminfo(5) to SEE ALSO
- minor grammatical tweaks
ok sthen@
Clarify that the -T ps and -T pdf output formats are experimental,
produce low-quality output, and that mandoc(1) is not a
typesetting system. This should really have been clarified
in this manual page many years ago because producing a typesetting
system has never been a development goal, not even a long-term goal.
Also delete the EXAMPLES entry involving -T ps because that entry puts
undue emphasis on it and can be misconstrued as a recommendation
to use that mode for any particular purpose.
The general idea for this clarification came up talking
to G. Branden Robinson on <groff at gnu.org>.
switch aarch64 CPU feature detection to elf_aux_info()
ok kettenis@ tb@
Restore commit; install media build error is not reproducible (deraadt@)
or was operator error (naddy@)
sys/uvm: unwind failed amap copies
A PR_NOWAIT chunk allocation in amap_copy() may fail after earlier
chunks already contain copied anons; amap_free() requires an empty amap,
so direct cleanup trips its diagnostic assertion or leaves copied anon
references orphaned which may end who knows how.
Uuse amap_wipeout() instead to reverse the partial copy, release the
shared lock, and free the temporary amap.
OK: kettenis@
When an escape sequence that requires an argument occurs at the end of an
input line and the argument is missing, abort parsing the line and report
an "incomplete escape sequence" error.
This fixes a read buffer overrun that Josiah Frentsos <jfrent at tilde.team>
sent a different patch for. Instead of always entering the argument
parsing code and detecting that there is no argument at two places in
the middle of that code, as Josiah proposed, i chose to instead check
up front that there is anything that can be parsed to begin with.
Also reminded by deraadt@, thanks!
devel/cargo module: add MODCARGO_LIBTEST_ARGS variable
in order to pass arguments to LIBTEST (cargo test subsystem) and not to cargo
itself, provides a specific variable.
from Andrew Kloet (.net)
Restore the OCSP no-check extension method
The conversion of X509V3_EXT_get_nid() from a table to a switch
omitted the OCSP no-check extension method.
Add the missing accessor declaration and switch case.
ok tb@
Improve imsg code, switch to imsgbuf_get and use more imsg_get_data
Switch the IMSG_HOST_DNS call to use imsg_add_strbuf and imsg_get_strbuf.
Also use NI_MAXHOST for the name length.
Also rework IMSG_PW_ENTRY and IMSG_GRP_ENTRY to use imsg_get_len()
and imsg_get_data() to fetch the record. Ensure that the data length
is large enough but not too large to fit into &ir.
ok jmatthew@
The previous fix to bus_dmamap_load() wasn't quite right. We do need
virtual address continuity when we're bouncing. So a !bounce check
was correct, but only in the case when DMA is cache coherent. Note that
this becomes identical to the amd64 equivalent of this code when one
considers that on amd64 DMA is always cache coherent.
ok deraadt@, jca@
pkgconf: simplify unveil handling
Instead of giving fine-grained read access by iterating, use a simple
unveil("/", "r"). pkgconf runs with pledge "stdio rpath wpath cpath unveil"
with closed unveil, and only /dev/null and an optional log file have "rwc".
discussed with deraadt a long time ago, agreement by claudio
ok sthen
relayd: allow setting log level from relayd.conf
Add "log level (brief|verbose)" which sets or clears RELAYD_OPT_VERBOSE
just like relayctl log verbose|brief does at runtime.
This makes sense now because the recent DPRINTF removal turned all
DPRINTF calls into real log_debug calls. Some debug logs moved to
warning. Some remained DPRINF().
Before that change the toggle had almost nothing to gate. All debug
output was compiled out unless relayd was built with DEBUG > 1. So
"log verbose" in relayctl was practically a no-op for users.
It was impossible for the user to work out why the setup/config wasn't
working.
Now the toggle actually does what its name suggests. Pinning the
level in the config file lets it survive restarts and SIGHUP reloads.
OK kirill@
add some options to allow setting or clearing the touch-required
and verify-required flags on FIDO private keys when resetting
the passphrase.
feedback/ok tb@