[LoongArch] Drop asm part from memory barrier optimization pass (#223656)
Drop the inline asm part from #218597, which violates inline assembly
semantics.
Fix VM and container duplicate-UUID check for spelling variants
## Problem
`UUIDv4String` did neither thing its name implies. `uuid.UUID(value, version=4)` overwrites the version and variant bits on a throwaway object rather than asserting them, so a v1, v5, v6, v7 or the nil UUID all passed; and the validator returned the caller's original string, so the braced, `urn:uuid:`, uppercase and unhyphenated spellings of one UUID were each stored verbatim.
That made the create-time uniqueness check compare presentation instead of identity — it is a datastore filter, so SQL `=` against a BINARY-collated column — and two rows spelling one UUID differently both got in. Since the uuid is written to both `<name>` and `<uuid>` of the libvirt domain XML and `defineXML` only happens at start, nothing went wrong until the second VM was started, at which point libvirt refused it while quoting the first VM's uuid. `uuid` is immutable after creation, so that row cannot be repaired in place.
## Solution
- **Real version check.** `uuidv4_validator` now parses without `version=` and rejects anything whose `.version` is not 4. The nil and max UUIDs report `None` there, so they are rejected too, and the "not a valid UUID" and "not version 4" cases now report separately instead of sharing one misleading message.
- **A permissive `UUIDString` for the entry models.** The version was never actually enforced in any shipped release, so non-v4 uuids exist in the field. The entry models are what `query` validates stored rows against, and a row that fails there is dropped from the result rather than reported, so tightening them would make those VMs disappear. Strict type on create, permissive type on read. `v26_0_0/vm.py` needed a `VMCreate.uuid` override added, as it was the one model inheriting the annotation from its entry.
- **Compare uuids by value.** New `same_uuid()` in `middlewared/utils/libvirt/utils.py`, used by both `validate()` methods in place of the datastore filter. This cannot be pushed into SQL — a case-insensitive collation still would not equate the unhyphenated form with the hyphenated one — so it reads the rows and folds over them, which is fine at these tables' size.
Deliberately not included: normalising the stored value. Rewriting it renames a libvirt domain out from under a possibly running guest and invalidates the pid and runtime paths derived from it, and once the comparison is by value a non-canonical row stays self-consistent anyway.
CodeGen: Pass instruction and operand index to isPCRelRegisterOperandLegal (#219420)
Replace the MachineOperand argument to the
TargetInstrInfo::isPCRelRegisterOperandLegal hook with the containing
instruction and operand index. The M68k implementation only used the
operand
to recover its parent instruction and operand number, so this drops the
dependence on MachineOperand::getParent().
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[flang][OpenMP] Add -fopenmp-version flag to several tests
The default OpenMP version in flang is 3.1. A number of tests use features
added in later versions. They currently pass because the version validity
is not enforced in many cases. Set the OpenMP version explicitly to avoid
failures when the checks become more strict.
i915: Fix null pointer deref in i915_gem_object_get_dma_address.
Matches the Linux code in the #else this way.
PR kern/60755: i915drmkms crashes on Intel Bay Trail GPU making the
machine rebooting
net/netatalk4: Remove the pkg-install file
This is no longer needed. The base distro takes care of installing the
README in the CNID subdirectory.
PR: 298659
Spotted by: eduardo
compat_linux inotify(2): Re-check number of entries in loop.
Might have changed between two calls to inotify_readdir.
XXX Should maybe not do two calls to inotify_readdir! Can we hold
the vnode lock or use a fixed temporary buffer size or something?
PR kern/60756: compat_linux inotify(2): TOCTOU and locking shenanigans
compat_ultrix: Fix shmat/shmdt confusion.
Also omit needless initializer while here, which was added to pacify
a gcc12 warning without actually fixing the problem the warning
should have alerted us to.
kern/60753: compat_ultrix shmsys(2): busted shmdt
compat_linux, compat_linux32: Always zero syscall args on stack.
This is an attempt to systematically eliminate a class of stack
garbage bugs:
PR kern/60750: compat_linux: stack garbage mistakes
compat_linux recv(m)msg(2): Fix mistakes in error branches.
1. If copying out the cmsghdr _succeeds_, we want to copy out the
cmsg data -- not if copying out the cmsghdr _fails_.
2. If any part of the BSD cmsg to Linux cmsg conversion or copyout
_fails_, we must pass the whole mbuf chain to free_control_mbuf to
close all the file descriptors in it -- otherwise, they would leak
because the user process has no idea it has been given the fds.
3. Add missing `if (error)' before `return error' in recvmmsg(2)
branch for copying in timeout.
Found while reviewing code nearby:
PR kern/60748: compat_linux: possible integer truncation/overflow
issues in socket syscalls
compat_linux recv(m)msg(2): Tighten arithmetic bounds.
And avoid overflow test idioms that involve doing the overflow.
PR kern/60748: compat_linux: possible integer truncation/overflow
issues in socket syscalls
databases/mongodb4: Fix type error objected to by gcc12 (NetBSD 11)
Resolves building under NetBSD 11.
Patch from Paul Ripke, who is running it with unifi.
Unifi starts for me with on NetBSD 11 (with no previous db).
biology/vsearch: Update to 2.32.0
Numererous bug fixes, new per-command man pages, and a few other
enhancements.
Changes: https://github.com/torognes/vsearch/releases
Normally I don't upgrade ports so close to the end of a quarter, but
this release has a lot of bug fixes, which I think outweigh the risk
of a regression slipping into the next quarterly branch.
Reported by: portscout