locale: rewrite cldr2def in lua
Since only UTF-8 locales are generated, the cldr2def can be greatly
simplified, while simplifying it, just rewrite it in flua so the entire
tool generation do not depend on perl at all anymore
locale: merge mkwidths.pl into getwidths
mkwidths.pl only mapped the code points printed by getwidths to their
Unicode names. Read the charmap and do the mapping in getwidths
itself, so the widths table is produced by a single process.
virtio_gpu: check the vt(4) attach and detach results
The driver recorded a framebuffer attachment vt_allocate() had refused,
and freed the framebuffer when vt_deallocate() failed, leaving vt(4)
drawing into freed memory.
MFC after: 3 days
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D62169
man4: install nda.4 on powerpc64
nda(4) is built into the powerpc64 kernels and is the default NVMe disk
driver, but its page was only installed on amd64 and i386.
Approved by: jhibbits (blanket)
linux.4: add powerpc64 and powerpc64le to HISTORY
The Linuxulator works on powerpc64 and powerpc64le in 16.0, so list
them next to the other architectures.
Reviewed by: ziaee (manpages)
Differential Revision: https://reviews.freebsd.org/D62511
powerpc64: read the whole time base in a single mftb
get_cyclecount() reads the time base in two halves and glues them
together. If the low half wraps between the two reads, the value jumps
ahead and then seems to go backwards. On powerpc64 a single mftb
returns all 64 bits, so just use that.
Approved by: jhibbits (blanket)
MFC after: 1 week
dtrace/powerpc: take probe arguments from the trap frame
dtrace_getarg() looked for the trap frame by walking the stack and did
not find it, so an fbt probe's arguments after the fifth could not be
read. dtrace_invop() already saves the frame for this, as it does on
the other architectures; use it. Hand the ERROR probe its sixth
argument the same way, so that DTrace can report an error instead of
failing in its own ERROR probe.
Reported by: llm-postcr
Approved by: jhibbits (blanket)
MFC after: 1 week
sdt: skip one more frame on 32-bit powerpc too
sdt_dtrace_probe() has a frame of its own on 32-bit powerpc as well:
the compiler doesn't turn its call to dtrace_probe() into a tail call
there either. stack() and caller of sdt probes still began in
sdt_probe().
Reported by: llm-postcr
Approved by: jhibbits (blanket)
Fixes: 56e4c92d5412 ("sdt: skip one more frame on powerpc64")
MFC with: 56e4c92d5412
man4: install ipmi.4 and ossl.4 on powerpc64
Both drivers are built for powerpc64 and powerpc64le, and ossl.4 lists
powerpc64 among its architectures, but the pages were only installed on
amd64, i386 and aarch64.
Approved by: jhibbits (blanket)
man4: install linux.4 on powerpc64
The Linux ABI modules are built for powerpc64 and powerpc64le now, but
the manual page was still left out there.
Approved by: jhibbits (blanket)
powerpc/powernv: keep the OPAL I2C request within one page
opal_i2c_transfer() gives firmware the physical address of a request
that it keeps on the stack. The pages of a kernel stack aren't
physically contiguous, so firmware would read a request that crosses a
page boundary partly from some unrelated page, and take the size and
the address of the data from there.
Align the request so that it can't cross a page.
Reported by: llm-postcr
Approved by: jhibbits (blanket)
MFC after: 1 week
powerpc/powernv: bounce OPAL I2C data that crosses a page
opal_i2c_transfer() gives firmware the physical address of the first
byte of a message, and firmware reads or writes the whole message from
there. The pages of the buffer aren't physically contiguous: iic(4)
uses malloc() for up to 64k, and kernel callers often use the stack.
So the part after the first page boundary was read from, or written
to, some unrelated page.
Copy such messages through a contiguous buffer.
Reported by: llm-postcr
Approved by: jhibbits (blanket)
MFC after: 1 week
ObsoleteFiles.inc: Really fix two old paths
I misunderstood how MANSUBDIRS used to work; we need both versions.
Fixes: 1eb959c52c68 ("ObsoleteFiles.inc: Correct two old paths")
(cherry picked from commit 31a1632f65bdad8f1634173dab1cd673ecb5caf1)
ObsoleteFiles.inc: Really fix two old paths
I misunderstood how MANSUBDIRS used to work; we need both versions.
Fixes: 1eb959c52c68 ("ObsoleteFiles.inc: Correct two old paths")
(cherry picked from commit 31a1632f65bdad8f1634173dab1cd673ecb5caf1)
ObsoleteFiles.inc: Really fix two old paths
I misunderstood how MANSUBDIRS used to work; we need both versions.
Fixes: 1eb959c52c68 ("ObsoleteFiles.inc: Correct two old paths")
xhci: Compute isochronous TBC and TLBPC from the burst size
TBC and TLBPC count bursts of bMaxBurst + 1 packets, but they were
computed from the Mult field, so the TRBs of SuperSpeed endpoints did
not match the endpoint context when bMaxBurst was not zero.
Bits 12:11 of wMaxPacketSize are reserved on SuperSpeed endpoints, so
stop adding them to the packet count, which would otherwise make the
Max Burst Size of the endpoint context disagree with bMaxBurst.
A zero length TD is one packet, so its TLBPC is zero.
Sponsored by: The FreeBSD Foundation
toeplitz: Bound the key by its length
toeplitz_hash() takes the length of the key but read RSS_KEYSIZE bytes
of it whatever that length was: past the end of a shorter key, and not
all of a longer one. Bound it by the length it is given. The callers,
the RSS hash and the multipath hash in in_fib.c and in6_fib.c, all pass
40-byte keys, RSS_KEYSIZE, so nothing changes for them.
toeplitz.c no longer needs <net/rss_config.h>.
Sponsored by: Rubicon Communications, LLC ("Netgate")
sdt: Don't clear a probe's ID when disabling it
A thread may have jumped out of a tracepoint but not yet loaded the
probe ID when sdt_disable() clears it. It then calls dtrace_probe()
with ID 0, which reads far past the end of the probe array.
Leave the ID set. dtrace_probe() does nothing for a disabled probe,
and sdt_enable() sets the ID each time.
Reviewed by: markj
MFC after: 1w
Co-authored-by: Claude Opus 5.5
Differential Revision: https://reviews.freebsd.org/D62154
(cherry picked from commit ef6d8eb703b959a91c28222a20b3f3a04ba4ff1a)
amd64/sdt: Use a single NOP for disabled probes
sdt_tracepoint_restore() wrote five one-byte NOPs. A thread
interrupted between them could resume in the middle of the jump
written when the probe was next enabled, and run its displacement
as instructions. Write the single five-byte NOP that the compiler
emits for _SDT_ASM_PATCH_INSTR instead.
Reviewed by: markj
MFC after: 1w
Co-authored-by: Claude Opus 5.5
Differential Revision: https://reviews.freebsd.org/D62153
(cherry picked from commit b8180220627577c403b04de3647ac631798fdb8b)
i386/sdt: Use a single NOP for disabled probes
On i386, both _SDT_ASM_PATCH_INSTR and sdt_tracepoint_restore()
used five one-byte NOPs. Use "leal %ds:0(%esi,%eiz,1), %esi"
[12 lines not shown]
zfs: merge openzfs/zfs at 17d376863
Notable upstream pull request merges:
#19318 9a9729c0d brt: forget the vdev array when freeing iT
#19336 -multiple Disable Direct I/O nopwrite for blocks with a pending free
#19767 148f6883a Don't trust dn_maxblkid for power-of-2 blocks in
dmu_read_impl()
#19773 258d9d71f libzfs: estimate a clone's first snapshot from its origin
#19780 a45cdc032 arc_read(): allocate the read buffer before inserting the
header
#19865 81753509f dsl: preserve atomic batch snapshot destruction
#19872 -multiple FreeBSD: honour the VOP_RENAME() flags
#19812 fe2c5fe60 Don't lose available space while block clones sync
#19817 6a1475566 libzfs: FreeBSD: retry an unmount a mount update holds
busy
#19836 -multiple anyraid: fail the creation when a disk is too small or
fails to open
#19849 4bc572f2d anyraid: allow a child capacity of 65536 tiles
#19864 81c421c69 raidz: lock the full allocation during expansion
[22 lines not shown]
zfs: merge openzfs/zfs at 443d76f01
OpenZFS 2.4.5
Notable upstream pull request merges:
#18093 -multiple L2ARC: Rework write throttling with DWPD rate limiting
and parallel writes
#18179 4fa094912 Allow rewrite skip cloned and snapshotted blocks
#18310 5096951f8 Remove forced zfs_umount() from zfs_resume_fs() bail path
#18387 90b632b05 Handle raidz errors <= nparity rather than ignoring
#18718 -multiple zfs_zget and zfs_vget has inconsistent for unlink
#18812 029766eda dbuf: use dirty record size for overridden writes
#18819 -multiple ddt: fix refcount bypass and gang member leak for dedup
gang blocks
#18822 e5decdeb5 dnode_sync: Relax constraint on indirect freeing
#18826 -multiple FDT: don't extend dedup across RAIDZ expansion
#18853 6ff08fa49 Fix double free when cloning a block with a pending free
#18861 ed3ce9102 Fix out-of-bound access when resizing in receive_spill
#18897 93e458c12 arc: fix race between arc_release() and arc_read_done()
[77 lines not shown]
nfs_clnfsiod.c: Fix a race related to thread startup
This patch ensures that the new thread is handled correctly.
PR: 300581
Reviewed by: rmacklem
MFC after: 2 weeks
nfscl: Remove cruft for NFSv4.0 callbacks
Commit 71ac1ec5c9d9 disabled callbacks for NFSv4.0.
This commit cleans up cruft related to NFSv4.0 callbacks.
Since callbacks are disabled for NFSv4.0, this patch
should not have any semantics effect.
A future commit will clean up the nfscbd(8) daemon.
MFC after: 2 weeks
ObsoleteFiles.inc: Correct two old paths
At the time we retired the cp(4) driver, we still had per-arch man
subdirectories.
Fixes: 895992bb66d2 ("retire cp(4) driver")
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D62503