On 3/24/25 8:49 PM, Shung-Hsi Yu wrote:
> Hi Ihor,
>
> On Mon, Mar 24, 2025 at 10:16:38PM +0000, Ihor Solodrai wrote:
>> On Monday, March 24th, 2025 at 1:55 PM, Eduard Zingerman <eddyz87(a)gmail.com> wrote:
>>> Hi All,
>>>
>>> The question of testing LTS kernel on BPF CI was
>>> raised by Shung-Hsi on the LSFMM today.
>>> I think, Ihor in CC can guide through the process
>>> of adding such support to the CI if decision would
>>> be made to commit to this.
>
> Thank you Eduard for start the thread.
>
> Attaching the link to the slides[1] for reference.
>
>>> Eduard.
>>
>> Hi Eduard, thanks for pinging me.
>>
>> I actually thought about implementing LTS kernel testing for libbpf,
>> but so far it was not a priority.
>
> I'm not too familiar with BPF CI, but I assuming this meant having
> libbpf's GitHub action test stable/linux.git as well, along side the
> current bpf/bpf-next.git target?
>
> It if it's that then it would be great. Exactly what I'm looking for.
Hi Shung-Hsi.
In short, yes: it's possible to set up Github Actions to run BPF
selftests on LTS kernels using current BPF CI code.
I'm afraid we don't have enough bandwidth on BPF side to maintain LTS
kernel testing within our CI infrastructure. But I will share with you
some pointers in case you're willing to take a stab at it.
All the CI code is public and you should be able to figure out how to
modify it for your needs.
https://github.com/libbpf/ci has a collection of callable Github
Actions that can be used as building blocks for kernel testing.
For example, you can use `get-linux-source` action to download any
source revision:
- uses: libbpf/ci/get-linux-source@v3
with:
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
rev: master
The actual BPF CI workflows implementation is located at
https://github.com/kernel-patches/vmtest repo. In particular, see
`.github/workflows` directory.
https://github.com/libbpf/libbpf contains a simpler version of a very
similar workflow, although it has additional code to test libbpf
builds on various distros.
>
>> ... One thing we'd need to figure out
>> is a way of determining which subset of the selftests is supposed to
>> work on a given revision.
>
> I think I might be able to help.
>
> Some question though, is the plan to run bpf-next BPF selftests on LTS
> kernels? (hence both bpf/bpf-next.git and stable/linux.git will both
> need to cloned, separately)
Well, that's a design decision for the LTS testers. I don't think it
makes sense to run all bpf-next tests on older kernels, as usually
tests are added with new features, which would be absent. But it seems
like a good idea to backport and run tests (if there are any) for
backported fixes. It feels like a lot of work though.
>
> Suppose we have some per test case annotation of the kernel release that
> its depending feature is introduced, would that work? (we might have to
> start with an even coarser grain and ignore annotating feature
> introduced long time ago)
>
> Thinking out loud here. Starting with 6.12 is likely the easiest, for
> that I'd just need annotations like like SINCE("6.14"), SINCE("6.13"),
> SINCE(BPF_LTS_TEST_BASE) where BPF_LTS_TEST_BASE is "6.12". And have
> most test group/cases annotated with SINCE(BPF_LTS_TEST_BASE). Anything
> not annotated would be considered to be bpf-next-only.
I'd be reluctant to introduce annotations directly in test
definitions. I think a better approach is to maintain allow/denylists
that control what tests to run on what revision. BPF selftests runners
already support allow/denylisting. The hard part is to actually
produce and maintain those lists.
>
> OTOH we could just use the LTS BPF selftests found in the same code base
> as the LTS kernel themselves. That seems to be eaiser as a POC.
Yes, that's a reasonable approach in the beginning.
>
>> I definitely could help setting this up, if there is a need.
>
> Definitely. If you could also give me some pointers on where to start (I
> guess I'd need to clone libbpf repo in GitHub and hack on the .github
> files), and what to watch out for that would be deeply appreciated.
One thing that you might want to explore is setting up a Kernel Patches
Daemon (KPD) instance. It can be integrated with patchwork and github to
automatically collect submitted patches and open PRs to a github
repository for CI testing.
Here is a public repository:
https://github.com/facebookincubator/kernel-patches-daemon
I don't know the details about how to set it up, but I know a couple
of subsystems besides BPF are already using it.
>
> Thanks,
> Shung-Hsi
>
> 1: https://speakerdeck.com/shunghsiyu/bpf-in-stable-kernels
This patch series contains some missing openvswitch port output fixes
for the stable 5.15 kernel.
Changes in v3:
- correct SHA reference in the second patch
Changes in v2:
- use BUILD_BUG_ON_INVALID rather than DEBUG_NET_WARN_ON_ONCE which does
not exist in Linux 5.15
Felix Huettner (1):
net: openvswitch: fix race on port output
Ilya Maximets (1):
openvswitch: fix lockup on tx to unregistering netdev with carrier
net/core/dev.c | 1 +
net/openvswitch/actions.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.34.1
Currently, the io-uring fixed buffer cmd flag is silently dismissed,
even though it does not work. This patch returns an error when the flag
is set, making it clear that operation is not supported.
Fixes: 34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
Cc: stable(a)vger.kernel.org
Signed-off-by: Sidong Yang <sidong.yang(a)furiosa.ai>
---
fs/btrfs/ioctl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 4d9305fa37a8..98d99f2f7926 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4906,6 +4906,12 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
ret = -EPERM;
goto out_acct;
}
+
+ if (cmd->flags & IORING_URING_CMD_FIXED) {
+ ret = -EOPNOTSUPP;
+ goto out_acct;
+ }
+
file = cmd->file;
inode = BTRFS_I(file->f_inode);
fs_info = inode->root->fs_info;
--
2.43.0
This patch series contains some missing openvswitch port output fixes
for the stable 5.10 kernel.
Changes in v3:
- correct SHA reference in the second patch
Changes in v2:
- use BUILD_BUG_ON_INVALID rather than DEBUG_NET_WARN_ON_ONCE which does
not exist in Linux 5.10
Felix Huettner (1):
net: openvswitch: fix race on port output
Ilya Maximets (1):
openvswitch: fix lockup on tx to unregistering netdev with carrier
net/core/dev.c | 1 +
net/openvswitch/actions.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.34.1
This patch series contains some missing openvswitch port output fixes
for the stable 5.4 kernel.
Changes in v3:
- correct SHA reference in the second patch
Changes in v2:
- use BUILD_BUG_ON_INVALID rather than DEBUG_NET_WARN_ON_ONCE which does
not exist in Linux 5.4
Felix Huettner (1):
net: openvswitch: fix race on port output
Ilya Maximets (1):
openvswitch: fix lockup on tx to unregistering netdev with carrier
net/core/dev.c | 1 +
net/openvswitch/actions.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.34.1
Hello,
New build issue found on stable-rc/linux-6.1.y:
---
stack frame size (2536) exceeds limit (2048) in
'dml314_ModeSupportAndSystemConfigurationFull'
[-Werror,-Wframe-larger-than] in
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.o
(drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c)
[logspec:kbuild,kbuild.compiler.error]
---
- dashboard: https://d.kernelci.org/i/maestro:648fbfc56c50cbf6f8e1b118aecda05fbf80323c
- giturl: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
- commit HEAD: f5ad54ef021f6fb63ac97b3dec5efa9cc1a2eb51
Log excerpt:
=====================================================
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_mode_vba_314.c:3890:6:
error: stack frame size (2536) exceeds limit (2048) in
'dml314_ModeSupportAndSystemConfigurationFull'
[-Werror,-Wframe-larger-than]
3890 | void dml314_ModeSupportAndSystemConfigurationFull(struct
display_mode_lib *mode_lib)
| ^
CC drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_ipp.o
1 error generated.
=====================================================
# Builds where the incident occurred:
## x86_64_defconfig+kselftest+x86-board on (x86_64):
- compiler: clang-17
- dashboard: https://d.kernelci.org/build/maestro:67e4241067593f2aa035cf70
#kernelci issue maestro:648fbfc56c50cbf6f8e1b118aecda05fbf80323c
Reported-by: kernelci.org bot <bot(a)kernelci.org>
--
This is an experimental report format. Please send feedback in!
Talk to us at kernelci(a)lists.linux.dev
Made with love by the KernelCI team - https://kernelci.org
During a warm reset via kexec, the system bypasses the driver removal
sequence, meaning that the remove() callback is not invoked.
If a QAT device is not shutdown properly, the device driver will fail to
load in a newly rebooted kernel.
This might result in output like the following after the kexec reboot:
QAT: AE0 is inactive!!
QAT: failed to get device out of reset
c3xxx 0000:3f:00.0: qat_hal_clr_reset error
c3xxx 0000:3f:00.0: Failed to init the AEs
c3xxx 0000:3f:00.0: Failed to initialise Acceleration Engine
c3xxx 0000:3f:00.0: Resetting device qat_dev0
c3xxx 0000:3f:00.0: probe with driver c3xxx failed with error -14
Implement the shutdown() handler that hooks into the reboot notifier
list. This brings down the QAT device and ensures it is shut down
properly.
Cc: <stable(a)vger.kernel.org>
Fixes: 890c55f4dc0e ("crypto: qat - add support for c3xxx accel type")
Reviewed-by: Ahsan Atta <ahsan.atta(a)intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu(a)intel.com>
---
drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c b/drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c
index 260f34d0d541..bceb5dd8b148 100644
--- a/drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c
+++ b/drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c
@@ -209,6 +209,13 @@ static void adf_remove(struct pci_dev *pdev)
kfree(accel_dev);
}
+static void adf_shutdown(struct pci_dev *pdev)
+{
+ struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
+
+ adf_dev_down(accel_dev);
+}
+
static const struct pci_device_id adf_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_QAT_C3XXX) },
{ }
@@ -220,6 +227,7 @@ static struct pci_driver adf_driver = {
.name = ADF_C3XXX_DEVICE_NAME,
.probe = adf_probe,
.remove = adf_remove,
+ .shutdown = adf_shutdown,
.sriov_configure = adf_sriov_configure,
.err_handler = &adf_err_handler,
};
--
2.48.1