[flang][OpenMP] Update semantic checks for LINEAR clause (#177055)
Fixes https://github.com/llvm/llvm-project/issues/173980.
In particular, make step-simple-modifier be compatible (i.e. not
exclusive) for OpenMP spec versions < 52, and update the modifier
validity checks for the construct on which the clause is located.
[mlir][dataflow] Drop the firstIndex argument of visitNonControlFlowArguments (#175210)
This PR improves the signature of `visitNonControlFlowArguments`:
- The function now takes non-successor-inputs ("non-control-flow
arguments") instead of successor inputs. This is more consistent with
the naming of the function.
- `firstIndex` is no longer needed and dropped. (It was needed only to
identify the non-successor-inputs among the block arguments / op
results.)
Background: Successor inputs are forwarded values (e.g., iter_args / op
results of an `scf.for`) and non-successor-inputs are all other block
arguments / op results (e.g., the loop induction variable of an
`scf.for`.)
Note for LLVM integration: `visitNonControlFlowArguments` now receives
the non-successor-input directly. You no longer have to find those among
the list of all block arguments / op results based on `firstIndex`.
RFC:
https://discourse.llvm.org/t/rfc-drop-the-firstindex-argument-of-visitnoncontrolflowarguments-of-sparseforwarddataflowanalysis/89419/5
[flang] remove AbstractConverter.h include from IntrinsicCall.h (#178150)
AbstractConverter.h is pulling a lot of headers, including some from
Evaluate. This causes any library using IntrinsicCall.h to have to link
against FortranEvaluate and FortranSupport while there is no actual
need/usage of Evaluate data structures.
I opened https://github.com/llvm/llvm-project/issues/178142 to fully
remove the AbstractConverter from IntrinsicCall.cpp, but for now this
patch should at least prevent the consumers of IntrinsicCall.h to
bring-in these extra libraries.
Should solve the DEBUG build problem from
https://github.com/llvm/llvm-project/pull/178076.
[flang] emit declare for function result before call (#177615)
This change moves the declare of result storage alloca before the call
so that alias analysis can revert to linking fir.declare to the fisrt
dominating dummy_scope instead of the dominating one.
This is only relevant when MLIR inlining is enabled and is the first
step to fix issues recent TBAA changes that placed target data in its
own tree exposed an issue with the result storage of a TARGET result.
After inlining, the usages of the result storage inside the callee and
after the call ended-up being placed in different nodes (target and non
target) of the same TBAA tree (for the dominating function).
The fact that both nodes are placed in the same tree stems from
https://github.com/llvm/llvm-project/pull/146006 that fixed another TBAA
issue related to MLIR inlining and function result where the function
result was placed into the wrong TBAA tree, which with nested inlining
could end-up being the tree of a callee where the result storage was a
dummy, causing the TBAA to wrongfully tell that any access to the result
[7 lines not shown]
[flang] propagate IVDEP in array expressions optimization (#178171)
Follow-up on https://github.com/llvm/llvm-project/pull/177940.
This propagates the access attribute in cases where hlfir.assign is
being transformed in array expression optimizations.
It also adds handling for the cases where there are WHERE/FORALL or user
defined assignments inside the loop and that an hlfir.region_assign is
first being generated.
firewall: The mvc page stores the overload table as UUID, the legacy page as alias name. Try to determine if the alias is not a name, and then resolve it to a name before setting it in pf configuration.
Avoid type confusion in the timestamp response parsing
A malformed v2 signing cert can lead to a type confusion, and the result
is a read from an invalid memory address or NULL, so a crash. Unlike for
OpenSSL, v1 signing certs aren't affected since miod fixed this in '14.
Reported by Luigino Camastra, fix by Bob Beck, via OpenSSL, CVE 2025-69420.
ok jsing
[flang][acc] remap variable in device_ptr clauses (#177018)
I previously disabled the variable remapping to data operand results in
the IR for the deviceptr clause because it was not clear how fir.box
would be dealt with and the remapping increased the usage of fir.box.
Since then, it was clarified that lowering could use fir.box and that it
would be up to the runtime to deal with the fact that the fir.box is
implemented by a descriptor allocated on the host and containing the
base address of an entity on the device.
Remove the workaround.
[mlir][Linalg] implement bufferization for `linalg.pack` (#177982)
Add a BufferizableOpInterface implementation for linalg.pack now that
pack supports memref semantics
https://github.com/llvm/llvm-project/commit/4b066c7fff3455dc547fabb676583391febe41e9.
This completes the op’s bufferization path and avoids copy-before-write
for destination operands.
---------
Signed-off-by: Ryutaro Okada <1015ryu88 at gmail.com>
Avoid type confusion in PKCS#12 parsing
A type confusion can lead to a 1-byte read at address 0x00-0xff, so a
crash.
Reported by Luigino Camastra, fix by Bob Beck, via OpenSSL, CVE 2025-22795
ok jsing
multimedia/v4l-utils: Fix build on CURRENT/STABLE
In file included from dvbv5-daemon.c:43:
/usr/include/search.h:80:7: error: expected identifier or '('
80 | void tdestroy(void *, void (*)(void *));
| ^
dvbv5-daemon.c:24:23: note: expanded from macro 'tdestroy'
24 | #define tdestroy(...) do {} while (0)
| ^
In file included from dvbv5-daemon.c:43:
/usr/include/search.h:80:7: error: while loop outside of a function
dvbv5-daemon.c:24:29: note: expanded from macro 'tdestroy'
24 | #define tdestroy(...) do {} while (0)
| ^
Use native tdestroy(3) on 16-CURRENT and 15-STABLE after [1] and [2],
respectively.
[1] https://cgit.freebsd.org/src/commit/?id=b8c99e7d912f0dad84cec80f8c4331646b87a3ec
[6 lines not shown]
multimedia/v4l-utils: Fix build on CURRENT/STABLE
In file included from dvbv5-daemon.c:43:
/usr/include/search.h:80:7: error: expected identifier or '('
80 | void tdestroy(void *, void (*)(void *));
| ^
dvbv5-daemon.c:24:23: note: expanded from macro 'tdestroy'
24 | #define tdestroy(...) do {} while (0)
| ^
In file included from dvbv5-daemon.c:43:
/usr/include/search.h:80:7: error: while loop outside of a function
dvbv5-daemon.c:24:29: note: expanded from macro 'tdestroy'
24 | #define tdestroy(...) do {} while (0)
| ^
Use native tdestroy(3) on 16-CURRENT and 15-STABLE after [1] and [2],
respectively.
[1] https://cgit.freebsd.org/src/commit/?id=b8c99e7d912f0dad84cec80f8c4331646b87a3ec
[4 lines not shown]
linker: Reset DMAP protections in link_elf_unload_file()
On x86, when a preloaded kernel module is unloaded, we free the backing
(physically contiguous) pages. The ET_REL linker will have adjusted
protections on segments of the preloaded file, which updates the direct
map, so the original protections must be restored when unloading the
module.
Previously this was handled in kmem_bootstrap_free(), but there is no
apparent reason not to handle this within the kernel linker. Moreover,
we were not resetting permissions in the kernel map on arm64.
Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D54438
(cherry picked from commit 203e5a1eeec1153b0bcb230ccfb90531fa8cbeb5)
in6: Add a helper function to compute expiry times
Tidy up a bunch of places that have the same duplicated logic. Simplify
callers of in6_init_prefix_ltimes(). No functional change intended.
Reviewed by: pouria, zlei, tuexen, glebius
MFC after: 2 weeks
Sponsored by: OPNsense
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54561
(cherry picked from commit fb08f80eaf90eb7ace202d8604634fc181be8980)
in6: Modify address prefix lifetimes when updating address lifetimes
When one uses SIOCAIFADDR_IN6 to add a v6 address, it's possible to set
the preferred and valid lifetimes of the address. If the address
already exists, this ioctl will recalculate and update the expiry times
based on the provided timestamps.
When adding a new address, the lifetimes are inherited by the prefix as
well, but only if we create a new prefix. If the prefix already exists,
as it will in the case where an address is being updated rather than
being added, we do not touch the prefix lifetimes at all. This means
that the original address lifetime still applies to the route associated
with that prefix, so when the prefix expires, the route goes away.
This behaviour doesn't make a lot of sense: if the admin updates an
address lifetime, we should ensure that the prefix lifetime is updated
too. Make that change, ensuring that we do not shorten the prefix
lifetime, as the prefix might be shared among multiple interface
addresses.
[11 lines not shown]
[LifetimeSafety] Add fixit verification of lifetimebound suggestions (NFC) (#177763)
We first run -fixit mode and apply fixes in-place, then check with
-Werror=lifetime-safety-suggestions if something is left unfixed (which
means annotations are missing)
mk: remove outdated code piece
This was trying to handle fortran in NetBSD<1.5 - but NetBSD 1.4 already
had a fortran compiler in base, and fortran is autodetected nowadays.
[mlir] Avoid segfault in 'MoveBlockRewrite' rollback (#178148)
Prior to this change, rollback of the `MoveBlockRewrite` could result in
segfault if the block wasn't contained in a region anymore.
That situation could arise if the previous rollback of another rewrite
orphaned the block by removing it from its region, as demonstrated by
the new test pattern.
Signed-off-by: Lukas Sommer <lukas.sommer at amd.com>