munmap.2: Unaligned addresses do not return error
We previously claimed that non-page-aligned addresses would return
EINVAL, but the address is in fact rounded down to the page boundary.
Reported by: Harald Eilertsen <haraldei at anduin.net>
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Fixes: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")
Differential Revision: https://reviews.freebsd.org/D48465
NAS-131665 / 25.04 / Convert NFS config to new api. (#15336)
* Convert NFS config to new api.
Added a common 'TcpPort' type.
Fix tcp port exclude option.
Convert bindip_choices to new api.
Convert NFS share CRUD to new api.
* Expand network and host doc string.
* Move some validation from pydantic to nfs plugin.
Add nfs validators module to plugins/nfs_.
Update CI tests.
[clang][Serialization] Add the missing block info (#122976)
HEADER_SEARCH_ENTRY_USAGE and VFS_USAGE were missing from the block info
block. Add the missing info so `llvm-bcanalyzer` can read them
correctly.
[mlir] Make single value `ValueRange`s memory safer (#121996)
A very common mistake users (and yours truly) make when using
`ValueRange`s is assigning a temporary `Value` to it. Example:
```cpp
ValueRange values = op.getOperand();
apiThatUsesValueRange(values);
```
The issue is caused by the implicit `const Value&` constructor: As per
C++ rules a const reference can be constructed from a temporary and the
address of it taken. After the statement, the temporary goes out of
scope and `stack-use-after-free` error occurs.
This PR fixes that issue by making `ValueRange` capable of owning a
single `Value` instance for that case specifically. While technically a
departure from the other owner types that are non-owning, I'd argue that
this behavior is more intuitive for the majority of users that usually
don't need to care about the lifetime of `Value` instances.
[2 lines not shown]
[CMake] Remove some always-true HAVE_XXX_H
These are unneeded even on AIX, PURE_WINDOWS, and ZOS (per #104706)
* HAVE_ERRNO_H: introduced by 1a93330ffa2ae2aa0b49461f05e6f0d51e8443f8 (2009) but unneeded.
The guarded ABI is unconditionally used by lldb.
* HAVE_FCNTL_H
* HAVE_FENV_H
* HAVE_SYS_STAT_H
Pull Request: https://github.com/llvm/llvm-project/pull/123087
[coff] Don't try to write the obj if the assembler has errors (#123007)
The ASAN and MSAN tests have been failing after #122777 because some
fields are now set in `executePostLayoutBinding` which is skipped by the
assembler if it had errors but read in `writeObject`
Since the compilation has failed anyway, skip `writeObject` if the
assembler had errors.
Introduce the UMA_ZONE_NOTRIM uma zone type
The ktls buffer zone allocates 16k contiguous buffers, and often needs
to call vm_page_reclaim_contig_domain_ext() to free up contiguous
memory, which can be expensive. Web servers which have a daily
pattern of peaks and troughs end up having UMA trim the
ktls_buffer_zone when they are in their trough, and end up re-building
it on the way to their peak.
Rather than calling vm_page_reclaim_contig_domain_ext() multiple times
on a daily basis, lets mark the ktls_buffer_zone with a new UMA flag,
UMA_ZONE_NOTRIM. This disables UMA_RECLAIM_TRIM on the zone, but
allows UMA_RECLAIM_DRAIN* operations, so that if we become extremely
short of memory (vm_page_count_severe()), the uma reclaim worker can
still free up memory.
Note that UMA_ZONE_UNMANAGED already exists, but can never be drained
or trimmed, so it may hold on to memory during times of severe memory
pressure. Using UMA_ZONE_NOTRIM rather than UMA_ZONE_UNMANAGED is an
[6 lines not shown]
libdtrace: Be less strict when comparing pointer types
If one of two pointers refers to a forward declaration, let the pointers
be compatible so long as the referred types have the same name.
Otherwise we can get spurious errors.
To give a specific example, this can happen when ipfw_nat.ko is loaded
before ipfw.ko and /usr/lib/dtrace/ipfw.d is processed. Currently,
ipfw_nat.ko does not have a definition for struct inpcb (i.e., none of
its files include in_pcb.h), so in the CTF type graph, struct
ip_fw_args' "inp" member refers to a forward declaration, represented in
CTF with CTF_K_FORWARD.
Then, when libdtrace processes the ipfw_match_info_t translator in
ipfw.d, it decides that the "inp" field assignment is incorrect because
the two pointers are incompatible. However, there's no harm in allowing
this assignment. Add some logic to dt_node_is_ptrcompat() to detect
this case and declare the pointers as compatible so long as the name of
the thing they refer to is the same, similar to how any pointer is
[8 lines not shown]
git-arc: Properly quote .nm arg
.Nm git arc has 2 args, despite the mdoc reference saying there's only
one arg when in the preamble and NAME sections, but not noting that
restriction later. Quote the arg and bump the date. This doesn't affect
man git-arc, but does affect the rendering of the man page on at least
one website. Date bumped since it is a semantic change and not just
a typo or other trivial correction.
Reviewed by: jhb
Sponsored by: Netflix
[Driver] Fix a warning
This patch fixes:
clang/include/clang/Driver/Driver.h:82:3: error: definition of
implicit copy assignment operator for 'CUIDOptions' is deprecated
because it has a user-declared copy constructor
[-Werror,-Wdeprecated-copy]
pkg-create.8: The default default compression is tzst
It can be overriden at configure time (and FreeBSD 13 does so), but here
we should reflect the default default.
Sponsored by: The FreeBSD Foundation
Signed-off-by: Ed Maste <emaste at FreeBSD.org>