ObsoleteFiles: Add some ancient locale symlinks
These were dropped in 2021 but were never listed in ObsoleteFiles.inc,
so systems that have been upgraded from source since before that date
(or from 13.x) may still have them.
PR: 295668
MFC after: 1 week
Fixes: 0a36787e4c1f ("locales: separate unicode from other locales")
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D57331
linux: Implement PTRACE_GETREGSET NT_PRFPREG and NT_X86_XSTATE
Implement NT_PRFPREG and NT_X86_XSTATE for PTRACE_GETREGSET on amd64.
Chrome's crashpad handler uses these to collect floating-point and
extended CPU register state for crash dumps.
Other architectures retain the previous EINVAL stub behavior.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 289285
Reviewed by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
linux: Add linux_pt_fpregset and bsd_to_linux_fpregset() for amd64
Add struct linux_pt_fpregset, the amd64 Linux NT_PRFPREG payload,
corresponding to user_i387_struct in Linux. The struct describes
the 512-byte FXSAVE area as exposed by PTRACE_GETREGSET.
Add bsd_to_linux_fpregset() to translate from FreeBSD's struct fpreg
to struct linux_pt_fpregset. Fields are extracted from the fpr_env[]
array which stores the FXSAVE environment packed as four 64-bit words.
The FP and XMM register banks are bulk-copied as opaque byte arrays.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
Reviewed by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
hwpstate_intel: Disable package control on hybrid CPU
In package control mode, the performance of all cores depends on the
most recent value written to the request field. If the last write comes
from an E-core, all cores are forced to align with the E-core
performance level, resulting in significant performance degradation.
Therefore, package control is disabled on hybrid-core systems.
Reviewed by: olce
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Framework Computer Inc
Differential Revision: https://reviews.freebsd.org/D57377
Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Git 1111a44301da - main - Defer the January 19, 2038 date limit in
UFS1 file systems to February 7, 2106 - did so by changing the UFS1
32-bit signed timestamps to unsigned. With this change, time stamps
from before January 1, 1970 went from being negative numbers to
large positive numbers implying times in the future. When such a
time stamp is encountered when an inode is read into memory or when
it is encountered by fsck, its timestamp is replaced with the
kernel's current time.
Andre Albsmeier reported that he had a machine reboot after a power
failure and the battery that maintained its real-time clock had
died. The result was that the system booted with the time set to
five years earlier (absent a real-time clock value, the boot ROM
used the time that the boot ROM had last been updated). The net
result was that fsck reset the time stamps of all files newer than
five years old to the five year old time.
[29 lines not shown]
lib/msun: Replaced pattern to force exception in _num families
Replaced the old pattern of using a ternary to force addition
(raising exceptions for sNaN's) with a new one using a volatile
variable. The _mag_num family was already implemented with this pattern
PR: 294719
Reviewed by: fuz, kargl
MFC after: 1 month
(cherry picked from commit 7c20e15592a07ea457cacb0d6706948815c8420e)
linuxulator: Return EINVAL for invalid inotify flags
We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux. Return EINVAL for unknown bits,
as Linux does.
This also moves the translation inline into linux_inotify_add_watch.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387
net: Fix handling of unmapped user pages in if_getgroup()
We cannot call copyout() while in a net epoch section, unless the user
memory is wired. Use the global ifnet lock to synchronize the accesses
instead.
Reported by: emaste
Reviewed by: zlei
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D57154
lagg: Handle a port count of zero
The sc_count check in lagg_transmit_ethernet() and
lagg_transmit_infiniband() is racy, as the lagg protocol handlers are
only synchronized by net_epoch. Handle a count of 0 in each protocol
handler where it's needed, namely in the RR and LB handlers.
Reported by: Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by: pouria, zlei
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D56942
virtual_oss(8): Fix buffer overflow in voss_compressor() call
This particular calls swaps the samples and maxchan arguments, which can
cause a buffer overflow in p_ch_chain if maxchan exceeds its bounds
(VMAX_CHAN).
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
(cherry picked from commit 453de99b386d40754a038cc4b804f4c7a3b04624)
Merge commit 63c29df8eceb from llvm git (by Dmitry Polukhin):
[Serialization] Fix assertion on re-deserialized friend template spec… (#200566)
…ialization in PCH (#198133)
A friend function-template specialization declared inside a class
template is serialized into a PCH. When the class template is later
instantiated while loading the PCH, the friend specialization can be
deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
-> VisitFunctionDecl for the same specialization) at the same time as
the canonical copy, producing two redeclarations of the same
specialization in the template's specialization set.
ASTDeclReader::VisitFunctionDecl asserted that this collision could only
happen when merging declarations from different modules. Since
38b3d87bd384, friend functions defined inside dependent class templates
are loaded eagerly, so the collision can now also occur within a single
PCH/AST file (non-modules build), tripping the assertion:
[16 lines not shown]
amd64: do not switch back and restore UEFI IDT in wrmsr_early_safe_end()
The memory where the pre-OS IDT was located might be already consumed by
kernel.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57321
amd64: there is no reason to copy ucode around in ucode_load_bsp()
PR: 294630
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differrential revision: https://reviews.freebsd.org/D57368
MAC/do: Fix double-free on parse error after "executable paths" feature
parse_rules() has been calling toast_rules() in case of a parse error in
order to deallocate the 'struct rule' objects it has constructed up to
that point.
toast_rules() would take a pointer to a full 'struct rules' object, and
besides freeing all 'struct rule' referenced by it, would also free the
holding 'struct rules' itself.
With the introduction of the "executable paths" feature, and the
embedding of 'struct rules' into 'struct conf', meaning that the
lifecycle for 'struct rules' was no longer independent, toast_rules()
was changed not to free the passed 'struct rules' (as it was a field of
a 'struct conf' object). Unfortunately, this change was not completed
with a reinitialization of the rules list head, so the 'struct conf'
object would continue to reference just-freed rules, which then would be
freed a second time on destruction of that container.
[16 lines not shown]
sh: Fix pipebuf limit
Since the factor is not 1, we need to provide a unit.
MFC after: 1 week
Fixes: 5d92f20c7d31 ("bin/sh: support RLIMIT_PIPEBUF")
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57352
spi: Remove incorrect pci id
This id is for SPI flash instead of spi bus
Fixes: 39e297bf54a5 ("ig4iic: Add PantherLake IDs")
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Framework Computer Inc
style.9: Fix a typo (missing word)
Fixes: af2c7d9f6452 ("style.9: Encourage style changes when doing significant modifications")
MFC after: 1 day
Sponsored by: The FreeBSD Foundation
fs/msdosfs: add support for file namws with surrogate pairs
Long file names are using UTF-16 symbols to represent international or
special characters. The implementation in FreeBSD did not support the
"Supplementary Private Use Area-B" (PUA-B), which requires a surrogate
pair to be represented in UTF-16 (Unicode code points beyond U+FFFF).
The PUA-B is used to represent emoji characters, which are supported
in file names on other common operating systems. The motivation for
this change was that removable media written on another system were
only partially readable on FreeBSD, since they contained emojis in
file names.
A test script that verifies correct operations on files names with
emojis has been added to the tools/test/stress2/misc directory under
the name msdos24.sh.
Reported by: Fabian Keil <fk at fabiankeil.de>
Reviewed by: ib
[4 lines not shown]
stand: Revert the EFI loader back to strict mode
The change to relaxed mode has had too many unintended breakages. Revert
back to strict mode until that works for all the cases that are
currently broken.
Fixes: 784150fd2535, d69fc3a9dc71
PR: 295289
Sponsored by: Netflix
bsdinstall: script: Fix scripted DISTRIBUTIONS
Restore exporting DISTRIBUTIONS to make it available to other scripts.
Reviewed by: imp, asomers
Fixes: dc14ae4217a0 ("bsdinstall: do pkgbase installations with the "script" command")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57319
(cherry picked from commit 283959bbe0863917c4fc3200a92d1055a4c89bdc)
pmc: add sapphire rapids model
This commit adds the sapphire rapids CPU model to hwpmc_intel.c,
allowing hwpmc to be used on this CPU family.
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D57263