Revert "sys: Bump 32-bit kernel removal to 16.0"
32-bit powerpc and i386 kernels still exist in 14.x, so we don't want to
imply that those may persist until 16.0. The message only claims that
the kernels "may be" removed in 15.0 anyhow.
This reverts commit c19688407a2c797e74762aebd90c1f1cc70ab726.
Reported by: jhb
proc: Fix proc_init / proc_dtor ordering issues
* Move the initialization of p_ktr into proc_init() and make the check
in proc_dtor() unconditional. Prior to this, it was possible to fail
and invoke proc_dtor() after the first thread had been created (which
was the condition for checking p_ktr in proc_dtor()) but before p_ktr
had been initialized.
* Move the p_klist initialization in fork1() past the last possible
failure point so we don't have to free it on failure. We didn't,
which meant we were leaking a knlist every time we failed to fork
due to hitting the resource limit.
PR: 291470
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54215
(cherry picked from commit 026d962ef14dafe19fa73361bea6dcc95f141dfa)
ipfilter: Prevent stack buffer overflow
When copying ipfs data from user space, don't just check that the payload
length is nonzero, but also that it does not exceed the size of the stack
buffer we're copying it into.
While we're at it, use a union to create a buffer of the exact size we
need instead of guessing that 2048 will be enough (and not too much).
Finally, check the size of the payload once it gets to where it's used.
MFC after: 3 days
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D54194
(cherry picked from commit a34c50fbd2a52bb63acde82e5aec4cb57880e39b)
vfs: Let prison_enforce_statfs zero the fsid
Currently, we unconditionally zero the fsid before returning a struct
statfs to a jailed process. Move this into prison_enforce_statfs() so
it only happens if enforce_statfs is greater than 1, or enforce_statfs
is 1 but the mountpoint is outside the jail.
PR: 291301
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54214
(cherry picked from commit d4f25d0c7957f0f1960028eec82625c2d6405537)
ipfilter: Prevent stack buffer overflow
When copying ipfs data from user space, don't just check that the payload
length is nonzero, but also that it does not exceed the size of the stack
buffer we're copying it into.
While we're at it, use a union to create a buffer of the exact size we
need instead of guessing that 2048 will be enough (and not too much).
Finally, check the size of the payload once it gets to where it's used.
MFC after: 3 days
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D54194
(cherry picked from commit a34c50fbd2a52bb63acde82e5aec4cb57880e39b)
vfs: Let prison_enforce_statfs zero the fsid
Currently, we unconditionally zero the fsid before returning a struct
statfs to a jailed process. Move this into prison_enforce_statfs() so
it only happens if enforce_statfs is greater than 1, or enforce_statfs
is 1 but the mountpoint is outside the jail.
PR: 291301
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54214
(cherry picked from commit d4f25d0c7957f0f1960028eec82625c2d6405537)
proc: Fix proc_init / proc_dtor ordering issues
* Move the initialization of p_ktr into proc_init() and make the check
in proc_dtor() unconditional. Prior to this, it was possible to fail
and invoke proc_dtor() after the first thread had been created (which
was the condition for checking p_ktr in proc_dtor()) but before p_ktr
had been initialized.
* Move the p_klist initialization in fork1() past the last possible
failure point so we don't have to free it on failure. We didn't,
which meant we were leaking a knlist every time we failed to fork
due to hitting the resource limit.
PR: 291470
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54215
(cherry picked from commit 026d962ef14dafe19fa73361bea6dcc95f141dfa)
ipfilter: Prevent stack buffer overflow
When copying ipfs data from user space, don't just check that the payload
length is nonzero, but also that it does not exceed the size of the stack
buffer we're copying it into.
While we're at it, use a union to create a buffer of the exact size we
need instead of guessing that 2048 will be enough (and not too much).
Finally, check the size of the payload once it gets to where it's used.
MFC after: 3 days
Reported by: Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D54194
(cherry picked from commit a34c50fbd2a52bb63acde82e5aec4cb57880e39b)
proc: Fix proc_init / proc_dtor ordering issues
* Move the initialization of p_ktr into proc_init() and make the check
in proc_dtor() unconditional. Prior to this, it was possible to fail
and invoke proc_dtor() after the first thread had been created (which
was the condition for checking p_ktr in proc_dtor()) but before p_ktr
had been initialized.
* Move the p_klist initialization in fork1() past the last possible
failure point so we don't have to free it on failure. We didn't,
which meant we were leaking a knlist every time we failed to fork
due to hitting the resource limit.
PR: 291470
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54215
(cherry picked from commit 026d962ef14dafe19fa73361bea6dcc95f141dfa)
vm: Fix kstack alignment assertion
The expectation that the allocation will be aligned to the kstack size
only applies when allocating from a kstack arena, not when allocating a
non-standard size from the kernel arena.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Fixes: 7a79d0669761 ("vm: improve kstack_object pindex calculation to avoid pindex holes")
Reviewed by: bnovkov, siderop1_netapp.com
Differential Revision: https://reviews.freebsd.org/D54171
(cherry picked from commit a35545ee02680cee04c354b50182dd94d4489666)
vfs: Let prison_enforce_statfs zero the fsid
Currently, we unconditionally zero the fsid before returning a struct
statfs to a jailed process. Move this into prison_enforce_statfs() so
it only happens if enforce_statfs is greater than 1, or enforce_statfs
is 1 but the mountpoint is outside the jail.
PR: 291301
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54214
(cherry picked from commit d4f25d0c7957f0f1960028eec82625c2d6405537)
[BOLT] Add Dockerfile for testing
Add utils/docker-tests/Dockerfile to facilitate in-tre and out-of-tree
testing.
Builds perf from source to work around an Ubuntu 24.04 issue.
To reproduce a specific issue adjust the Dockerfile like:
```
RUN git clone https://github.com/llvm/llvm-project
RUN cd llvm-project && git checkout <SHA>
```
[MLIR][LLVM] Fix uses of LLVM's visibility attr (#173024)
I noticed that I was using LLVM::VisibilityAttr::name when looking for
the attribute on LLVM ops, but LLVM::VisibilityAttr::name is just
"builtin.integer"... Now we switch on the types of the specific ops we would
like to match, and use the getters/setters for the attribute directly instead of
the deprecated setAttr/getAttr.
[CodeGen][NPM] Avoid MachineModuleInfo in MachineModuleSlotTracker (#171257)
This work is a continuation of
[PR#140530](https://github.com/llvm/llvm-project/pull/140530),
co-authored by @optimisan.
The PR refactors `MachineModuleSlotTracker` to support both the Legacy
Pass Manager and New Pass Manager by removing its direct dependency on
`MachineModuleInfo`.
`MachineModuleSlotTracker` requires `MachineModuleInfo` to obtain
`MachineFunction` instances when printing MIR. But
`MachineFunctionAnalysis` provides `MachineFunction` for NPM.
This patch refactors `MachineModuleSlotTracker` to use a function
callback (`MFGetterFnT`) instead of directly depending on
`MachineModuleInfo`.
---------
Co-authored-by: vikhegde <vikram.hegde at amd.com>