uuidgen: generate UUIDs in bounded batches to respect kernel limit
The uuidgen(2) system call enforces a hard upper limit of 2048 UUIDs per
invocation. uuidgen(1) previously attempted to generate arbitrary counts
in a single call and allocated memory accordingly, leading to EINVAL
errors, unnecessary memory usage, and potential overflow risks.
Generate UUIDs in fixed-size batches, streaming output incrementally
while preserving existing semantics. Mirror the kernel limit explicitly
since it is not exposed via a public interface.
Signed-off-by: NVSRahul <nvsrahul at hotmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1965
rc.d/zfs: align zfs mount verbosity in host and jail environments
ZFS script runs different startup seqneces depending on where it runs:
on the host (`zfs_start_main()`) or in a jail (`zfs_start_jail()`):
- `zfs_start_main()` mounts ZFS datasets in verbose mode `zfs mount -va`
- `zfs_start_jail()` mounts ZFS datasets silently `zfs mount -a`.
This change aligns the verbose levels.
NO_ISSUE
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2030
fsck_msdosfs: reduce the scope of dentry deletion
When dentry flag is ATTR_VOLUME because of 1 bit flip(from 0x10 to 0x18),
removede function will delete all dentry from invalid dentry postion,
so some normal dentries will be deleted in the same cluster.Unfortunately,
these normal directories and files will not be visible to the user
after wo do fsck_msdos
Signed-off-by: YangWen <anmuxixixi at gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1694
Add .editorconfig
FreeBSD developers use different text editors or sometimes use GUI
editors such as VSCode or Zed on different platforms for convinence.
However, there is lack of unified config for those editors to follow
style(9) including indent rules.
Although most "modern" editors support .editorconfig out of box, basic
editors such as vim needs a plugin for autoloading .editorconfig file.
Sponsored by: The FreeBSD Foundation
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2024
[CIR] Add Commutative/Idempotent traits to binary ops
Add missing MLIR traits to CIR binary operations, matching the arith
dialect conventions:
- AndOp, OrOp: Commutative, Idempotent (fixes FIXME)
- AddOp, MulOp, XorOp, MaxOp: Commutative
Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.
Update testFloatingPointBinOps in binop.cpp to use computed values,
preventing DCE of the now-canonicalized ops.
[ubsan_minimal] Build on Solaris (#184976)
Two tests currently `FAIL` on Solaris/amd64 and Solaris/sparcv9:
```
SafeStack-Standalone-i386 :: overflow.c
SafeStack-Standalone-x86_64 :: overflow.c
```
This happens because `libclang_rt.ubsan_minimal.a` isn't built on
Solaris although it's required with `-fsanitize-minimal-runtime`.
This patch fixes this.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
[CIR] Fix operator-precedence bugs in assert conditions (#185119)
Due to && binding tighter than ||, asserts of the form
assert(A || B && "msg") always pass when A is true. Add
parentheses so the string message is properly attached:
assert((A || B) && "msg").