u4b: Sync usbdevs and quirs with FreeBSD
* Keep a few our additions in usbdevs and usb_quirk.h.
* Fix usb_quirk_str[] to include new quirks added for uvc(4).
* Remove a few duplicate from usbdevs.
* Fix serial/u3g.c and serial/uftdi.c to use the new product defines.
cam: Fix xpt_bus_register()/xpt_bus_deregister() to return errno
xpt_bus_register and xpt_bus_deregister returns a hybrid error that's
neither a cam_status, nor an errno, but a mix of both. Update
xpt_bus_register and xpt_bus_deregister to return an errno. The vast
majority of current users compare against zero, which can also be
spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol
to prevent comfusion (nothing returns it either).
Where the return value is saved, ensure that the variable 'error' is
used to store an errno and 'status' is used to store a cam_status where
it makes the code clearer (usually just in functions that already mix
and match). Where the return value isn't used at all, avoid storing it
at all.
Obtained-from: FreeBSD (commit 30f8afd0270e0bb70e1e0df1cf8de7a841797a30)
cam: Fix cam_sim_alloc() to avoid a potential memory leak
When both 'lock' and 'queue' were passed as NULL, the internally
allocated 'queue' would become leaked memory.
Simply assert 'lock' cannot be NULL to fix the bug.
u4b/umass: Sync with FreeBSD
FreeBSD's change in commit 7520b88860d7a79432e12ffcc47056844518bb62
(usb(4): Automagically apply all quirks for USB mass storage devices)
is deliberately ignored, because that function is buggy and has been
disabled by default in commit d41600e59c3f13419066e9dd771a03328c44624f
(usb: Make autoquirk code optional and opt out).
[CodeGen] Use unique_ptr for FunctionInfo to prevent memory leaks (#196603)
Raw pointer return from `FunctionInfo::create` caused leaks in callers
like `computeABIInfoUsingLib`, breaking BPF tests on ASan bots.
Using `std::unique_ptr` enforces automatic cleanup.
Fixes leak from #194460.
Buildbot: https://lab.llvm.org/buildbot/#/builders/52/builds/17090
Assisted-by: Gemini
[mlir][tensor] Enhance pattern to fold extract_slice(insert_slice) (#195045)
Extend the DropRedundantRankExpansionOnExtractSliceOfInsertSlice pattern
to support cases where the expanded dimensions are a subset of the
dropped dimensions, rather than requiring them to be exactly equal.
For example:
```
%inserted_slice = tensor.insert_slice %src into %dest[0, 0, 0, 0] [1, 1, 128, 480] [1, 1, 1, 1] :
tensor<128x480xf32> into tensor<1x1x128x480xf32>
%extracted_slice = tensor.extract_slice %inserted_slice[0, 0, 0, 0] [1, 1, 123, 1] [1, 1, 1, 1] :
tensor<1x1x128x480xf32> to tensor<123xf32>
```
can be folded into:
```
%extracted_slice = tensor.extract_slice %src[0, 0] [123, 1] [1, 1] :
tensor<128x480xf32> to tensor<123xf32>
```
Revert "[BOLT] Fix EH data encoding checks in relocateEHFrameSection (#195691)" (#196672)
This reverts commit 7ab26d7c3a160e1dc166f2673644baa396703ee5.
There is test failure in bolt-tests::exceptions-split-strip.test.
detect out of bound reads from an int overflow in the bpf_mem backends.
frank denis reported a problem in bpf_mem_ldw where a large indirect
load offset could have the end of buffer calculation land at UINT_MAX
and wrap, allowing a read of memory outside the buffer.
this change tweaks the buffer checks by checking if the load offset
is in range, taking that away from the buffer length, and then
checking if the size of the load is in the remaining buffer length.
this is the pattern that the bpf_mbuf_ops backend uses.
this problem also exists in bpf_mem_ldh, so this code is factored
out and used in all the bpf_mem_ops load backends.
note that this issue is specific to the bpf_mem_ops backend used
for running bpf filters against a vanilla memory buffer. this backend
is largely unused in the kernel, which almost always uses the
bpf_mbuf_ops backend to run filters against network packets in
mbufs. the bpf_mem_ops are only used by ppp(4) for the "active-filter"
[8 lines not shown]
Add basic NFSv4 change-attribute regression tests
This commit adds a variety of tests in which we validate
the behavior the the NFSv4 change-attribute FATTR4_CHANGE over
a variety of NFS operations that should advance it.
[RISCV] Use the nhs.lea.h/w/d instead of nhs.lea.h/w/d.ze with Sh1AddPat. (#196660)
The srliw already took care of zeroing the upper bits. Using the non-.ze
form is consistent with the Zba version of this pattern.
[clang][deps] Move `ScanningOutputFormat` out of the library (#196631)
Basing behavior of the dependency scanner on the final output format is
a leaky abstraction. Instead, we should aim to introduce proper feature
flags.
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas:
- ptrace(PTRACE_SETREGSET) fix to zero the target's fpsimd_state rather
than the tracer's
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64/fpsimd: ptrace: zero target's fpsimd_state, not the tracer's
Merge tag 'pci-v7.1-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull PCI fixes from Bjorn Helgaas:
- Don't fallback to bus reset after failed slot reset; a bus reset
isn't safe if the .reset_slot() callback is implemented (Keith Busch)
- Update saved_config_space upon resource assignment to fix passthrough
regressions when x86 pcibios_assign_resources() updates BARs (Lukas
Wunner)
- Initialize a temporary pci_dev->dev in sysfs 'new_id' attribute to
fix a lockdep regression after driver_override was moved from PCI to
device core (Samiullah Khawaja)
- Update MAINTAINERS email addresses (Marek Vasut, Hans Zhang)
- Add MAINTAINERS reviewer for PCIe Cadence IP (Aksh Garg)
[7 lines not shown]
[BOLT][NFCI] Consolidate DataReader::setEntryCounts (#196411)
FuncBranchData/BinaryFunction exec/external entry counts are set
in multiple places in `DataReader`:
- FBD: in `parse` and `appendFrom`,
- BF: in `preprocessProfile` and `matchProfileData`.
Consolidate to `setEntryCounts` called from `readProfile`.
Drop explicit counters, compute them from `FBD::EntryData`.
Test Plan: NFCI