games/freeciv21: Update 3.1.1 => 3.1.2
While here, drop the custom variable FC21_VERSION and use standard
variables instead.
Changelog: https://github.com/longturn/freeciv21/releases/tag/v3.1.2
PR: 297212
Reported by: Tobias Rehbein <tobias.rehbein at web.de> (maintainer)
kqueue: Add a helper macro for sleeping on in-flux knotes
Other in-flux operations are implemented by this set of macros, so we
should do the same for sleeping.
No functional change intended.
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58443
(cherry picked from commit 1f4b0ea4f3eb1b8a885eff8bd0d332156f0c3e1f)
ppp: Avoid overflow when formatting endpoint discriminator options
Each byte of the address is represented by a pair of characters, so we
should be multiplying len by 2 when figuring out how much buffer space
we have. Previously, a sufficiently large option could cause an
overflow of the global "result" buffer.
Reported by: Joshua Rogers <joshua at joshua.hu>
Tested by: Décio Brandão (0xDBJ)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58555
(cherry picked from commit e004ff15f87e6aa8f2aa13cd5600ae13457b95f1)
kqueue: Associate marker knotes with a queue
Otherwise the assertion in KQ_FLUX_SLEEP_WMESG may fail.
kqueue_fork_copy() already handles this.
Fixes: 1f4b0ea4f3eb ("kqueue: Add a helper macro for sleeping on in-flux knotes")
Reported by: syzkaller
Reported by: kbowling
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58516
(cherry picked from commit 9a9349ea1da2d80e979fa87b430551d8f6dac7f4)
ktls: Propagate EPG_FLAG_ANON to mapped mbufs
Otherwise ktls_mbuf_crypto_state() will reject mbufs created by
_mb_unmapped_to_ext(), which arises when transmitting packets through an
interface that doesn't support unmapped mbufs, and the loopback
interface in particular.
PR: 296498
Fixes: 3444414cb463 ("ktls: Don't attempt to modify non-anonymous mbufs on the receive path")
Reviewed by: gallatin, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57557
(cherry picked from commit 815976ee14121bafe8a8ab002459d32f8928f2de)
vm: Make sure NULL is defined for vm_memattr_name()
Fixes: a7e483ee146a ("vm_phys: Add a sysctl to dump registered fictitious memory ranges")
(cherry picked from commit 11edc985cd9c2e1dcceccb7e929c6921b4e20c9b)
ipsec: Fix a lock leak in ipsec_chkreplay()
Reported by: Chris Jarrett-Davies of the OpenAI Codex Security Team
Reviewed by: pouria, kp
Fixes: 0361f165f219 ("ipsec: replace SECASVAR mtx by rmlock")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58521
(cherry picked from commit b6823a973737f06ea6cf0ea5a3083383af2ba5a4)
vm_phys: Add a sysctl to dump registered fictitious memory ranges
I've wanted this a couple of times in the past. Save the memattr in
the fictitious memory segment structure so that we can report it from
the sysctl handler, and add conversion routines for each platform.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D58283
(cherry picked from commit a7e483ee146a93ac89357676fdb9af62ac58b4bc)
kqueue: Allocate marker knotes on the stack
The scan marker was originally stack-allocated. In commit
1c0f9af5b5224, it became heap-allocated since the marker is visible to
other threads and a scanning thread's stack may be swapped out. Now
that kernel stacks can no longer be swapped out, we can avoid these heap
allocations.
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58402
(cherry picked from commit bb933b1d1846b3a984670b8cd65450c3333188f6)
graphics/nvidia-texture-tools: fix aarch64 and powerpc64* builds
Some of the code assumed amd64 / i386 and included SSE headers.
icbc.h was plainly wrong and contained straight typos, probably never
built previously on powerpc* hardware.
stand: Recognize SHT_INIT_ARRAY sections as constructor sections
Pass such a section to the kernel using modinfo, otherwise link_elf.c
won't execute constructors for the file. This is required for KASAN,
otherwise redzones for global buffers are not poisoned during boot.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58244
(cherry picked from commit 4b0ae7e001a97e5449835bb8a2e6c2e6f53aac39)