[HLSL][LongVec] enable support for all elementwise apis (#216905)
resolves #216103
This change turns on VaryingLongVector for all HLSL intrinsics that map
to an elementwise builtin.
assisted by GPT 5.6-Sol via Copilot
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull vhost,vdpa,virtio updates from Michael Tsirkin:
- transport v3 support in virtio-mmio
- suspend support in vduse
- fixes, cleanups all over the place
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (54 commits)
vduse: Add suspend
vduse: do not take rwsem at reset work flush
vduse: add F_QUEUE_READY feature
vduse: add VDUSE_SET_FEATURES ioctl
vduse: add VDUSE_GET_FEATURES ioctl
vduse: store control device pointer
tools/virtio: Fix control typo in trace agent comment
tools/virtio: Fix userspace typo in vringh test comment
[13 lines not shown]
[MLIR][LLVM] Support DWARF v6 source language names in DICompileUnitAttr (#217432)
Adds support to the LLVM dialect `DICompileUnitAttr` for DWARF v6 source
language name and version .
`DICompileUnitAttr`'s `sourceLanugage` field now points to a
`DISourceLanguageNameAttr`, which contains all source language
information, including dialect, name, and version. This is done to map
as closely as possible to `llvm::DISourceLanguageName`.
`DISourceLanguageNameAttr` has parameters for:
- An DW_LANG_* language.
- A DWARF v6 DW_LNAME_* name, which can only be set if the language is
not.
- An optional language-dependent version.
- An optional target-specific language dialect.
Parsers and printers are added so if only a language is passed, it is
parsed and printed in as before this change.
Assistance from codex was used in this PR.
Merge tag 'vfio-v7.3-rc1' of https://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson:
- Add nv_falcon vfio selftest driver.
The Falcon is a general-purpose microcontroller embedded within
NVIDIA GPUs, presenting a relatively simple DMA programming
interface.
This adds another selftest target for vfio-pci with real DMA
transfers (Rubin Du, Alex Williamson)
- Add allocation assertion helpers to vfio selftests and use them to
avoid variable length arrays and the compiler errors they generate
(Alex Mastro)
- Fix use-after-free hazard where an init path error in MSI support
leaves a stray pointer that can later be reused or double-freed
[46 lines not shown]
[Clang][RISCV] Add packed saturating and rounding shift intrinsics (#217692)
Add builtins and header wrappers for `__riscv_pssha`, `__riscv_psshar`,
`__riscv_psshl` and `__riscv_psshlr`.
[lldb][Darwin] Remove libsanitizers ASan integration
The OS-provided ASan runtime (in libsanitizers)
was removed on Darwin, so remove LLDB's support
for it.
rdar://177086333
[lldb] Fold ReportRetriever back into the ASan plugin
ReportRetriever was factored out of InstrumentationRuntimeASan by
77edd9b77317 (#69388) so the compiler-rt and libsanitizers ASan plugins
could share it. The libsanitizers plugin is gone, leaving
InstrumentationRuntimeASan as the only caller, so fold ReportRetriever
back into InstrumentationRuntimeASan plugin.
[DWARFLinker] Keep address-independent block attributes in the type unit (#215932)
cloneBlockAttr dropped every block and exprloc attribute whose DIE was
placed in the artificial type unit. The intent was to discard location
expressions that resolve against a single origin compile unit, since a
type unit is shared by every unit referencing the type, but the check
was incorrectly applied to all block-form attributes.
Clang encodes DW_AT_data_member_location as DW_FORM_block1 at DWARF 2
and as a constant from DWARF 3 onward, so at DWARF 2 every member and
inheritance offset of a deduplicated record collapsed to zero. This
caused LLDB to crash when trying to build types using the wrong offsets,
but that's a separate issue.
Drop only expressions that carry a target address or reference a base
type DIE, which are the cases the type unit cannot resolve.
(cherry picked from commit 3ae0d109f87dedd2a3f5bdf517556ba3d44283d6)
[lldb] Fold ReportRetriever back into the ASan plugin
ReportRetriever was factored out of InstrumentationRuntimeASan by
77edd9b77317 (#69388) so the compiler-rt and libsanitizers ASan plugins
could share it. The libsanitizers plugin is gone, leaving
InstrumentationRuntimeASan as the only caller, so fold ReportRetriever
back into InstrumentationRuntimeASan plugin.
[lldb][Darwin] Remove libsanitizers ASan integration
The OS-provided ASan runtime (in libsanitizers)
was removed on Darwin, so remove LLDB's support
for it.
rdar://177086333
[lldb] Avoid returning a stale AddressOf (#212915)
The 'ValueObject::AddressOf()' method assumes that the address of a
value object cannot change, so when it is calculated once, it does not
need to be updated afterwards. However, this is not the case if the
'ValueObject' is a dependent object obtained by calling 'Dereference()'
of another 'ValueObject'. If the latter object is changed, the dependent
value object should return a new address from the 'AddressOf()' method
to reflect the change.
(cherry picked from commit 320164daab4148e3372f6756caaa67882e24a91f)
NAS-142152 / 26.0.0-RC.1 / Tolerate transient NTB blips before calling dlm.reset_active (by bmeagherix) (#19529)
remote_down now polls the DLM port for up to 60 seconds before ejecting
the peer, so short NTB packet loss events don't trigger a spurious
reset_active
Also raise scan_secs from the default 5 to 30 so the kernel DLM itself
doesn't start FORCEUNLOCK recovery during ~20s NTB blips.
Original PR: https://github.com/truenas/middleware/pull/19495
---------
Co-authored-by: Brian M <brian.meagher at ixsystems.com>
[CodeGen] Fix -fsanitize=array-bounds for __sized_by / _or_null pointers
`EmitCountedByBoundsChecking()` assumed a CountAttributedType is always
a __counted_by pointer. That isn't true, there are four versions of the
attribute:
* `__counted_by`: Already handled correctly.
* `__counted_by_or_null`: Incorectly handled.
* `__sized_by`: Incorreclty handled.
* `__sized_by_or_null`: Incorreclty handled.
In particular:
* __sized_by / __sized_by_or_null: the loaded bound is a byte count, but the
element index was compared against it directly, so an access was only
flagged once the index exceeded the byte count -- missing out-of-bounds
accesses for a pointee larger than one byte. Scale the index to bytes
('index * sizeof(element)') before comparing. counted_by counts elements
and is unchanged; a void (or otherwise zero-sized) pointee uses the GNU
[15 lines not shown]
zgenhostid: seed the generated hostid from the system CSPRNG
When no hostid is supplied on the command line, zgenhostid derived one
from srand48(getpid() ^ time(NULL)) followed by lrand48(). Neither
input is reliably unpredictable at the moment this runs, which is
typically early in an unattended install:
- On a machine with no usable RTC, the clock is not yet set from the
network and systemd has advanced it to the fixed epoch compiled
into the image, so time(NULL) is the same constant on every machine
booting that image.
- The PID reached at that point of a scripted install is determined
by the boot sequence, so it is the same across installs of the same
image on comparable hardware.
Two separate installs can therefore derive an identical seed and write
byte-identical hostids, which defeats the multihost protection the
hostid exists to provide. The seed is also trivially recoverable:
lrand48() is a 48-bit LCG, so a hostid can be inverted back to its seed
[17 lines not shown]
ZTS: device access tests
Tests that zpool create, add, attach and import all properly enforce the
restrictions on the calling user to access device nodes.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18960
vdev_disk: use calling cred to check for device access
bdev_file_open_by_path() does not do any kind of credential check on the
given device path, so we need to do our own. We temporarily swap in the
passed in credential as the task credential, then call kern_path() and
inode_permission(), which together will ensure the credential can both
see and access the given path.
For the reopening case, we use the kernel credential. The idea here is
that since the device was already open, we shouldn't fail to reopen just
because the calling user can't see it, which would prevent device
removal, offline, online, etc.
Include some light reorganising in the error paths, since we might not
always have a device handle to carry the current error.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
[2 lines not shown]
vdev_file: use calling cred to check for device access
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18960
zfs_file_open: add cred arg, use it to check access
If we're opening a file on behalf of the user, we need to ensure that
that user actually has access to it. Add a credential parameter to
zfs_file_open() and use it when opening the file.
Existing callers use kcred for now to get the same behaviour as before.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18960
vdev_open: pass credential to check for permission to open device
This commit adds a cred_t parameter to vdev_open() and threads it
through to all the vdev_op_open callbacks. The default is CRED(), ie the
credential of the calling task, which is usually some userspace control
process calling ioctl().
To handle the parallel vdev open case, we take additional and additional
reference to the cred for each task, and pass it down to vdev_open().
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18960
[llvm-objcopy] Avoid materializing zero-filled output gaps
Truncate seekable output at the current position before extending it to the final size. The newly extended output region reads as zero, so ELF layout gaps do not need to be tracked and explicitly written.
Continue writing zeros in bounded chunks when removed sections overwrite contents that were copied from an input segment.
Co-authored-by: Jeremy Braun <jtbraun at meta.com>
Assisted-by: OpenAI Codex