File systems can provide a pointer to private data to fuse_main(3)
or fuse_new(3). However, if the file system implements init() then
this will be replaced by the return value of init(). If a file
system wants to keep the original value then it can retrieve it by
calling fuse_get_context(3).
OK claudio@
use sshpkt_fatal instead of plain fatal() for errors in the packet
code as this provides context of the failing peer (address, port,
user, etc). Based on patch from Dag-Erling Smørgrav
Don't attempt to validate the mount directory during option parsing.
Instead, check the result of realpath(3) before calling mount(2)
and rely on this to confirm that it is indeed a directory.
File systems like ntfs-3g that don't call fuse_parse_cmdline(3)
will now print an error message if the directory doesn't exist
rather than silently failing.
OK claudio@
sys/uvm: fix uao_dropswap() index typo
The loop variable indexes the current pgs[] batch, not the page within
the object. Pass the fetched page's object offset to uao_dropswap(), as
the other resident page callers do.
OK: kettenis@
Unconditionally set cpuresetfn and powerdownfn. The K3 firmware that I'm
currently working with claims to implement the System Reset Extension,
but the reset doesn't actually work. Looking at the K1/K3 firmware
code reveals that the firmware would do the same thing as this driver,
so overriding these functions should be fine.
ok jsg@
ospf6d: preserve configured interface type on link update
When an interface undergoes a link state change (RTM_IFINFO),
if_update() unconditionally overwrites iface->type based on current
interface flags. This causes interfaces explicitly configured with "type
p2p" in ospf6d.conf to revert to broadcast (IF_TYPE_BROADCAST) on link
bounce.
Introduce F_IFACE_TYPE to track whether the interface type was set by
configuration, and only auto-derive the type from interface flags when
this flag is not set.
Reported and tested by Atanas Vladimirov.
OK claudio@
vmd(8): guard synchronous imsg channel with a mutex.
Serialize vcpu access to the synchronous imsg channel for communicating
PCI register access to virtio device child processes. If vmd ever
becomes MP, VCPUs could interleave during the io emulation on the imsg
channel.
Report and original diff by Andrew Griffiths. Modified to move the
mutex into the global state of the vm process instead of per-device.
ok hshoexer@
ice(4): enable use of 128 DMA segments for TSO packets again
This diff contains two fixes for the ice_tso_detect_sparse()
function to prevent the 'Too many data commands' error:
1. Replace wrong computation of nsegs with already
specified map->dm_nsegs from the DMA layer.
2. Reinstate ICE_MAX_TX_SEGS for max. No. of Segments
per MSS section.
Tested by bluhm
OK bluhm@, stsp@
Improve SHA-3 performance.
Replace the tiny-sha3 keccakf implementation with an unrolled and
interleaved algorithm, that is hidden away in an obsolete reference
implementation.
This gets us 3.3x speed up on arm64 (Apple M2), a 1.3x speed up on amd64
(Intel i7-1165G7) and 6x speed up on sparc64 (M3000).
ok tb@
Correctly handle bit count for SHA-512.
The SHA-512 bit counter is 128 bits - as such, we need to handle overflow
and increment the second 64 bit field.
Reported by claudio@
ok claudio@ tb@
Automatically detect IPv6 support and test IPv6 parsing if found.
This should always be enabled on OpenBSD, but allows us to use the same
test in Portable without modifications that make syncs harder.
Factor out all of the IPv6 addresses into variables. This lets us skip them
in Portable on platforms that don't support IPv6 all in one place, removing
diffs from within the tests themselves and making syncs easier.
getty(8): IXANY is an input flag, not a local flag
The dx gettytab capability was a no-op, fix this so the capability behaves
as intended.
Original fix was submitted by Piotr Durlej in 2024. We applied half of
that fix at the time. Now apply the other half of the originally submitted
fix.
ok millert@
If a session drops from add-path send to no add-path send then the
adj-rib-out needs extra cleanup in up_generate_updates().
In the EVAL_SYNC case up_generate_updates() should check if the
adjout_prefix (p) returned was for an add-path path. This is the case if
path_id_tx is not 0. In that case withdraw all paths before calling
up_process_prefix().
The add-path side already does this by default.
OK tb@
vmd(8): check for under reads/writes when copying qcow2 clusters.
Report and original diff by Andrew Griffiths. Corrected to handle
logging when errno was not set by pread(2)/pwrite(2).
ok hshoexer@, mlarkin@, bluhm@
Set flags for Power ISA 2.06, 2.07, isel, and vec crypto
These are for elf_aux_info(3) AT_HWCAP or AT_HWCAP2. The vec crypto
flag is for accelerating AES and SHA-2. Some ports check these flags,
or will check them if they get patched to call elf_aux_info.
Define PPC_FEATURE2_VEC_CRYPTO with the same value as
PPC_FEATURE2_HAS_VEC_CRYPTO, because I have seen code using the name
without HAS.
ok kettenis@
netinet6: keep negotiated IPv6CP IFID unchanged for link-local address
When sppp/PPPoE installs a peer-suggested IPv6CP interface identifier,
in6_ifattach_linklocal() forced EUI64 G/U bit adjustments on the
provided IFID. This unconditionally set the universal bit, rewriting a
valid negotiated IFID like ::1 into ::200:0:0:1, yielding
fe80::200:0:0:1 instead of fe80::1.
RFC 5072 Section 5 specifies that the PPP link-local address is formed
using the negotiated Interface Identifier as-is. Skip EUI64 bit
modification on point-to-point interfaces. Non-P2P callers retain
existing behaviour, while callers passing NULL continue using
in6_get_ifid().
Reported by Martin Crossley <admin AT crossleys DOT biz>.
OK stsp@