[libc] Use a syscall wrapper for remap_file_pages
This PR move remap_file_pages behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for posix_madvise
This PR move posix_madvise behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
[VPlan] Factor out VPSCEVExpander::canExpandInIR (NFC). (#240063)
Split off the check for expressions that are expanded in IR and hoisted
out of HoistOutOf, to reuse it in follow-ups.
[LV] Remove InnerLoopVectorizer (NFC) (#240055)
All that is left of InnerLoopVectorizer is a bundle of state passed to
executePlan, of which only the assumption cache, a fresh IRBuilder and
whether runtime checks were generated are used, plus fixVectorizedLoop,
which runs legacyCSE on the vector loop header.
Create the IRBuilder in executePlan, take the assumption cache from
Legal, pass whether there are runtime checks as a bool and run legacyCSE
directly. Also drop executePlan's DominatorTree argument, which is the
same as the planner's DT member, and update comments that still refer to
InnerLoopVectorizer.
PR: https://github.com/llvm/llvm-project/pull/240055
[KnownFPClass][NFC] Move fma logic out of fadd_impl, and document rounding mode assumption made by fadd/fsub (#240054)
I have plans to improve deductions made by `fadd`/`fsub` and `fma`.
However, some of these deductions are only valid for `fadd`/`fsub`, so I
have moved the `fma` logic outside of `fadd_impl` and into its own
`fma_impl` function. This allows us to make improvements to `fadd/fsub`
independently of `fma`, and it also makes it easier to audit
improvements to `fma`.
I also have plans to support the rounding mode for primitive arithmetic
functions https://github.com/llvm/llvm-project/issues/228974, so I have
documented the `NearestTiesToEven` assumption that `fadd_impl` makes
when ruling out `-0.0`, allowing `fadd_impl` to be valid for all
rounding modes.
xdr: Limit xdr_wrapstring
The previous commit (re)introduced the possibility that a malicious or
corrupt message can cause the receiver to allocate a very large amount
of memory before realizing that the message is much shorter than
claimed. Revert the change to xdr_wrapstring() to avoid this.
Fixes: d2018cedb414 ("xdr: Fix xdr_string")
Reported by: bjk@
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D60898
xdr: Limit xdr_wrapstring
The previous commit (re)introduced the possibility that a malicious or
corrupt message can cause the receiver to allocate a very large amount
of memory before realizing that the message is much shorter than
claimed. Revert the change to xdr_wrapstring() to avoid this.
Fixes: d2018cedb414 ("xdr: Fix xdr_string")
Reported by: bjk@
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D60898
iSCSI: Fast and per-session timeouts
Support per-session configurable ping (SCSI NOP) and login timeouts
similar to what is supported in the Linux iSCSI initiator configuration file.
Reduce iscsi timer granularity to 0.1 sec.
For backwards compatibility, when all timers are selected on integer numbers,
all status messages are unchanged. If the higher granularity is used, the
log messages include sub-second granularity.
The sysctl(3) interface has changed from pure int to string, in order to
support fractional seconds in a human-readable, dotted notation.
Reviewed By: #netapp, #manpages, jhb, pauamma_chezdork.com, siderop1_netapp.com
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D32540
iSCSI: Fast and per-session timeouts
Support per-session configurable ping (SCSI NOP) and login timeouts
similar to what is supported in the Linux iSCSI initiator configuration file.
Reduce iscsi timer granularity to 0.1 sec.
For backwards compatibility, when all timers are selected on integer numbers,
all status messages are unchanged. If the higher granularity is used, the
log messages include sub-second granularity.
The sysctl(3) interface has changed from pure int to string, in order to
support fractional seconds in a human-readable, dotted notation.
Reviewed By: #netapp, #manpages, jhb, pauamma_chezdork.com, siderop1_netapp.com
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D32540
[SLP] Give failed seed a try
Previously, with the following vectorizable code:
y = x * x * x;
where IR ordered the code as:
sq = x * x;
y = sq * x;
If the seed is [sq0, y0, sq1, y1] and the cost model rejects
vectorizing sq0 and sq1, y0 will be bypassed without any retry in `I
+= ActualVF - 1`.
To fix this, we give skipped nodes a chance by using them as the root
of the tree and rebuilding it. In the retry logic, we starts from
bring the child of failure match (sq0,sq1) but uses FirstSkipped as
the filter. In here, [y0, y1] will be the new User to go
TryVectorizeWindow. If it still fails, it tried to bring its child in
as the next level try. For example, [sq0, y0, z0, sq1, y1, z1]. [y0,
y1] will brings [z0, z1] in until converge.
[SLP] Pruning when there is no Undef
By checking all (two) of the users of isGuaranteedNotToBePoison.
1. IsNotPoisonedVec: FindReusedSplat do same check as HasUndefScalars
so it never called and can safely prunning.
2. all_of(NonConstants, [=](Value *V)...: Also do the same check as
HasUndefScalars.
Nowadays, we generates very few undef value. So the prunning here
makes sense as we try to do linear check to find a possible undef
instead of calling the very expensive isGuaranteedNotToBePoison.
[SLP][NFC] Add tests for dependent seeds in rejected windows
Precommit tests for the once-used seeds that depend on each other, such
as x * x and x * (x * x), whose window is rejected and whose users are
bypassed by the window walk.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[flang][openacc] Do not implicitly map whole common block when not needed (#239772)
A common block that is used in a compute region only as the `storage`
operand of the fir.declare of its members must not be implicitly mapped
as a
whole as it would clash with explicit mappings of the individual
members. When the common block is accessed directly, the mapping can be
done like before.
Merge tag 'for-7.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba:
"A btrfs fixes. The ones that could have some user noticeable impact
are enumerated, the rest is one-liners.
- fix chattr failing on files with nodatasum and compress flags
- fix inode defrag status with concurrent truncation so it's not
skipped in defrag in the future
- fix merging compressed extent in fiemap output
- fix deleting wrong subvolume by id if it gets renamed during the
ioctl
- error handling fixes: sysfs, quotas, fs-verity, scrub, zoned mode"
* tag 'for-7.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
[16 lines not shown]
Merge tag 'ksmbd-for-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb
Pull smb server updates from Namjae Jeon:
- Validate EA-name NUL termination to prevent out-of-bounds reads in
debug logging. Return STATUS_EA_LIST_INCONSISTENT for malformed EA
names in CREATE and SET_INFO requests.
- Grant the owner's implicit READ_CONTROL and WRITE_DAC rights when no
ACE names it, including MAXIMUM_ALLOWED handling, while respecting
applicable OWNER RIGHTS ACEs.
- Check group membership before granting permissions from a POSIX ACL
group entry, preventing unintended access when a caller's UID matches
the group's numeric GID.
- Avoid reading past the DACL when logging an access denial by printing
the requested and allowed access masks instead.
[23 lines not shown]
[SLP]Use fma as copyable main op without fmuladd lanes
fma(V, 1.0, -0.0) and fma(0.0, -0.0, V) equal V exactly, so fma
bundles model non-fma lanes as copyables, like fmuladd. fma lanes
never absorb fmul/fadd, so fma loses ties with fmul/fadd.
Assisted-by: Cursor
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/240039