Skip to content

[ciq-6.18.y-next] Multiple patches tested (100 commits)#1385

Open
ciq-kernel-automation[bot] wants to merge 102 commits into
ciq-6.18.y-nextfrom
{automation_tmp}_ciq-6.18.y-next
Open

[ciq-6.18.y-next] Multiple patches tested (100 commits)#1385
ciq-kernel-automation[bot] wants to merge 102 commits into
ciq-6.18.y-nextfrom
{automation_tmp}_ciq-6.18.y-next

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

github actions: Make Builds on Merge Request Work

Setting up the default build configs to ensure everything builds when we
update and rebase.
arm64: add kernel config option to lock down when in Secure Boot mode

jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
	    summary line.
efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode

jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.
UEFI machines can be booted in Secure Boot mode.  Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
enabled.
efi: Lock down the kernel if booted in secure boot mode

jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.
mtd: phram,slram: Disable when the kernel is locked down

jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.
Add efi_status_to_str() and rework efi_status_to_err().

jira LE-2629
feature Fedora EFI status status
ommit 7a60169d168d6aae70aca10b7b71070666068529
commit-source https://gitlab.com/cki-project/kernel-ark/
[CIQ] v6.18.3 - rebased configs

CONFIG_SPI_MICROCHIP_CORE is no longer a valid config option in 6.18.3
 spi: microchip: rename driver file and internal identifiers
 Upstream 71c814e98696f2cd53e9e6cef7501c2d667d4c5a
[CIQ] v6.18.7 - rebased configs

Upstream commit 5ba2f0a15564 (mm: introduce deferred freeing for
kernel page tables) was backported which adds new config option
ASYNC_KERNEL_PGTABLE_FREE.  Then upsteam commit e37d5a2d60a3
(iommu/sva: invalidate stale IOTLB entries for kernel address space)
was backported which selects it by default for x86 configs that have
selected IOMMU_SVA (which our x86_64 configs have)
 iommu/sva: invalidate stale IOTLB entries for kernel address space
 Upstream e37d5a2d60a338c5917c45296bac65da1382eda5
[CIQ] v6.18.9 - rebased configs

The config dependency on DEVICE_PRIVATE for DRM_GPUSVM was removed,
causing it to be selected by default for configs with DRM_XE (like ours).
Because DRM_GPUSVM is now enabled, DRM_XE_USERPTR_INVAL_INJECT is valid,
but not selected by default.
 drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE
 Upstrea: bdcdf968be314b6fc8835b99fb4519e7619671e6 upstream.
[CIQ] v6.18.14 - rebased configs

ATH9K_AHB now depends on OF to be selected by default.  x86_64
configs do not have OF.  This is fine since ahb bus is arm only.
 wifi: ath9k: add OF dependency to AHB
 upstream: 125e7b31f041cc0a4ede1e42bef69915f0a63a35
[CIQ] v6.18.17 - rebased configs

WARN_ALL_UNSEEDED_RANDOM was removed completely
 Remove WARN_ALL_UNSEEDED_RANDOM kernel config option
 Upstream: 7dff99b354601dd01829e1511711846e04340a69
configs: Enable INTEL_TDX_HOST for x86_64 configs

There are customers that will need this enabled by default
Import initial dist-git for 6.18.19

kernel.spec: Fix buildid and pkgrelease

This matches the 6.12 spec
Remove gating.yaml

Update sbat templates

We are defining the product as clk so if we ever need to revoke or
deny the cert we can target this specific product
Ensure all qdiscs are in modules-core

by design, kernel-ark blacklists all modules in modules-extra that have
a module alias. Now that qdiscs have their module alias [1], some of them
became blacklisted even if we didn't really intend to: move them back to
kernel-modules to preserve feature parity with other qdiscs (and
previous
releases).
Remove modules-rt-kvm references

We don't have that
Set buildid to .1

And define pkgrelease using buildid.
rocky: generalize rule for kunit and test kmod placement

Rename package to kernel-clk6.18

Remove gemini switch

This comes from kernel-ark and is part of their solution for a
kernel variant that should supplant the factory kernel.  Since thats
not what we want, remove this to avoid any confusion.
Add Provides/Conflicts for non-parallel installable kernel-* packages

Adds Provides and Conflicts tags to kernel-clk6.18-* packages that
cannot be parallel installed with stock Rocky kernel packages:
- kernel-doc
- kernel-headers
- kernel-cross-headers
- kernel-debuginfo-common
- kernel-tools
- kernel-tools-libs
- kernel-tools-libs-devel
- kernel-selftests-internal
Rename tool packages with pkg_suffix and add Provides/Conflicts

Introduce %{pkg_suffix} macro (clk%{patchversion}) and use it for:
- package_name: kernel-%{pkg_suffix}
- tool packages: perf, python3-perf, libperf, rtla, rv
Use gzip for symvers compression to match upstream

Switch Module.symvers compression from the dynamic %compression
macro (xz) to hardcoded gzip -c9, matching the upstream kernel spec.
Also fixes the ghost file permissions from 0644 to 0600.
Add +clk6.18 suffix to kernel version string (uname -r)

Inject +%{pkg_suffix} into KVERREL and the shell-level equivalents
(KernelVer, DevelDir, EXTRAVERSION) so that uname -r shows the CLK
kernel identity, e.g. 6.18.19-1.1.el9_ciq.x86_64+clk6.18.
Add kernel-clk6.18-default package to set default kernel

Consolidate spec version defines and prevent CLK kernel from hijacking boot default

Reduce duplicated version numbers in the spec to single sources of truth:
- kernel_major_minor, kernel_patch, and buildid are the base defines
- specversion, kversion, patchlevel, pkgrelease, specrelease, and
  tarfile_release are all derived from them
- Remove specrpmversion (identical to specversion)
- Add el_version for tarball naming
Rework -default package and clean up tool subpackage naming

Move -default subpackage out of %if %{with_tools} guard so it exists
independently of the tools build flag.  Add Requires(posttrans) on
-core to guarantee vmlinuz is installed before grubby runs.  Add
Provides/Conflicts on kernel-provider(default) for mutual exclusion.
Bundle bindgen-cli from source for Rocky 9.6 builds

The bindgen tool required for kernel Rust support is not packaged in
Rocky Linux 9.6. Replace the bindgen BuildRequires with a bundled
bindgen-cli crate built from vendored source during the RPM build.
[CIQ] v6.18.20 - updated spec

[CIQ] v6.18.21 - updated spec

github actions: Inherit the Kernel CI Automated workflow from main

spec: Skip certificate setup for noarch builds

Update spec for ciq_kernel-6.18.21-2

We've picked up a source code change to fix a kallsym issue and
a spec file change to address noarch builds while secure boot signing
github actions: Use trigger for kernelCI

Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
github actions: Trigger kernelCI on ciq-6.18.y-next branches

[CIQ] v6.18.22 - updated spec

spec: Fix posttrans script to handle noarch package expansion

[CIQ] ciq_kernel-6.18.22-2 - updated spec

spec: update branding in package descriptions and log messages

github actions: add RPM build workflow for x86_64 and aarch64

configs: enable legacy iptables/ip6tables support for all architectures

A customer running anetd (Google's GKE networking agent, a fork of
Cilium) reported that their nodes fail to reach Ready status because
anetd fatally exits when it cannot load the ip6_tables, ip6table_filter,
ip6table_mangle, and ip6table_raw kernel modules.
Add generic kernel Provides to spec

Adds 'Provides: kernel = version' to base package for compatibility
with packages depending on generic kernel capability.
Add generic kernel-headers and kernel-devel Provides to spec

Add versioned Provides for kernel-headers, kernel-devel, and
kernel-devel-<arch> so the namespaced CLK packages satisfy the same
dependency capabilities as stock Rocky kernel packages.
bundle_bindgen: add set -e, curl --fail, and SHA256 verification

- Add set -e so the script exits on any command failure
- Add -f (--fail) to curl so HTTP errors are caught
- Verify the downloaded crate against the known SHA256 from crates.io
  before extracting
[CIQ] v6.18.27 - rebased configs

ARM64_ERRATUM_4193714 was added and defaults to y if
you have ARM64 (which our aarch64 configs have)
 arm64: errata: Work around early CME DVMSync acknowledgement
 Upstream: 0baba94a9779c13c857f6efc55807e6a45b1d4e4
[CIQ] v6.18.27 - updated spec

generate_tarball: Also strip leading v from tags

[CIQ] v6.18.28 - updated spec

[CIQ] ciq_kernel-6.18.28-2 - updated spec

[CIQ] v6.18.31 - updated spec

[CIQ] v6.18.33 - updated spec

bundle_bindgen: add User-Agent header to crates.io request

crates.io returns 403 for API requests without a User-Agent header.
[CIQ] ciq_kernel-6.18.33-2 - updated spec

kernel-clk6.18: require ciq-kmod and ship %clk_version macro file

- Add Requires: ciq-kmod to the main meta package
- Install macros.kernel-clk6.18-<ver>-<rel> into %{buildroot}/usr/lib/rpm/macros.d/
  during BuildKernel() (base variant only); defines %clk_version for kmod builds
- Versioned filename avoids collisions when multiple installonly devel packages coexist
- Ship as a real file in kernel-clk6.18-devel (no ghost, no scriptlets)
random: Add hook to override device reads and getrandom(2)

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 6892c65de813d311f20443401e528b4dc56872ff
commit-source https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10
crypto: rng - Override drivers/char/random in FIPS mode

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 8b0beca705b3877e24cccdd672422c66bbd75635
commit-source https://gitlab.com/cki-project/kernel-ark
not upstream: Disable vdso getrandom when FIPS is enabled

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 248b8056b11ed8e4b9004f401c75b7c72c3b27e4
commit-source https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10
crypto: ecdh - implement FIPS PCT

commit -
commit-source https://build.opensuse.org/public/source/SUSE:SLE-15-SP6:GA/kernel-source/patches.suse.tar.bz2
commit-patch-path patches.suse/crypto-ecdh-implement-FIPS-PCT.patch
crypto: essiv - Zeroize keys on exit in essiv_aead_setkey()

In essiv_aead_setkey(), use the same logic as crypto_authenc_esn_setkey()
to zeroize keys on exit.
crypto: drbg - Align buffers to at least a cache line

None of the ciphers used by the DRBG have an alignment requirement; thus,
they all return 0 from .crypto_init, resulting in inconsistent alignment
across all buffers.
mm/gup: introduce pin_user_pages_fast_only()

Like pin_user_pages_fast(), but with the internal-only FOLL_FAST_ONLY flag.
crypto: rng - Convert crypto_default_rng_refcnt into an unsigned int

There is no reason this refcount should be a signed int. Convert it to an
unsigned int, thereby also making it less likely to ever overflow.
crypto: rng - Fix priority inversions due to mutex locks

Since crypto_devrandom_read_iter() is invoked directly by user tasks and is
accessible by every task in the system, there are glaring priority
inversions on crypto_reseed_rng_lock and crypto_default_rng_lock.
crypto: rng - Implement fast per-CPU DRBG instances

When the kernel is booted with fips=1, the RNG exposed to userspace is
hijacked away from the CRNG and redirects to crypto_devrandom_read_iter(),
which utilizes the DRBG.
lib/crypto: Add FIPS self-tests for SHA-1 and SHA-2

commit-author Eric Biggers <ebiggers@kernel.org>
commit 04cadb4fe0341304741ef60a297366b553f0ce36
byteorder: Add le64_to_cpu_array() and cpu_to_le64_array()

commit-author Eric Biggers <ebiggers@kernel.org>
commit c99d30706043481a1d631bbd9c7a4b70fe002a2b
lib/crypto: blake2b: Add BLAKE2b library functions

commit-author Eric Biggers <ebiggers@kernel.org>
commit 23a16c9533ed92cc639c8f5bd9eb104809fe2919
btrfs: switch to library APIs for checksums

commit-author Eric Biggers <ebiggers@kernel.org>
commit fe11ac191ce0ad910f6fda0c628bcff19fcff47d
upstream-diff |
    NB. This was a back-port not a cherry-pick as some of
    the underlying code had been changed in prior upstream
    commits: cc38d178ff33543cdb0bd58cfbb9a7c41372ff75
	btrfs: enable large data folio support under CONFIG_BTRFS_EXPERIMENTAL
    and commit: 62bcbdca0ea9b1add9c22f400b51c56184902053
	btrfs: make btrfs_csum_one_bio() handle bs > ps without large folios
    and others unknown.
    These changes were judged too large to bring back
    from upstream as they are CONFIG_BTRFS_EXPERIMENTAL.
crypto: testmgr - block Crypto API xxhash64 in FIPS mode

commit-author Joachim Vandersmissen <git@jvdsn.com>
commit -
commit-source https://lore.kernel.org/linux-crypto/20260303060509.246038-1-git@jvdsn.com/
When in fips mode, self-test errors must panic.

Requested by the lab.
When in fips mode, self-test errors must panic.

Requested by the lab.
Change CONFIG_CRYPTO_JITTERENTROPY_OSR from 1 to 3 in all configs.

Retquested by the lab.
dh_compute_value misses the check SP800-56Arev3, 5.6.2.1.4 which is typically implemented after dh_is_pubkey_valid.

Requested by lab.
In crypto_kdf108_ctr_generate() there is no minimum length check for the digest to be generated - it must be at least 112 bits.

Requested by the lab.
Add fips_approved flag to SHA1 and HMAC-SHA1 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA224 and HMAC-SHA224 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA256 and HMAC-SHA256 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA384 and HMAC-SHA384 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA512 and HMAC-SHA512 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved indicator to struct crypto_aes_ctx.

Requested by lab.
Add CONFIG_CRYPTO_FIPS_CUSTOM_VERSION=y, CONFIG_CRYPTO_FIPS_VERSION="ciq.6.18.20260531"

Requested by lab. Will be changed for rpm builds.
Unset CRYPTO_JITTERENTROPY_MEMSIZE_2, set CRYPTO_JITTERENTROPY_MEMSIZE_128.

Requested by lab.
github actions: Add FIPS protected directory check for PRs

Adds a workflow that runs on PRs targeting ciq-*-next branches and
checks whether new upstream commits touch FIPS protected directories.
Posts a PR comment alerting reviewers if changes are found.
Restore CRYPTO_TFM_FIPS_COMPLIANCE flag as an indicator to differentiate between internal and external IV generation when AES-GCM
encryption is performed.

Required by lab.
[CIQ] v6.18.35 - updated spec

[CIQ] ciq_kernel-6.18.35-2 - updated spec

github-actions: extend trigger glob to match suffix branches

Catches *_ciq-6.18.y-no-ltp, *_ciq-6.18.y-pr-only, and other branch-name
suffix variants used by the kernelCI skip-stages feature.
crypto: Kconfig - Make CRYPTO_FIPS depend on the DRBG being built-in

When FIPS mode is enabled (via fips=1), there is an absolute need for the
DRBG to be available. This is at odds with the fact that the DRBG can be
built as a module when in FIPS mode, leaving critical RNG functionality at
the whims of userspace.
random: Restrict extrng registration to init time

It is technically a risk to permit extrng registration by modules after
kernel init completes. Since there is only one user of the extrng interface
and it is imperative that it is the _only_ registered extrng for FIPS
compliance, restrict the extrng registration interface to only permit
registration during kernel init and only from built-in drivers.
crypto: rng - Only allow the DRBG to register as "stdrng" in FIPS mode

In FIPS mode, the DRBG must take precedence over all stdrng algorithms.
The only problem standing in the way of this is that a different stdrng
algorithm could get registered and utilized before the DRBG is registered,
and since crypto_alloc_rng() only allocates an stdrng algorithm when
there's no existing allocation, this means that it's possible for the wrong
stdrng algorithm to remain in use indefinitely.
crypto: rng - Fix tabs vs spaces in the per-CPU DRBG code

The 6.18.y version of "crypto: rng - Implement fast per-CPU DRBG instances"
picked up a few spots that use spaces where the ciqlts9_6 tree's version
[1] uses tabs: the lock_default_rng() comment's numbered list, the line
continuations in the unlock_local_rng() macro, and a brace in
crypto_devrandom_read_iter(). A nearby block comment was also missing the
space before its '*'. Fix them up.
crypto: rng - Make the per-CPU DRBG instances permanent

The per-CPU DRBG instances used to be torn down by crypto_del_default_rng()
under del_pcpu_rwsem, and the read path took that rwsem as a reader to keep
an instance from being freed out from under it. That machinery only made
sense back when the extrng override could be unregistered and the DRBG
could be built as a module.
crypto: rng - Skip leading zero-length iovec segments

The fast per-CPU DRBG path computes its initial user destination address
straight from the iov_iter. For an ITER_IOVEC iter it reads iter_iov_addr()
and iter_iov_len() of the current segment, but when the iovec leads with
one or more zero-length segments, the current segment is one of those empty
entries. iter_iov_addr() then hands back the base of an empty segment,
which is whatever userspace put there: its base can be NULL or some other
unwritable address, since a zero-length segment is never actually touched.
crypto: rng - Fix spurious EFAULT when the destination PTE is zapped

While GUP pinning makes it possible to pin the page _backing_ a user
address, it *doesn't* pin the page table entry (PTE) for that mapping. This
means the pinned physical page can be separated from the user address it
was backing, and even back a _different_ user address within the same
process. PTE zapping naturally happens during memory reclaim when memory
pressure is elevated, and can even be done directly by userspace via
madvise(MADV_DONTNEED).
Revert "mm/gup: reintroduce pin_user_pages_fast_only()"

This reverts commit ef467f3c43338f72f4173c98b15bc8021f79c3a1.
[CIQ] ciq_kernel-6.18.35-3 - updated spec

[CIQ] v6.18.36 - rebased configs

[CIQ] v6.18.36 - updated spec

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 35m 43s 36m 32s
aarch64 22m 46s 23m 19s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 443 64 ciq-6.18.y-next ⚠️ No baseline available
aarch64 376 55 ciq-6.18.y-next ⚠️ No baseline available

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1478 82 ciq-6.18.y-next ⚠️ No baseline available
aarch64 1454 82 ciq-6.18.y-next ⚠️ No baseline available

🤖 This PR was automatically generated by GitHub Actions
Run ID: 28264575329

bmastbergen and others added 30 commits June 26, 2026 16:47
Adding configs based of Fedora-ARK default config from 6.18.2.
We are modifying these with the following configs where available
CONFIG_MODIFY_LDT_SYSCALL=n
CONFIG_LEGACY_VSYSCALL_NONE=n
These options are for old software support which adds performance
overhead and potential attack surfaces with go against the CIQ LT
kernels priority of performance and security.

CONFIG_LIVEPATCH=n
We do not have Live patching on for any road-map

CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
This should be enabled, it often improves performance funnily enough

CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_HZ=100
These are set to increase throughput CONFIG_PREEMPT_VOLUNTARY=y
(default
Fedora config) but CONFIG_HZ=100 for higher throughput over the
x86_64
default of CONFIG_HZ=1000 which provides lower latency.

After modification 'make CROSS_COMPILE=./scripts/dummy-tools/' was
run
Setting up the default build configs to ensure everything builds when we
update and rebase.
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
	    summary line.

Add a kernel configuration option to lock down the kernel, to restrict
userspace's ability to modify the running kernel when UEFI Secure Boot is
enabled. Based on the x86 patch by Matthew Garrett.

Determine the state of Secure Boot in the EFI stub and pass this to the
kernel using the FDT.

Signed-off-by: Linn Crosetto <linn@hpe.com>
[bwh: Forward-ported to 4.10: adjust context]
[Lukas Wunner: Forward-ported to 4.11: drop parts applied upstream]
[bwh: Forward-ported to 4.15 and lockdown patch set:
 - Pass result of efi_get_secureboot() in stub through to
   efi_set_secure_boot() in main kernel
 - Use lockdown API and naming]
[bwh: Forward-ported to 4.19.3: adjust context in update_fdt()]
[dannf: Moved init_lockdown() call after uefi_init(), fixing SB detection]
[bwh: Drop call to init_lockdown(), as efi_set_secure_boot() now calls this]
[bwh: Forward-ported to 5.6: efi_get_secureboot() no longer takes a
 sys_table parameter]
[bwh: Forward-ported to 5.7: EFI initialisation from FDT was rewritten, so:
 - Add Secure Boot mode to the parameter enumeration in fdtparams.c
 - Add a parameter to efi_get_fdt_params() to return the Secure Boot mode
 - Since Xen does not have a property name defined for Secure Boot mode,
   change efi_get_fdt_prop() to handle a missing property name by clearing
   the output variable]
[Salvatore Bonaccorso: Forward-ported to 5.10: f30f242 ("efi: Rename
arm-init to efi-init common for all arch") renamed arm-init.c to efi-init.c]

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.
UEFI machines can be booted in Secure Boot mode.  Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
enabled.

Move the switch-statement in x86's setup_arch() that inteprets the
secure_boot boot parameter to generic code and set the bit there.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
cc: linux-efi@vger.kernel.org
[rperier: Forward-ported to 5.5:
 - Use pr_warn()
 - Adjust context]
[bwh: Forward-ported to 5.6: adjust context]
[bwh: Forward-ported to 5.7:
 - Use the next available bit in efi.flags
 - Adjust context]
Signed-off-by: Jonathan Maple <jmaple@ciq.com>

Revert "efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode"

This reverts commit 4047f887e98539d07d664eaa6699d9c8fb6c0ca4.
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.

Based on an earlier patch by David Howells, who wrote the following
description:

> UEFI Secure Boot provides a mechanism for ensuring that the firmware will
> only load signed bootloaders and kernels.  Certain use cases may also
> require that all kernel modules also be signed.  Add a configuration option
> that to lock down the kernel - which includes requiring validly signed
> modules - if the kernel is secure-booted.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[Salvatore Bonaccorso: After fixing https://bugs.debian.org/956197 the
help text for LOCK_DOWN_IN_EFI_SECURE_BOOT was adjusted to mention that
lockdown is triggered in integrity mode (https://bugs.debian.org/1025417)]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.

These drivers allow mapping arbitrary memory ranges as MTD devices.
This should be disabled to preserve the kernel's integrity when it is
locked down.

* Add the HWPARAM flag to the module parameters
* When slram is built-in, it uses __setup() to read kernel parameters,
  so add an explicit check security_locked_down() check

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Matthew Garrett <mjg59@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Joern Engel <joern@lazybastard.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Fedora EFI status status
ommit 7a60169d168d6aae70aca10b7b71070666068529
commit-source https://gitlab.com/cki-project/kernel-ark/

This adds efi_status_to_str() for use when printing efi_status_t
messages, and reworks efi_status_to_err() so that the two use a common
list of errors.

Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
CONFIG_SPI_MICROCHIP_CORE is no longer a valid config option in 6.18.3
 spi: microchip: rename driver file and internal identifiers
 Upstream 71c814e
Upstream commit 5ba2f0a (mm: introduce deferred freeing for
kernel page tables) was backported which adds new config option
ASYNC_KERNEL_PGTABLE_FREE.  Then upsteam commit e37d5a2
(iommu/sva: invalidate stale IOTLB entries for kernel address space)
was backported which selects it by default for x86 configs that have
selected IOMMU_SVA (which our x86_64 configs have)
 iommu/sva: invalidate stale IOTLB entries for kernel address space
 Upstream e37d5a2
The config dependency on DEVICE_PRIVATE for DRM_GPUSVM was removed,
causing it to be selected by default for configs with DRM_XE (like ours).
Because DRM_GPUSVM is now enabled, DRM_XE_USERPTR_INVAL_INJECT is valid,
but not selected by default.
 drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE
 Upstrea: bdcdf96 upstream.
ATH9K_AHB now depends on OF to be selected by default.  x86_64
configs do not have OF.  This is fine since ahb bus is arm only.
 wifi: ath9k: add OF dependency to AHB
 upstream: 125e7b3
WARN_ALL_UNSEEDED_RANDOM was removed completely
 Remove WARN_ALL_UNSEEDED_RANDOM kernel config option
 Upstream: 7dff99b

UNWIND_USER and HAVE_UNWIND_USER_FP were added and enabled
by default for x86.
 unwind_user/x86: Enable frame pointer unwinding on x86
 Upstream: 49cf34c
There are customers that will need this enabled by default
This matches the 6.12 spec
We are defining the product as clk so if we ever need to revoke or
deny the cert we can target this specific product
by design, kernel-ark blacklists all modules in modules-extra that have
a module alias. Now that qdiscs have their module alias [1], some of them
became blacklisted even if we didn't really intend to: move them back to
kernel-modules to preserve feature parity with other qdiscs (and
previous
releases).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=241a94abcf465ba9363d93168da5ddd47002930f
And define pkgrelease using buildid.

.1.1.0.0 is excessive
This comes from kernel-ark and is part of their solution for a
kernel variant that should supplant the factory kernel.  Since thats
not what we want, remove this to avoid any confusion.
Adds Provides and Conflicts tags to kernel-clk6.18-* packages that
cannot be parallel installed with stock Rocky kernel packages:
- kernel-doc
- kernel-headers
- kernel-cross-headers
- kernel-debuginfo-common
- kernel-tools
- kernel-tools-libs
- kernel-tools-libs-devel
- kernel-selftests-internal

This allows these packages to satisfy dependencies for stock kernel
packages while preventing simultaneous installation.
Introduce %{pkg_suffix} macro (clk%{patchversion}) and use it for:
- package_name: kernel-%{pkg_suffix}
- tool packages: perf, python3-perf, libperf, rtla, rv

Tool packages now named:
- perf-%{pkg_suffix}
- python3-perf-%{pkg_suffix}
- libperf-%{pkg_suffix}
- libperf-%{pkg_suffix}-devel
- rtla-%{pkg_suffix}
- rv-%{pkg_suffix}
- *-debuginfo variants

Each tool package includes:
- Provides: <original-name> = %{specrpmversion}-%{release}
- Conflicts: <original-name>

This prevents parallel installation with stock Rocky kernel tools
while satisfying dependencies for the original package names.
Switch Module.symvers compression from the dynamic %compression
macro (xz) to hardcoded gzip -c9, matching the upstream kernel spec.
Also fixes the ghost file permissions from 0644 to 0600.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
Inject +%{pkg_suffix} into KVERREL and the shell-level equivalents
(KernelVer, DevelDir, EXTRAVERSION) so that uname -r shows the CLK
kernel identity, e.g. 6.18.19-1.1.el9_ciq.x86_64+clk6.18.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
…g boot default

Reduce duplicated version numbers in the spec to single sources of truth:
- kernel_major_minor, kernel_patch, and buildid are the base defines
- specversion, kversion, patchlevel, pkgrelease, specrelease, and
  tarfile_release are all derived from them
- Remove specrpmversion (identical to specversion)
- Add el_version for tarball naming

Export GRUB_NON_STANDARD_KERNEL=true in the posttrans before calling
kernel-install so that 20-grub.install respects DEFAULTKERNEL in
/etc/sysconfig/kernel. When DEFAULTKERNEL=kernel-core, the CLK kernel
will no longer take over as the boot default on upgrade.

Update generate_tarball.sh to extract the base defines and compute
derived values rather than reading the now-derived tarfile_release
directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
jallisonciq and others added 28 commits June 26, 2026 16:47
Requested by the lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Retquested by the lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…ypically implemented after dh_is_pubkey_valid.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…the digest to be generated - it must be at least 112 bits.

Requested by the lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…ciq.6.18.20260531"

Requested by lab. Will be changed for rpm builds.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…E_128.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Adds a workflow that runs on PRs targeting ciq-*-next branches and
checks whether new upstream commits touch FIPS protected directories.
Posts a PR comment alerting reviewers if changes are found.

Uses check_fips_changes.py from kernel-src-tree-tools to perform the
check.
…ate between internal and external IV generation when AES-GCM

encryption is performed.

Required by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Catches *_ciq-6.18.y-no-ltp, *_ciq-6.18.y-pr-only, and other branch-name
suffix variants used by the kernelCI skip-stages feature.
When FIPS mode is enabled (via fips=1), there is an absolute need for the
DRBG to be available. This is at odds with the fact that the DRBG can be
built as a module when in FIPS mode, leaving critical RNG functionality at
the whims of userspace.

Userspace could simply rmmod the DRBG module, or not provide it at all and
thus a different stdrng algorithm could be used without anyone noticing.

Additionally, when running a FIPS-enabled userspace, modprobe itself may
perform a getrandom() syscall _before_ loading a given module. As a result,
there's a possible deadlock scenario where the RNG core (crypto/rng.c)
initializes _before_ the DRBG, thereby installing its getrandom() override
without having an stdrng algorithm available. Then, when userspace calls
getrandom() which redirects to the override in crypto/rng.c,
crypto_alloc_rng("stdrng") invokes the UMH (modprobe) to load the DRBG
(which is aliased to stdrng). And *then* that modprobe invocation gets
stuck at getrandom() because there's no stdrng algorithm available!

There are too many risks that come with allowing the DRBG and RNG core to
be modular for FIPS mode. Therefore, make CRYPTO_FIPS require the DRBG to
be built-in, which in turn makes the DRBG require the RNG core to be
built-in. That way, it's guaranteed for these drivers to be built-in when
running in FIPS mode.

Also clean up the CRYPTO_FIPS option name and remove the CRYPTO_ANSI_CPRNG
dependency since it's obsolete for FIPS now.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
It is technically a risk to permit extrng registration by modules after
kernel init completes. Since there is only one user of the extrng interface
and it is imperative that it is the _only_ registered extrng for FIPS
compliance, restrict the extrng registration interface to only permit
registration during kernel init and only from built-in drivers.

This also eliminates the risks associated with the extrng interface itself
being designed to solely accommodate a single registration, which would
therefore permit the registered extrng to be overridden or even removed by
an unrelated module.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
In FIPS mode, the DRBG must take precedence over all stdrng algorithms.
The only problem standing in the way of this is that a different stdrng
algorithm could get registered and utilized before the DRBG is registered,
and since crypto_alloc_rng() only allocates an stdrng algorithm when
there's no existing allocation, this means that it's possible for the wrong
stdrng algorithm to remain in use indefinitely.

This issue is also often impossible to observe from userspace; an RNG other
than the DRBG could be used somewhere in the kernel and userspace would be
none the wiser.

To ensure this can never happen, only allow stdrng instances from the DRBG
to be registered when running in FIPS mode. This works since the previous
commit forces the DRBG to be built into the kernel when CONFIG_CRYPTO_FIPS
is enabled, so the DRBG's presence is guaranteed when fips_enabled is true.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
The 6.18.y version of "crypto: rng - Implement fast per-CPU DRBG instances"
picked up a few spots that use spaces where the ciqlts9_6 tree's version
[1] uses tabs: the lock_default_rng() comment's numbered list, the line
continuations in the unlock_local_rng() macro, and a brace in
crypto_devrandom_read_iter(). A nearby block comment was also missing the
space before its '*'. Fix them up.

[1] b0c560a

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
The per-CPU DRBG instances used to be torn down by crypto_del_default_rng()
under del_pcpu_rwsem, and the read path took that rwsem as a reader to keep
an instance from being freed out from under it. That machinery only made
sense back when the extrng override could be unregistered and the DRBG
could be built as a module.

That's no longer the case. extrng registration is now restricted to init
time from built-in drivers, and FIPS mode requires the DRBG to be built-in,
so the registered DRBG can't be unregistered or swapped out. As such, the
per-CPU instances are never torn down, and the deletion rwsem just adds a
lock to the hot read path for no reason.

Drop the deletion rwsem and crypto_del_pcpu_rng(), and stop freeing the
per-CPU instances in crypto_del_default_rng(). Since the instances are
permanent now, allocate their pages once at init time with __GFP_NOFAIL and
ditch free_pcpu_inst() along with the failure paths in crypto_rng_init();
failing to install the RNG override in FIPS mode would be catastrophic, so
the setup isn't allowed to fail anyway.

This brings the per-CPU DRBG implementation in line with the ciqlts9_6
tree's version of "crypto: rng - Implement fast per-CPU DRBG instances"
[1].

[1] b0c560a

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
The fast per-CPU DRBG path computes its initial user destination address
straight from the iov_iter. For an ITER_IOVEC iter it reads iter_iov_addr()
and iter_iov_len() of the current segment, but when the iovec leads with
one or more zero-length segments, the current segment is one of those empty
entries. iter_iov_addr() then hands back the base of an empty segment,
which is whatever userspace put there: its base can be NULL or some other
unwritable address, since a zero-length segment is never actually touched.

Right after the setup, that address is prefaulted, and on a bogus base it
fails. A failed prefault on the very first address is treated as fatal, so
the whole read bails out to -EFAULT even though there are perfectly good
non-empty segments later in the iovec. This is reachable with something as
simple as readv() on /dev/urandom where the first iovec entry is {NULL, 0}.

Fix it by advancing the iterator by zero before reading the first address.
The iovec advance loop walks past every leading empty segment and stops at
the first non-empty one, and there's guaranteed to be such a segment
because iov_iter_count() is nonzero at this point. Empty segments that crop
up mid-stream are already skipped by the per-copy advance, so this only
needs to run once during setup.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
While GUP pinning makes it possible to pin the page _backing_ a user
address, it *doesn't* pin the page table entry (PTE) for that mapping. This
means the pinned physical page can be separated from the user address it
was backing, and even back a _different_ user address within the same
process. PTE zapping naturally happens during memory reclaim when memory
pressure is elevated, and can even be done directly by userspace via
madvise(MADV_DONTNEED).

Since the optimized per-CPU DRBG loop assumes copy_to_user_nofault() will
always succeed on a GUP-pinned page, it immediately bails out when the
nofault copy actually *does* fail for the reasons described above. This
results in either fewer than requested random bytes copied or, more
seriously, a spurious EFAULT returned to userspace when no random bytes
were copied.

As it turns out, there's no way to pin a PTE. That means it's not possible
to guarantee a 100% success rate for the copy_to_user_nofault() attempt.

Fix this by handling copy_to_user_nofault() errors correctly with a fall
back to a faultable copy attempt outside of the RNG lock. In order to
guarantee forward progress for the caller, an on-stack bounce buffer is
used to copy up to 256 bytes of the generated random bytes whenever this
happens rather than discarding the whole thing.

There's no need to use GUP pinning anymore since there's no use for having
a page pinned without pinning a PTE to go along with that page, hence the
page pinning is eliminated which saves a software page table walk that was
performed for _at least_ every destination page.

Reported-by: Kun Yi <kunyi@google.com>
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
This reverts commit ef467f3.

This helper is no longer used by the FIPS-mode RNG, which was the
motivation for reintroducing it. Remove it.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jun 27, 2026
@ciq-kernel-automation

Copy link
Copy Markdown
Author

✅ FIPS Check: No Protected Directory Changes

No FIPS protected directories were modified in the new upstream commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.