HardenedBSD/src 4470d36 — share/colldef_unicode nn_NO.UTF-8.src zh_TW.UTF-8.src, tools/tools/locale/etc/final-maps widths.txt map.UTF-8

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+42,324-42,763share/colldef_unicode/zh_CN.UTF-8.src
+6,894-6,894share/colldef_unicode/ja_JP.UTF-8.src
+13,007-0tools/tools/locale/etc/final-maps/map.UTF-8
+12,357-1tools/tools/locale/etc/final-maps/widths.txt
+1,296-1,300share/colldef_unicode/zh_TW.UTF-8.src
+706-699share/colldef_unicode/nn_NO.UTF-8.src
+76,584-51,65748 files not shown
+93,495-67,72154 files

HardenedBSD/src 8f4d558 — share/colldef_unicode nn_NO.UTF-8.src zh_TW.UTF-8.src, tools/tools/locale/etc/final-maps widths.txt map.UTF-8

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+42,324-42,763share/colldef_unicode/zh_CN.UTF-8.src
+6,894-6,894share/colldef_unicode/ja_JP.UTF-8.src
+13,007-0tools/tools/locale/etc/final-maps/map.UTF-8
+12,357-1tools/tools/locale/etc/final-maps/widths.txt
+1,296-1,300share/colldef_unicode/zh_TW.UTF-8.src
+706-699share/colldef_unicode/nn_NO.UTF-8.src
+76,584-51,65748 files not shown
+93,495-67,72154 files

HardenedBSD/src 7d5c3cf — sys/dev/hid hid.c

hid: Account for truncated variable items in the report layout

When a variable main item has more than MAXLOCCNT usages, the parser
returns only MAXLOCCNT of them and never advances the position past
the rest.  Every later field in the report is placed too early and
hid_report_size() under-reports the report length.

On multitouch touchpads with large vendor reports this gives wrong
contact and button data when the fields share that report, and short
report buffers, so usbhid(4) and hidraw(4) truncate those reports.

PR:             300050

MFC after: 3 days

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D62523
DeltaFile
+6-0sys/dev/hid/hid.c
+6-01 files

HardenedBSD/src 1541273 — lib/libsys/tests Makefile

HBSD: libsys tests: Disable SafeStack

SafeStack isn't applicable to unit test code.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
(cherry picked from commit f3fb698abcadce684f5d4d95782832ce682775f8)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-0lib/libsys/tests/Makefile
+2-01 files

HardenedBSD/src 1a51fd7 — sys/dev/hid hid.c

hid: Increase MAXLOCCNT to 8192

Some I2C HID touchpads declare variable items with more than 4096
usages, which the parser truncates.

PR:             300050
Suggested by:   wulf

MFC After: 3 days

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D62426
DeltaFile
+1-1sys/dev/hid/hid.c
+1-11 files

HardenedBSD/src 66d3820 — sys/dev/usb/video uvideo.c, sys/modules/usb/uvideo Makefile

uvideo: bind ACPI handle and expose physical location

According to https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/other-acpi-namespace-objects
some USB Imaging device has corresponding ACPI device object with _PLD(physical location of device) information for
each camera interface to inform camera position.

This will expose two information to userland with sysctl:

* pldraw raw content of _PLD object.
* acpi_handle ACPI namespace path of Device object corresponding to camera interface.

Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D57767
DeltaFile
+110-0sys/dev/usb/video/uvideo.c
+1-0sys/modules/usb/uvideo/Makefile
+111-02 files

HardenedBSD/src b592ada — share/colldef_unicode nn_NO.UTF-8.src zh_TW.UTF-8.src, tools/tools/locale/etc/final-maps widths.txt map.UTF-8

locale: update to CLDR 49 and Unicode 18.0.0
DeltaFile
+42,324-42,763share/colldef_unicode/zh_CN.UTF-8.src
+6,894-6,894share/colldef_unicode/ja_JP.UTF-8.src
+13,007-0tools/tools/locale/etc/final-maps/map.UTF-8
+12,357-1tools/tools/locale/etc/final-maps/widths.txt
+1,296-1,300share/colldef_unicode/zh_TW.UTF-8.src
+706-699share/colldef_unicode/nn_NO.UTF-8.src
+76,584-51,65738 files not shown
+92,093-66,20844 files

HardenedBSD/src 1fbeabd — tools/tools/locale Makefile, tools/tools/locale/tools cldr2def.lua cldr2def.pl

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
DeltaFile
+0-1,131tools/tools/locale/tools/cldr2def.pl
+887-0tools/tools/locale/tools/cldr2def.lua
+3-5tools/tools/locale/Makefile
+890-1,1363 files

HardenedBSD/src fc830a6 — tools/tools/locale Makefile, tools/tools/locale/tools utf8-rollup.lua utf8-rollup.pl

locale: rewrite utf8-rollup in Lua
DeltaFile
+0-238tools/tools/locale/tools/utf8-rollup.pl
+237-0tools/tools/locale/tools/utf8-rollup.lua
+5-3tools/tools/locale/Makefile
+242-2413 files

HardenedBSD/src ca8686c — tools/tools/locale Makefile, tools/tools/locale/tools mkwidths.pl getwidths.c

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.
DeltaFile
+142-5tools/tools/locale/tools/getwidths.c
+0-124tools/tools/locale/tools/mkwidths.pl
+1-2tools/tools/locale/Makefile
+143-1313 files

HardenedBSD/src 9a86c61 — sys/dev/virtio/gpu virtio_gpu.c

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
DeltaFile
+9-4sys/dev/virtio/gpu/virtio_gpu.c
+9-41 files

HardenedBSD/src 17b6cd2 — share/man/man4 Makefile, sys/cddl/dev/dtrace/powerpc dtrace_subr.c dtrace_isa.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+47-2sys/powerpc/powernv/opal_i2c.c
+16-15sys/dev/usb/controller/xhci.c
+23-0sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
+15-0sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
+7-1sys/powerpc/include/cpu.h
+7-0share/man/man4/Makefile
+115-184 files not shown
+123-2610 files

HardenedBSD/src 305257e — share/man/man4 Makefile, sys/cddl/dev/dtrace/powerpc dtrace_subr.c dtrace_isa.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+47-2sys/powerpc/powernv/opal_i2c.c
+16-15sys/dev/usb/controller/xhci.c
+23-0sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
+15-0sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
+7-1sys/powerpc/include/cpu.h
+7-0share/man/man4/Makefile
+115-184 files not shown
+123-2610 files

HardenedBSD/src d282fd5 — . ObsoleteFiles.inc

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+2-0ObsoleteFiles.inc
+2-01 files

HardenedBSD/src 1ddf05e — share/man/man4 Makefile

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)
DeltaFile
+1-0share/man/man4/Makefile
+1-01 files

HardenedBSD/src bb96c06 — share/man/man4 linux.4

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
DeltaFile
+3-1share/man/man4/linux.4
+3-11 files

HardenedBSD/src 048b8ad — sys/cddl/dev/dtrace/powerpc dtrace_subr.c dtrace_isa.c

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
DeltaFile
+23-0sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
+15-0sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
+38-02 files

HardenedBSD/src f8cffd3 — share/man/man4 Makefile

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)
DeltaFile
+2-0share/man/man4/Makefile
+2-01 files

HardenedBSD/src e9373c1 — sys/cddl/dev/sdt sdt.c

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
DeltaFile
+3-3sys/cddl/dev/sdt/sdt.c
+3-31 files

HardenedBSD/src c1aa423 — sys/powerpc/include cpu.h

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
DeltaFile
+7-1sys/powerpc/include/cpu.h
+7-11 files

HardenedBSD/src 5a1b31c — share/man/man4 Makefile

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)
DeltaFile
+4-0share/man/man4/Makefile
+4-01 files

HardenedBSD/src 629ec2b — sys/powerpc/powernv opal_i2c.c

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
DeltaFile
+9-1sys/powerpc/powernv/opal_i2c.c
+9-11 files

HardenedBSD/src 99256ea — sys/powerpc/powernv opal_i2c.c

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
DeltaFile
+38-1sys/powerpc/powernv/opal_i2c.c
+38-11 files

HardenedBSD/src 2bcdd17 — . ObsoleteFiles.inc

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)
DeltaFile
+2-0ObsoleteFiles.inc
+2-01 files

HardenedBSD/src 31a1632 — . ObsoleteFiles.inc

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")
DeltaFile
+2-0ObsoleteFiles.inc
+2-01 files

HardenedBSD/src 3fd1786 — sys/dev/usb usb_transfer.c, sys/dev/usb/controller xhci.c

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
DeltaFile
+16-15sys/dev/usb/controller/xhci.c
+0-4sys/dev/usb/usb_transfer.c
+16-192 files

HardenedBSD/src 3df1bc5 — sys/net toeplitz.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+1-2sys/net/toeplitz.c
+1-21 files

HardenedBSD/src 151e292 — sys/net toeplitz.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+1-2sys/net/toeplitz.c
+1-21 files

HardenedBSD/src 450eb9e — sys/cddl/dev/sdt sdt.c, sys/i386/include sdt_machdep.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+10-5sys/x86/x86/sdt_machdep.c
+6-1sys/i386/include/sdt_machdep.h
+1-1sys/cddl/dev/sdt/sdt.c
+17-73 files

HardenedBSD/src 8b22917 — sys/net toeplitz.c

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")
DeltaFile
+1-2sys/net/toeplitz.c
+1-21 files