libc: fix memfd_create's HUGETLB handling
The 'simplification' commit referenced below actually broke one aspect
of MFD_HUGETLB: the caller isn't supposed to be required to specify a
size. MFD_HUGETLB by itself without a shift mask just requests a large
page, so we revert that part of memfd_create() back.
While we're here, fix up the related parts of the manpages a little bit,
since MFD_HUGETLB is actually supported. The manpage claims that we
would return ENOSYS if forced mappings weren't supported, but this was
actually not true. However, that seems like a very important
distinction to make between ENOSYS and EOPNOTSUPP, so fix the
implementation to match the docs.
Fixes: 8b8cf4ece660f ("memfd_create: simplify HUGETLB support [...]")
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56114
tests: kqueue: add a basic test for CPONFORK
Just copy over a timer and a write-filter, be sure that we can observe
both in the child. Maybe the timer should check for a minimum time
passed, but I don't know that we'd be likely to get that wrong.
This also adds a negative test with a kqueue that is *not* set for
CPONFORK being added to the first one, made readable, and confirming
that we don't see a knote for it in the child.
Some other improvements to the test noted in the review are planned in
the short term, but they're not particularly worth blocking adding this
as a basic sanity check.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56223
kqueue: slightly clarify the flow in knlist_cleardel()
This is purely a cosmetic change to make it a little easier on the eyes,
rather than jumping back to the else branch up top. Re-flow it to use
another loop on the outside and just inline the re-lock before we repeat
after awaking from fluxwait.
The !killkn path should maybe issue a wakeup if there's a thread in
KQ_SLEEP so that userland can observe the EOF, but this isn't a
practical problem today: pretty much every case of knlist_clear is tied
to a file descriptor and called in the close(2) path. As a consequence,
potentially affected knotes are almost always destroyed before we even
get to knlist_clear().
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56226
kqueue: don't leak file refs on failure to knote_attach()
We'll subsequently just knote_free() since the knote is barely
constructed, but that bypasses any logic that might release references
on owned files/fops. Defer clearing those until the knote actually owns
them and update the comment to draw the line more clearly.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D56318
[RISCV] Remove NoVendorXMIPSCBOP from the Zicbop instructions. (#191015)
The XMIPSCBOP encodings use OP-CUSTOM-0 so there's no encoding overlap
here. Presence of a vendor extension should not disable parsing or
disassembly of a standard extension that doesn't overlap.
[Clang][NFC] tests showcasing incorrect use of HIP and OpenCL memory scope macros (#188890)
The tests demonstrate how incorrect LLVM IR is generated without
diagnostics, when an OpenCL or HIP scope number is passed to an AMDGPU
intrinsic. #185408 lays the groundwork for properly diagnosing this
situation by internally using a separate enum type to represent each set
of scope numbers.
crypto/openssl: add new manpage from release 3.5.6
MFC after: 1 day (the security issues warrant a quick backport).
MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
crypto/openssl: update artifacts to match 3.5.6 release artifacts
A new manpage and any associated links will be added in the next commit.
MFC after: 1 day (the security issues warrant a quick backport).
MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
MFV: crypto/openssl: update to 3.5.6
This change brings in version 3.5.6 of OpenSSL, which features
several security fixes (the highest of which is a MEDIUM severity
issue), as well as some miscellaneous feature updates.
Please see the release notes [1] for more details.
PS Apologies for the confusing merge commits -- I was testing out a
new automated update process and failed to catch the commit message
issues until after I pushed the change.
1. https://github.com/openssl/openssl/blob/openssl-3.5.6/NEWS.md
MFC after: 1 day (the security issues warrant a quick backport).
Merge commit 'ab5fc4ac933ff67bc800e774dffce15e2a541e90'
[bazel] Remove unnecessary textual_hdrs usage (#191072)
textual_hdrs is supposed to be used for header files that aren't
standalone, which isn't the case for these mlir headers. Being in
textual_hdrs excludes them from header parsing, which means
layering_check results aren't entirely valid. I'm going to try and
enable header parsing on these targets in a follow up change.
Remove references to tag:kde3 and tag:kde4 as something that one
might find in the current ports tree. kde3/kde4 and their tags are
long gone.
Leave them in place for the historical section describing what
tags are used for in dpb/DPB_PROPERTIES
ok phessler
geom: Make g_waitidle() wait for orphaned providers
This is motivated by the following race in the ZFS zvol code.
When a zvol is created, we create a GEOM-backed zvol, which results in a
/dev/zvol/<zvol path> device file, created by GEOM::dev. If volmode=dev
is specified, zvol_set_volmode_impl() will wither the GEOM, then create
a device file with the same name. This sometimes fails because
g_wither_geom() is asynchronous, so we end up trying to create a device
file while the old one still exists. I want to fix this by adding a
g_waitidle() call to zvol_os_remove_minor().
g_waitidle() is not sufficient: GEOM::dev does not destroy the device
until g_dev_orphan() is called. (In fact the device destruction is
asynchronous too, but the delist_dev() call is sufficient to address
this race.) So, I propose modifying g_waitidle() to block until
orphaned providers are processed.
PR: 258766
[3 lines not shown]
[libc++] Optionally support filecheck and split-file (#165769)
This patch adds optional support for FileCheck and split-file in
libc++'s test suite. Whether FileCheck / split-file is available
can be queried using Lit features.
This should make it possible to test several things that were
previously impossible to test, especially for specific code
generation.
Supersedes #65917 and #188283
[ObjCARC] Optimize MayAutorelease by skipping over pools (#188583)
This enables the ARC optimizer to remove autoreleasePoolPush/Pop pairs
that were previously retained. By skipping over nested autorelease
pools, MayAutorelease now correctly recognizes that autoreleases
contained within an inner pool do not escape, allowing the removal of
outer pool boundaries.