[AArch64] Make width of stack protector guard value load configurable. (#195379)
Certain embedded targets store the value of the stack protector global
in an MMIO register, which requires a load of a specific width. Allow
changing the backend to emit a 4-byte load for the value of the stack
protector, instead of an 8-byte load. (Or vice versa for an ilp32
target.)
The current version of the patch has a limitation: it still allocates a
pointer-sized stack slot for the guard. This could be fixed in the
future, if it becomes relevant.
Cloud releases: Switch to firstboot_pkg_upgrade
Cloud images are deployed with base system packages. Introduce a
firstboot package auto updater to patch the base system on first boot.
MFC after: 1 hour
MFC to: stable/15
Reviewed by: cperciva
Sponsored by: Google Cloud
Differential Revision: https://reviews.freebsd.org/D56890
(cherry picked from commit 464a351267dc0d1843b919dd72ad1c70c24815ce)
[lldb] Use identity hashing for HashToISAMap in ObjCLanguageRuntime (#197759)
The keys of HashToISAMap are already hashes, and can be used as-is.
---------
Co-authored-by: Adrian Prantl <adrian.prantl at gmail.com>
nfsd: Allow vfs.nfsd.srvmaxio to be up to 4Mbytes
Without this patch, the maximum setting for
vfs.nfsd.srvmaxio was 1Mbyte. This patch increases
that to 4Mbytes.
The same as for any setting above 128Kbytes, settings up to
4Mbytes require that kern.ipc.maxsockbuf be increased.
(A message generated after setting vfs.nfsd.srvmaxio via
the /etc/rc.conf variable nfs_server_maxio will indicate
the minimum setting, which will be somewhat greater than
four times the setting of vfs.nfsd.srvmaxio.)
Requested by: Cedric Blancher <cedric.blancher at gmail.com>
MFC after: 2 weeks
Fixes: 13d3bd165e22 ("subr_uio.c: Remove a KASSERT() for large NFS server I/O")
subr_uio.c: Remove a KASSERT() for large NFS server I/O
When the NFS server is set to allow an I/O size greater
than 1Mbyte (not allowed in FreeBSD's main yet), a
KASSERT() in allocuio() can fail when:
zfs_freebsd_write()->zfs_write()->zfs_uiocopy()
->cloneuio()->allocuio()
is called for a large NFS server write.
Since the userland API callers to allocuio() already
check that the size does not exceed UIO_MAXIOV,
there does not seem to be a need to a KASSERT()
here.
Removing the KASSERT() allows NFS server writes
of greater than 1Mbyte to work, once the NFS code
is patched to allow them.
Reviewed by: kib
[2 lines not shown]
[MIR] Save internal VirtRegMap state
Adds two optional fields to the per-vreg YAML record so MIR tests can
express VirtRegMap state that previously had no representation:
registers:
- { id: 1, class: vgpr_32, split-from: '%0', assigned-phys: '$vgpr5' }
Testing passes that consume sibling-register information (e.g.
InlineSpiller) requires constructing a VirtRegMap with split
relationships from a MIR test, which implies triggering live-range
splitting at minimum and make reproducers unnecessarily complicated.
So this change introduces a mechanism to serialize/deserialize the state
of the VirtRegMap pass.
Mechanism:
- For serialization:
- MIRPrinter emits the new fields only when the VirtRegMap is available.
[13 lines not shown]
[MIR] Serialize/Deserialize MachineInstr::LRSplit attribute
The LRSplit MachineInstr flag is set by SplitKit on copies inserted for
live-range splitting.
Until now the flag had no MIR-text representation.
This patch fixes that so that it gets easier to reproduce/capture issues
that involves SplitKit.
Round-trip coverage in
llvm/test/CodeGen/MIR/AMDGPU/lr-split-flag.mir.
[AMDGPU][test] Use mir test for regalloc issue
Use the newly introduced split-from flag to produce a more robust test case
for the hoistSpillInsideBB live-range update issue.
NFC
Allow ObjC writeback conversion in cleanup attribute type check (#195318)
Prior to #164440, CheckAssignmentConstraints in the cleanup attribute
handler ran before ObjC lifetime qualifiers were inferred on the
variable. It compared against a type without '__strong' and accepted
both 'T **' to 'T *__autoreleasing *' and 'T **' to 'T
*__unsafe_unretained *'. #164440 reversed the order, so the check now
runs after '__strong' is inferred and rejects both 'T *__strong *' to 'T
*__autoreleasing *' and 'T *__strong *' to
'T *__unsafe_unretained *'.
Fix the valid case by falling back to isObjCWritebackConversion when the
assignment check fails. This re-allows the '__strong' to
'__autoreleasing' writeback conversion while continuing to reject
'__strong' to '__unsafe_unretained'.
rdar://175133715
[flang][docs][nfc] Wordsmith -frelaxed-c-loc-checks flag description (#197804)
Clarify that unexpected behavior reflects the compiler's design choice
not to track aliases from non-target non-pointer C_LOC() arguments,
rather than implying a compiler defect. Align phrasing across
FlangOptions.td and Extensions.md.
Also add the `-checks` suffix to the flag per @sscalpone's suggestion.
Cloud releases: More firstboot_pkg_upgrade
Update a couple more cloudware images which I forgot about earlier.
Reviewed by: ziaee
Fixes: 464a351267dc ("Cloud releases: Switch to firstboot_pkg_upgrade")
Differential Revision: https://reviews.freebsd.org/D57006
[clang-doc] Removed OwnedPtr alias
The alias served a purpose during migration, but now conveys the wrong
semantics, as the memory these pointers reference is interned inside
a local arena, and doesn't convey any sort of ownership.
[clang-doc] Use distinct APIs for fixed arena allocation sites
Typically, code either always emits data into the TransientArena or the
PersistentArena. Use more explicit APIs to convey the intent directly
instead of relying on parameters or defaults. We were not always
consistent about this.
[Instrumentor] Add a property filter for static properties (#197530)
The user can define static filters in the json to limit instrumentation
to opportunities that match the static expression, e.g., is_volatile==1.
The matcher logic is pretty basic for now. Integer comparisons, string
equalities and `startswith` for strings are supported.
The commit was prepared with Claude (AI) and proofread/tested by me.
Restrict on-disk perms of internal container/apps dataset roots
The internal dataset trees that back containers
(/mnt/.truenas_containers/), Docker apps (/mnt/.ix-apps/), and the
per-container idmapped bind-mount parent (/run/truenas_containers/root/)
are implementation-detail paths that aren't intended to be inspected
directly by host users. They currently mount with the default of
drwxr-xr-x root:root (or 0755 from os.makedirs for the /run parent),
which is looser than necessary.
This PR pins those three directories to 0700 root:root and re-applies
the mode at the relevant entry points so the property is idempotent
across reboots and manual chmod drift.
[lldb] Fix data race on ThreadPlan::GetNextID's plan-ID counter (#197811)
`g_nextPlanID` is a function-local static used to hand out unique
ThreadPlan IDs. It was a plain uint32_t, so concurrent ThreadPlan
constructors (e.g. each Process's private state thread queueing its base
plan) raced on the increment.
Make it std::atomic<uint32_t>. Prefix operator++ on std::atomic is
already an atomic fetch_add that returns the new value, so the call
sites are unchanged.
Found by ThreadSanitizer as part of #197792.
[lldb] Fix data race on ValueObject's unique-id counter (#197809)
g_value_obj_uid is a file-scope static that hands out unique IDs to
every ValueObject. It was a plain user_id_t, so concurrent
SBTarget::FindGlobalVariables / EvaluateExpression calls raced on the
increment.
Make it std::atomic<user_id_t>. Prefix operator++ on std::atomic is
already an atomic fetch_add that returns the new value, so the call
sites are unchanged.
Found by ThreadSanitizer as part of #197792.