Skip to content

[RLC-9] Rebase Custom Changes to rlc-9/5.14.0-687.26.1.el9_8 - #1447

Merged
PlaidCat merged 37 commits into
rlc-9/5.14.0-687.26.1.el9_8from
jmaple_rlc-9/5.14.0-687.26.1.el9_8
Jul 17, 2026
Merged

[RLC-9] Rebase Custom Changes to rlc-9/5.14.0-687.26.1.el9_8#1447
PlaidCat merged 37 commits into
rlc-9/5.14.0-687.26.1.el9_8from
jmaple_rlc-9/5.14.0-687.26.1.el9_8

Conversation

@PlaidCat

@PlaidCat PlaidCat commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

https://ciqinc.atlassian.net/browse/KERNEL-1324

Update process (This kernel CentOS base for 5.14.0-687.26.1.el9_8)

  • Rolling Release Rebase Process
  • Create rlc-9/5.14.0-687.26.1.el9_8 branch from rocky9_8
  • Cherry-pick all code from previous branch rlc-9/5.14.0-687.24.1.el9_8 into new branch (skipping unneeded code)
    • Fix conflicts as they arise
  • Build and Test

Rebase Log

Already on 'rlc-9/5.14.0-687.24.1.el9_8'
Already on 'jmaple_rlc-9/5.14.0-687.26.1.el9_8'
[rolling release update] Rolling Product:  rlc-9
[rolling release update] Checking out branch:  rlc-9/5.14.0-687.24.1.el9_8
[rolling release update] Gathering all the RESF kernel Tags
[rolling release update] Found 11 RESF kernel tags
[rolling release update] Checking out branch:  rocky9_8
[rolling release update] Gathering all the RESF kernel Tags
[rolling release update] Found 13 RESF kernel tags
[rolling release update] Common tag sha:  b'699395e66e0e'
"699395e66e0e6e500038d1cbd9420d30f9aaae08 Rebuild rocky9_8 with kernel-5.14.0-687.24.1.el9_8"
[rolling release update] Checking for FIPS protected changes between the common tag and HEAD
[rolling release update] Checking for FIPS protected changes
[rolling release update] Getting SHAS 699395e66e0e..HEAD
[rolling release update] Number of commits to check:  11
[rolling release update] Checking modifications of shas
[rolling release update] Checked 1 of 11 commits
[rolling release update] Checked 2 of 11 commits
[rolling release update] Checked 3 of 11 commits
[rolling release update] Checked 4 of 11 commits
[rolling release update] Checked 5 of 11 commits
[rolling release update] Checked 6 of 11 commits
[rolling release update] Checked 7 of 11 commits
[rolling release update] Checked 8 of 11 commits
[rolling release update] Checked 9 of 11 commits
[rolling release update] Checked 10 of 11 commits
[rolling release update] Checked commit b'6ec21732e867afb66a3c1f8003766b5076a2d510' touched 1 FIPS protected files
  - b'drivers/crypto/'
[rolling release update] Checked 11 of 11 commits
[rolling release update] 1 of 11 commits have FIPS protected changes
[rolling release update] Checking out old rolling branch:  rlc-9/5.14.0-687.24.1.el9_8
[rolling release update] Finding the CIQ Kernel and Associated Upstream commits between the last resf tag and HEAD
[rolling release update] Getting SHAS 699395e66e0e..HEAD
[rolling release update] Last RESF tag sha:  b'699395e66e0e'
[rolling release update] Total commits in old branch: 39
[rolling release update] Checking out new base branch:  rocky9_8
[rolling release update] Finding the kernel version for the new rolling release
[rolling release update] New Branch to create: rlc-9/5.14.0-687.26.1.el9_8
[rolling release update] Creating new branch: rlc-9/5.14.0-687.26.1.el9_8
[rolling release update] Creating new branch for PR:  jmaple_rlc-9/5.14.0-687.26.1.el9_8
[rolling release update] Creating Map of all new commits from last rolling release fork
[rolling release update] Total commits in new branch: 10
[rolling release update] Checking if any of the commits from the old rolling release are already present in the new base branch
- Old commit 6de8817b084f backported upstream 40a25d59e85b
  Already in new base as ecd174095d51: locking/rtmutex: Skip remove_waiter() when waiter is not enqueued
- Old commit 3f7fc542a752 backported upstream 3bfdc63936dd
  Already in new base as 289c69a1c3d5: rtmutex: Use waiter::task instead of current in remove_waiter()
[rolling release update] Found 2 duplicate commits to remove
[rolling release update] Removing duplicate commits:
  - 6de8817b084fae9e2bb1754269afba0c9abdf201 locking/rtmutex: Skip remove_waiter() when waiter is not enqueued
  - 3f7fc542a75256b2415e20f218212eed9599178d rtmutex: Use waiter::task instead of current in remove_waiter()
[rolling release update] Applying 37 remaining commits to the new branch
  [1/37] c5d043d0902b selftests/mm temporary fix of hmm infinite loop
  [2/37] 2020c235914a SUSE: patch: crypto-ecdh-implement-FIPS-PCT.patch
  [3/37] 38a1ef254ee8 crypto: essiv - Zeroize keys on exit in essiv_aead_setkey()
  [4/37] 7cd29ba45416 crypto: jitter - replace LFSR with SHA3-256
  [5/37] c3c314b77bbc crypto: aead,cipher - zeroize key buffer after use
  [6/37] e0ca3375418d crypto: ecdh - explicitly zeroize private_key
  [7/37] cf9b9341b532 crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init
  [8/37] 17abbc9bde17 crypto: Kconfig - Make CRYPTO_FIPS depend on the DRBG being built-in
  [9/37] d130c9bdb1eb random: Restrict extrng registration to init time
  [10/37] 810eda166220 crypto: rng - Convert crypto_default_rng_refcnt into an unsigned int
  [11/37] 9278b59be26f crypto: drbg - Align buffers to at least a cache line
  [12/37] 69441f719527 crypto: rng - Fix priority inversions due to mutex locks
  [13/37] acf1b71fbb8b mm/gup: reintroduce pin_user_pages_fast_only()
  [14/37] d3c419945896 crypto: rng - Implement fast per-CPU DRBG instances
  [15/37] 365d8bf2e934 configs: Ensure FIPS settings defined
  [16/37] 0209ef659dcb github actions: Use reusable validate kernel commits workflow
  [17/37] ae701e66cb63 github actions: Add kernelCI for rlc-9
  [18/37] 4fa4eaf8c9c7 github actions: Use trigger for kernelCI
  [19/37] 31f2ffe0eb61 Revert "xfrm: esp: avoid in-place decrypt on shared skb frags"
  [20/37] 039ac7244ca6 tools: hv: Enable debug logs for hv_kvp_daemon
  [21/37] 013d3a8635d1 crypto: rng - Only allow the DRBG to register as "stdrng" in FIPS mode
  [22/37] a87503334b2d net: mana: Add support for net_shaper_ops
  [23/37] 25445f983328 net: mana: Add speed support in mana_get_link_ksettings
  [24/37] e17b86d722e6 net: mana: Fix build errors when CONFIG_NET_SHAPER is disabled
  [25/37] 4615b5f1b19f rxrpc: Fix potential UAF after skb_unshare() failure
  [26/37] 815e0a1e3298 rxrpc: Fix rxrpc_input_call_event() to only unshare DATA packets
  [27/37] 22c855368b33 xfrm: esp: avoid in-place decrypt on shared skb frags
  [28/37] aee7fab0e763 rxrpc: Also unshare DATA/RESPONSE packets when paged frags are present
  [29/37] 026f46e4eef2 KVM: arm64: Reassign nested_mmus array behind mmu_lock
  [30/37] 7c67b7b9f9da crypto: rng - Skip leading zero-length iovec segments
  [31/37] 7d67cb1b744d crypto: rng - Fix spurious EFAULT when the destination PTE is zapped
  [32/37] 45ba56605d17 Revert "mm/gup: reintroduce pin_user_pages_fast_only()"
  [33/37] 9a78209f4a0b drm: Do not allow userspace to trigger kernel warnings in drm_gem_change_handle_ioctl()
  [34/37] 85363280fb16 drm: Set old handle to NULL before prime swap in change_handle
  [35/37] ef2cc934e500 drm: Replace old pointer to new idr
  [36/37] 5f10fb9a34ed drm/gem: fix race between change_handle and handle_delete
  [37/37] cd02e20f0d01 drm/gem: Try to fix change_handle ioctl, attempt 4
[rolling release update] Successfully applied all 37 commits

FIPS changes

  • crypto: ccp - copy IV using skcipher ivsize 6ec2173

BUILD

$ egrep -B 5 -A 5 "\[TIMER\]|^Starting Build" $(ls -t kbuild* | head -n1)
/mnt/code/kernel-src-tree-build
Running make mrproper...
  CLEAN   scripts/basic
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated
[TIMER]{MRPROPER}: 5s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-rocky9_8_rebuild-6355f119d2a5"
Making olddefconfig
--
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Starting Build
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
--
  BTF [M] sound/x86/snd-hdmi-lpe-audio.ko
  BTF [M] sound/usb/usx2y/snd-usb-us144mkii.ko
  BTF [M] sound/virtio/virtio_snd.ko
  LD [M]  sound/xen/snd_xen_front.ko
  BTF [M] sound/xen/snd_xen_front.ko
[TIMER]{BUILD}: 1651s
Making Modules
  INSTALL /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/arch/x86/crypto/blake2s-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/arch/x86/crypto/blowfish-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/arch/x86/crypto/camellia-aesni-avx-x86_64.ko
  INSTALL /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/arch/x86/crypto/camellia-aesni-avx2.ko
--
  STRIP   /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/sound/x86/snd-hdmi-lpe-audio.ko
  SIGN    /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/sound/x86/snd-hdmi-lpe-audio.ko
  STRIP   /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/sound/xen/snd_xen_front.ko
  SIGN    /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5/kernel/sound/xen/snd_xen_front.ko
  DEPMOD  /lib/modules/5.14.0-rocky9_8_rebuild-6355f119d2a5
[TIMER]{MODULES}: 9s
Making Install
sh ./arch/x86/boot/install.sh 5.14.0-rocky9_8_rebuild-6355f119d2a5 \
	arch/x86/boot/bzImage System.map "/boot"
[TIMER]{INSTALL}: 26s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-5.14.0-rocky9_8_rebuild-6355f119d2a5 and Index to 0
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 5s
[TIMER]{BUILD}: 1651s
[TIMER]{MODULES}: 9s
[TIMER]{INSTALL}: 26s
[TIMER]{TOTAL} 1696s
Rebooting in 10 seconds

KSelfTest

$ ./kernel-tools/kernel_auto_rebuild/get_kselftest_diff.sh
selftest-5.14.0-jmaple_rlc-9_5.14.0-687.17.1.el9_8-e8825a79bd09+-1.log: 395 passed
selftest-5.14.0-jmaple_rlc-9_5.14.0-687.22.1.el9_8-5fa52668af72+-1.log: 397 passed
selftest-5.14.0-jmaple_rlc-9_5.14.0-687.24.1.el9_8-bca11bb85721+-1.log: 396 passed
selftest-5.14.0-jmaple_rlc-9_5.14.0-687.26.1.el9_8-de3241ae19b0+-1.log: 395 passed

Before: selftest-5.14.0-jmaple_rlc-9_5.14.0-687.24.1.el9_8-bca11bb85721+-1.log
After: selftest-5.14.0-jmaple_rlc-9_5.14.0-687.26.1.el9_8-de3241ae19b0+-1.log
Diff:
-ok 40 selftests: net: icmp.sh
+ok 4 selftests: cgroup: test_freezer
-ok 72 selftests: net: test_vxlan_vnifiltering.sh

PlaidCat and others added 30 commits July 16, 2026 18:41
jira SECO-170

In Rocky9 if you run ./run_vmtests.sh -t hmm it will fail and cause an
infinite loop on ASSERTs in FIXTURE_TEARDOWN()
This temporary fix is based on the discussion here
https://patchwork.kernel.org/project/linux-kselftest/patch/26017fe3-5ad7-6946-57db-e5ec48063ceb@suse.cz/#25046055

We will investigate further kselftest updates that will resolve the root
causes of this.

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Signed-off-by: Jeremy Allison <jallison@ciq.com>
In essiv_aead_setkey(), use the same logic as crypto_authenc_esn_setkey()
to zeroize keys on exit.

[Sultan: touched up commit message]

Signed-off-by: Jason Rodriguez <jrodriguez@ciq.com>
        Using the kernel crypto API, the SHA3-256 algorithm is used as
        conditioning element to replace the LFSR in the Jitter RNG. All other
        parts of the Jitter RNG are unchanged.

        The application and use of the SHA-3 conditioning operation is identical
        to the user space Jitter RNG 3.4.0 by applying the following concept:

        - the Jitter RNG initializes a SHA-3 state which acts as the "entropy
          pool" when the Jitter RNG is allocated.

        - When a new time delta is obtained, it is inserted into the "entropy
          pool" with a SHA-3 update operation. Note, this operation in most of
          the cases is a simple memcpy() onto the SHA-3 stack.

        - To cause a true SHA-3 operation for each time delta operation, a
          second SHA-3 operation is performed hashing Jitter RNG status
          information. The final message digest is also inserted into the
          "entropy pool" with a SHA-3 update operation. Yet, this data is not
          considered to provide any entropy, but it shall stir the entropy pool.

        - To generate a random number, a SHA-3 final operation is performed to
          calculate a message digest followed by an immediate SHA-3 init to
          re-initialize the "entropy pool". The obtained message digest is one
          block of the Jitter RNG that is returned to the caller.

        Mathematically speaking, the random number generated by the Jitter RNG
        is:

        aux_t = SHA-3(Jitter RNG state data)

        Jitter RNG block = SHA-3(time_i || aux_i || time_(i-1) || aux_(i-1) ||
                                 ... || time_(i-255) || aux_(i-255))

        when assuming that the OSR = 1, i.e. the default value.

        This operation implies that the Jitter RNG has an output-blocksize of
        256 bits instead of the 64 bits of the LFSR-based Jitter RNG that is
        replaced with this patch.

        The patch also replaces the varying number of invocations of the
        conditioning function with one fixed number of invocations. The use
        of the conditioning function consistent with the userspace Jitter RNG
        library version 3.4.0.

        The code is tested with a system that exhibited the least amount of
        entropy generated by the Jitter RNG: the SiFive Unmatched RISC-V
        system. The measured entropy rate is well above the heuristically
        implied entropy value of 1 bit of entropy per time delta. On all other
        tested systems, the measured entropy rate is even higher by orders
        of magnitude. The measurement was performed using updated tooling
        provided with the user space Jitter RNG library test framework.

        The performance of the Jitter RNG with this patch is about en par
        with the performance of the Jitter RNG without the patch.

        Signed-off-by: Stephan Mueller <smueller@chronox.de>
        Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

            Back-port of commit bb897c5
            Author: Stephan Müller <smueller@chronox.de>
            Date:   Fri Apr 21 08:08:04 2023 +0200

Signed-off-by: Jeremy Allison <jallison@ciq.com>
    I.G 9.7.B for FIPS 140-3 specifies that variables temporarily holding
    cryptographic information should be zeroized once they are no longer
    needed. Accomplish this by using kfree_sensitive for buffers that
    previously held the private key.

    Signed-off-by: Hailey Mothershead <hailmo@amazon.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

        Back-ported from commit 23e4099
        Author: Hailey Mothershead <hailmo@amazon.com>
        Date:   Mon Apr 15 22:19:15 2024 +0000

Signed-off-by: Jeremy Allison <jallison@ciq.com>
private_key is overwritten with the key parameter passed in by the
caller (if present), or alternatively a newly generated private key.
However, it is possible that the caller provides a key (or the newly
generated key) which is shorter than the previous key. In that
scenario, some key material from the previous key would not be
overwritten. The easiest solution is to explicitly zeroize the entire
private_key array first.

Note that this patch slightly changes the behavior of this function:
previously, if the ecc_gen_privkey failed, the old private_key would
remain. Now, the private_key is always zeroized. This behavior is
consistent with the case where params.key is set and ecc_is_key_valid
fails.

Signed-off-by: Joachim Vandersmissen <git@jvdsn.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
[ Upstream commit ba3c557 ]

When the mpi_ec_ctx structure is initialized, some fields are not
cleared, causing a crash when referencing the field when the
structure was released. Initially, this issue was ignored because
memory for mpi_ec_ctx is allocated with the __GFP_ZERO flag.
For example, this error will be triggered when calculating the
Za value for SM2 separately.

Fixes: d58bb7e ("lib/mpi: Introduce ec implementation to MPI library")
Cc: stable@vger.kernel.org # v6.5
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
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>
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>
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.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
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.

Align all buffers to at least a cache line to improve performance. This is
especially useful when multiple DRBG instances are used, since it prevents
false sharing of cache lines between the different instances.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
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.

Tasks of arbitrary scheduling priority access crypto_devrandom_read_iter().
When a low-priority task owns one of the mutex locks, higher-priority tasks
waiting on that mutex lock are stalled until the low-priority task is done.

Fix the priority inversions by converting the mutex locks into rt_mutex
locks which have PI support.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Like pin_user_pages_fast(), but with the internal-only FOLL_FAST_ONLY flag.

This complements the get_user_pages*() API, which already has
get_user_pages_fast_only().

Note that pin_user_pages_fast_only() used to exist but was removed in
upstream commit edad1bb ("mm/gup: remove pin_user_pages_fast_only()")
due to it not having any users.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
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.

Notably, crypto_devrandom_read_iter() maintains just two global DRBG
instances _for the entire system_, and the two instances serve separate
request types: one instance for GRND_RANDOM requests (crypto_reseed_rng),
and one instance for non-GRND_RANDOM requests (crypto_default_rng). So in
essence, for requests of a single type, there is just one global RNG for
all CPUs in the entire system, which scales _very_ poorly.

To make matters worse, the temporary buffer used to ferry data between the
DRBG and userspace is woefully small at only 256 bytes, which doesn't do a
good job of maximizing throughput from the DRBG. This results in lost
performance when userspace requests >256 bytes; it is observed that DRBG
throughput improves by 70% on an i9-13900H when the buffer size is
increased to 4096 bytes (one page). Going beyond the size of one page up to
the DRBG maximum request limit of 65536 bytes produces diminishing returns
of only 3% improved throughput in comparison. And going below the size of
one page produces progressively less throughput at each power of 2: there's
a 5% loss going from 4096 bytes to 2048 bytes and a 9% loss going from 2048
bytes to 1024 bytes.

Thus, this implements per-CPU DRBG instances utilizing a page-sized buffer
for each CPU to utilize the DRBG itself more effectively. On top of that,
for non-GRND_RANDOM requests, the DRBG's operations now occur under a local
lock that disables preemption on non-PREEMPT_RT kernels, which not only
keeps each CPU's DRBG instance isolated from another, but also improves
temporal cache locality while the DRBG actively generates a new string of
random bytes.

Prefaulting one user destination page at a time is also employed to prevent
a DRBG instance from getting blocked on page faults, thereby maximizing the
use of the DRBG so that the only bottleneck is the DRBG itself.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
We want to hard set the x86_64 FIPS required configs rather than rely on
default settings in the kernel, should these ever change without our
knowing it would not be something we would have actively checked.

The configs are a limited set of configs that is expanded out when
building using `make olddefconfig` a common practice in kernel building.

Note had to manually add the following since its normaly set by the RPM
build process.
CONFIG_CRYPTO_FIPS_NAME="Rocky Linux 9 Kernel Cryptographic API"

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Simplifies the workflow to use the reusable workflow defined in main
branch. This reduces duplication and makes the workflow easier to
maintain across multiple branches.

The workflow was renamed because it now includes validation over
and above just checking for upstream fixes

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
jira LE-3207
feature tools_hv
commit-author Shradha Gupta <shradhagupta@linux.microsoft.com>
commit a9c0b33

Allow the KVP daemon to log the KVP updates triggered in the VM
with a new debug flag(-d).
When the daemon is started with this flag, it logs updates and debug
information in syslog with loglevel LOG_DEBUG. This information comes
in handy for debugging issues where the key-value pairs for certain
pools show mismatch/incorrect values.
The distro-vendors can further consume these changes and modify the
respective service files to redirect the logs to specific files as
needed.

	Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
	Reviewed-by: Dexuan Cui <decui@microsoft.com>
Link: https://lore.kernel.org/r/1744715978-8185-1-git-send-email-shradhagupta@linux.microsoft.com
	Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1744715978-8185-1-git-send-email-shradhagupta@linux.microsoft.com>
(cherry picked from commit a9c0b33)
	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>
jira LE-4472
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit 75cabb4
upstream-diff There was a conflict seen when applying this
patch due to the following commit not present in our tree.
92272ec ("eth: add missing xdp.h includes in drivers")
Additionally, used RH_KABI_HIDE_INCLUDE for net/net_shaper.h,
RH_KABI_EXTEND for new struct fields (handle, speed) in
mana_port_context, and RH_KABI_EXTEND_ENUM for new command codes
(MANA_QUERY_LINK_CONFIG, MANA_SET_BW_CLAMP) to preserve kABI
compatibility. New struct fields moved to end of mana_port_context.

Introduce support for net_shaper_ops in the MANA driver,
enabling configuration of rate limiting on the MANA NIC.

To apply rate limiting, the driver issues a HWC command via
mana_set_bw_clamp() and updates the corresponding shaper object
in the net_shaper cache. If an error occurs during this process,
the driver restores the previous speed by querying the current link
configuration using mana_query_link_cfg().

The minimum supported bandwidth is 100 Mbps, and only values that are
exact multiples of 100 Mbps are allowed. Any other values are rejected.

To remove a shaper, the driver resets the bandwidth to the maximum
supported by the SKU using mana_set_bw_clamp() and clears the
associated cache entry. If an error occurs during this process,
the shaper details are retained.

On the hardware that does not support these APIs, the net-shaper
calls to set speed would fail.

Set the speed:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do set --json '{"ifindex":'$IFINDEX',
		   "handle":{"scope": "netdev", "id":'$ID' },
		   "bw-max": 200000000 }'

Get the shaper details:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do get --json '{"ifindex":'$IFINDEX',
		      "handle":{"scope": "netdev", "id":'$ID' }}'

> {'bw-max': 200000000,
> 'handle': {'scope': 'netdev'},
> 'ifindex': $IFINDEX,
> 'metric': 'bps'}

Delete the shaper object:
./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/net_shaper.yaml \
 --do delete --json '{"ifindex":'$IFINDEX',
		      "handle":{"scope": "netdev","id":'$ID' }}'

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
	Reviewed-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/1750144656-2021-3-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 75cabb4)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4472
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit a6d5edf
upstream-diff Used RH_KABI_EXTEND for the new max_speed field in
mana_port_context to preserve kABI compatibility. Field moved to
end of struct.

Allow mana ethtool get_link_ksettings operation to report
the maximum speed supported by the SKU in mbps.

The driver retrieves this information by issuing a
HWC command to the hardware via mana_query_link_cfg(),
which retrieves the SKU's maximum supported speed.

These APIs when invoked on hardware that are older/do
not support these APIs, the speed would be reported as UNKNOWN.

Before:
$ethtool enP30832s1
> Settings for enP30832s1:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Full
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

After:
$ethtool enP30832s1
> Settings for enP30832s1:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 16000Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
	Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
	Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
	Reviewed-by: Saurabh Singh Sengar <ssengar@linux.microsoft.com>
	Reviewed-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/1750144656-2021-4-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit a6d5edf)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira LE-4472
commit-author Erni Sri Satya Vennela <ernis@linux.microsoft.com>
commit 11cd020

Fix build errors when CONFIG_NET_SHAPER is disabled, including:

drivers/net/ethernet/microsoft/mana/mana_en.c:804:10: error:
'const struct net_device_ops' has no member named 'net_shaper_ops'

     804 |         .net_shaper_ops         = &mana_shaper_ops,

drivers/net/ethernet/microsoft/mana/mana_en.c:804:35: error:
initialization of 'int (*)(struct net_device *, struct neigh_parms *)'
from incompatible pointer type 'const struct net_shaper_ops *'
[-Werror=incompatible-pointer-types]

     804 |         .net_shaper_ops         = &mana_shaper_ops,

	Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Fixes: 75cabb4 ("net: mana: Add support for net_shaper_ops")
	Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506230625.bfUlqb8o-lkp@intel.com/
	Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/1750851355-8067-1-git-send-email-ernis@linux.microsoft.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 11cd020)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
cve-pre CVE-2026-43500
commit-author David Howells <dhowells@redhat.com>
commit 1f27401
upstream-diff |
	Upstream's rxrpc_input_call_event() pulls skbs from a per-call queue
	in a loop, so the unshare block sits inside that loop alongside
	rxrpc_free_skb() and saw_ack bookkeeping. This kernel's version
	receives a single skb as a function parameter and doesn't free
	it (the caller in rxrpc_io_thread() does). As such, the adapted
	unshare block wraps the existing rxrpc_input_call_packet() call
	site, creates and frees a copy when needed, and drops the loop
	and queue-drain logic that doesn't exist here.

	Upstream already had rxrpc_skb_put_call_rx and rxrpc_skb_get_call_rx
	trace constants from a prior refactor not present in this tree.
	rxrpc_skb_put_call_rx is added here since the new skb_copy path
	needs it; rxrpc_skb_get_call_rx is omitted since nothing uses it.

	Several trace constants added by upstream (rxrpc_skb_put_purge_oob,
	rxrpc_skb_put_response, rxrpc_skb_put_response_copy) don't apply
	since the code they trace doesn't exist in this kernel.

	Note, Conflict caused by 153f90a
	("rxrpc: Use ktimes for call timeout tracking and set the timer lazily").

If skb_unshare() fails to unshare a packet due to allocation failure in
rxrpc_input_packet(), the skb pointer in the parent (rxrpc_io_thread())
will be NULL'd out.  This will likely cause the call to
trace_rxrpc_rx_done() to oops.

Fix this by moving the unsharing down to where rxrpc_input_call_event()
calls rxrpc_input_call_packet().  There are a number of places prior to
that where we ignore DATA packets for a variety of reasons (such as the
call already being complete) for which an unshare is then avoided.

And with that, rxrpc_input_packet() doesn't need to take a pointer to the
pointer to the packet, so change that to just a pointer.

Fixes: 2d1faf7 ("rxrpc: Simplify skbuff accounting in receive path")
Closes: https://sashiko.dev/#/patchset/20260408121252.2249051-1-dhowells%40redhat.com
	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jeffrey Altman <jaltman@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@kernel.org
Link: https://patch.msgid.link/20260422161438.2593376-4-dhowells@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 1f27401)
	Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
Signed-off-by: Shreeya Patel <spatel@ciq.com>
cve-pre CVE-2026-43500
commit-author David Howells <dhowells@redhat.com>
commit 55b2984

Fix rxrpc_input_call_event() to only unshare DATA packets and not ACK,
ABORT, etc..

And with that, rxrpc_input_packet() doesn't need to take a pointer to the
pointer to the packet, so change that to just a pointer.

Fixes: 1f27401 ("rxrpc: Fix potential UAF after skb_unshare() failure")
Closes: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com
	Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jeffrey Altman <jaltman@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@kernel.org
Link: https://patch.msgid.link/20260423200909.3049438-2-dhowells@redhat.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 55b2984)
	Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
cve CVE-2026-43284
commit-author Kuan-Ting Chen <h3xrabbit@gmail.com>
commit f4c50a4
upstream-diff |
	While this kernel lacks MSG_SPLICE_PAGES, it still has udp_sendpage().
	Upstream didn't patch udp_sendpage() because sendpage was removed
	entirely in favor of MSG_SPLICE_PAGES. In this kernel, splice() can
	still attach a page cache page to an IPv4 datagram via sendpage.
	Therefore, udp_sendpage() must be patched instead. And there is no
	patch for IPv6 datagrams because it isn't affected; there's no
	sendpage callback for IPv6 UDP.

MSG_SPLICE_PAGES can attach pages from a pipe directly to an skb. TCP
marks such skbs with SKBFL_SHARED_FRAG after skb_splice_from_iter(),
so later paths that may modify packet data can first make a private
copy. The IPv4/IPv6 datagram append paths did not set this flag when
splicing pages into UDP skbs.

That leaves an ESP-in-UDP packet made from shared pipe pages looking
like an ordinary uncloned nonlinear skb. ESP input then takes the no-COW
fast path for uncloned skbs without a frag_list and decrypts in place
over data that is not owned privately by the skb.

Mark IPv4/IPv6 datagram splice frags with SKBFL_SHARED_FRAG, matching
TCP. Also make ESP input fall back to skb_cow_data() when the flag is
present, so ESP does not decrypt externally backed frags in place.
Private nonlinear skb frags still use the existing fast path.

This intentionally does not change ESP output. In esp_output_head(),
the path that appends the ESP trailer to existing skb tailroom without
calling skb_cow_data() is not reachable for nonlinear skbs:
skb_tailroom() returns zero when skb->data_len is nonzero, while ESP
tailen is positive. Thus ESP output will either use the separate
destination-frag path or fall back to skb_cow_data().

Fixes: cac2661 ("esp4: Avoid skb_cow_data whenever possible")
Fixes: 03e2a30 ("esp6: Avoid skb_cow_data whenever possible")
Fixes: 7da0dde ("ip, udp: Support MSG_SPLICE_PAGES")
Fixes: 6d8192b ("ip6, udp6: Support MSG_SPLICE_PAGES")
	Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
	Reported-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
	Tested-by: Hyunwoo Kim <imv4bel@gmail.com>
	Cc: stable@vger.kernel.org
	Signed-off-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
	Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit f4c50a4)
Signed-off-by: Shreeya Patel <spatel@ciq.com>
cve CVE-2026-43500
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit -
commit-source https://lore.kernel.org/all/afKV2zGR6rrelPC7@v4bel
upstream-diff |
	The conn_event.c hunk is dropped entirely. Upstream wraps the
	conn->security->verify_response() call inside a new
	rxrpc_verify_response() function that copies non-linear skbs before
	in-place decryption. This kernel doesn't have that wrapper; the
	security op is called directly from rxrpc_process_event(), so there
	is no call site to patch. The call_event.c hunk applies as-is.

The DATA-packet handler in rxrpc_input_call_event() and the RESPONSE
handler in rxrpc_verify_response() copy the skb to a linear one before
calling into the security ops only when skb_cloned() is true.  An skb
that is not cloned but still carries paged fragments (skb->data_len != 0)
falls through to the in-place decryption path, which binds the frag
pages directly into the AEAD/skcipher SGL via skb_to_sgvec().

Extend the gate so that any skb with non-linear data is also copied,
ensuring the security handler always operates on a fully linear skb.
The OOM/trace handling already in place is reused.

Fixes: d0d5c0c ("rxrpc: Use skb_unshare() rather than skb_cow_data()")
	Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
(cherry picked from commit 544687651fe57721c5e4e76380ed8ef8fdfdc98b)
	Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
cve CVE-2026-46317
commit-author Hyunwoo Kim <imv4bel@gmail.com>
commit 7054335
upstream-diff | Due to missing the following change set the merge
    conflict arose due to a previous drop extra parameters to
    kvrealloc().  The change set was deemed unnecessary for this fix.
    https://lore.kernel.org/all/20240722163111.4766-1-dakr@kernel.org/

kvm->arch.nested_mmus[] is walked under kvm->mmu_lock, including from the
MMU notifier path (kvm_unmap_gfn_range() -> kvm_nested_s2_unmap()), which
can run at any time. kvm_vcpu_init_nested() reallocates the array and frees
the old buffer while holding only kvm->arch.config_lock, so such a walker
can reference the freed array.

Allocate the new array outside of mmu_lock, as the allocation can sleep.
Under the lock, copy the existing entries, fix up the back pointers and
reassign the array. Free the old buffer after dropping the lock, as
kvfree() can sleep as well.

Fixes: 4f128f8 ("KVM: arm64: nv: Support multiple nested Stage-2 mmu structures")
	Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
	Reviewed-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/aiKIVVeIr1aAB1yp@v4bel
	Signed-off-by: Marc Zyngier <maz@kernel.org>
	Cc: stable@vger,kernel.org
(cherry picked from commit 7054335)
	Signed-off-by: Jonathan Maple <jmaple@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>
kerneltoast and others added 7 commits July 16, 2026 18:41
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>
…nge_handle_ioctl()

cve CVE-2026-23149
commit-author Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
commit 12f15d5

Since GEM bo handles are u32 in the uapi and the internal implementation
uses idr_alloc() which uses int ranges, passing a new handle larger than
INT_MAX trivially triggers a kernel warning:

idr_alloc():
...
	if (WARN_ON_ONCE(start < 0))
		return -EINVAL;
...

Fix it by rejecting new handles above INT_MAX and at the same time make
the end limit calculation more obvious by moving into int domain.

	Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
	Reported-by: Zhi Wang <wangzhi@stu.xidian.edu.cn>
Fixes: 5309672 ("drm: Add DRM prime interface to reassign GEM handle")
	Cc: David Francis <David.Francis@amd.com>
	Cc: Felix Kuehling <felix.kuehling@amd.com>
	Cc: Christian König <christian.koenig@amd.com>
	Cc: <stable@vger.kernel.org> # v6.18+
	Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
	Reviewed-by: Christian König <christian.koenig@amd.com>
	Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260123141540.76540-1-tvrtko.ursulin@igalia.com
(cherry picked from commit 12f15d5)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
cve CVE-2026-46215
commit-author Francis, David <David.Francis@amd.com>
commit 5e28b7b

There was a potential race condition in change_handle. The ioctl
briefly had a single object with two idr entries; a concurrent
gem_close could delete the object and remove one of the handles
while leaving the other one dangling, which could subsequently
be dereferenced for a use-after-free.

To fix this, do the same dance that gem_close itself does.
(f6cd7da drm: Release driver references to handle before making it available again)
First idr_replace the old handle to NULL. Later, if the prime
operations are successful, actually close it.

create_tail required a similar dance to avoid a similar problem.
(bd46cec drm/gem: Fix race in drm_gem_handle_create_tail())
It idr_allocs the new handle with NULL, then swaps in the correct
object later to avoid races. We don't need to do that here, since
the only operations that could race are drm_prime, and
change_handle holds the prime lock for the entire duration.

v2: cleanups of error paths

	Signed-off-by: David Francis <David.Francis@amd.com>
Co-authored-by: Dave Airlie <airlied@gmail.com>
	Reported-by: Puttimet Thammasaeng <pwn8official@gmail.com>
	Tested-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
	Cc: Simona Vetter <simona@ffwll.ch>
	Cc: stable@vger.kernel.org
	Cc: Christian Koenig <Christian.Koenig@amd.com>
Fixes: 5309672 ("drm: Add DRM prime interface to reassign GEM handle")
	Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 5e28b7b)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
cve CVE-2026-52966
commit-author Edward Adam Davis <eadavis@qq.com>
commit dc36660

Commit 5e28b7b introduced a logical error by failing to replace the
newly generated IDR pointer to old id's pointer at the correct location
within the "change handle" logic; this resulted in the issue reported by
syzbot [1].

Specifically, the new IDR object pointer is intended to replace the original
id's pointer during the normal execution flow.

Additionally, an unnecessary conditional check for the ret exit path has
been removed.

[1]
!RB_EMPTY_ROOT(&prime_fpriv->dmabufs)
WARNING: drivers/gpu/drm/drm_prime.c:224 at drm_prime_destroy_file_private+0x48/0x60 drivers/gpu/drm/drm_prime.c:224, CPU#0: syz.0.17/5833
Call Trace:
 drm_file_free.part.0+0x7e6/0xcc0 drivers/gpu/drm/drm_file.c:269
 drm_file_free drivers/gpu/drm/drm_file.c:237 [inline]
 drm_close_helper.isra.0+0x186/0x200 drivers/gpu/drm/drm_file.c:290
 drm_release+0x1ab/0x360 drivers/gpu/drm/drm_file.c:438

Fixes: 5e28b7b ("drm: Set old handle to NULL before prime swap in change_handle")
	Reported-by: syzbot+d7c9eed171647e421013@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d7c9eed171647e421013
	Cc: stable@vger.kernel.org
	Tested-by: syzbot+d7c9eed171647e421013@syzkaller.appspotmail.com
	Signed-off-by: Edward Adam Davis <eadavis@qq.com>
	Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/tencent_C267296443AAA4567771176886DFF364A305@qq.com
(cherry picked from commit dc36660)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
cve-bf CVE-2026-46215
commit-author Zhenghang Xiao <kipreyyy@gmail.com>
commit 7164d78

drm_gem_change_handle_ioctl leaves the old handle live in the IDR
during the window between spin_unlock(table_lock) and the final
spin_lock(table_lock). A concurrent drm_gem_handle_delete on the old
handle succeeds in this window, decrements handle_count to 0, and frees
the GEM object while the new handle's IDR entry still references it.

NULL the old handle's IDR entry before dropping table_lock so that any
concurrent GEM_CLOSE on the old handle sees NULL and returns -EINVAL.
Restore the old entry on the prime-bookkeeping error path.

Fixes: 5e28b7b ("drm: Set old handle to NULL before prime swap in change_handle")
	Signed-off-by: Zhenghang Xiao <kipreyyy@gmail.com>
	Cc: stable@vger.kernel.org
	Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260526085313.26791-1-kipreyyy@gmail.com
(cherry picked from commit 7164d78)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
cve CVE-2026-53145
commit-author Simona Vetter <simona.vetter@ffwll.ch>
commit 1a4f03d

[airlied: just added some comments on how to reenable]
On-list because the cat is out of the bag and we're clearly not good
enough to figure this out in private. The story thus far:

5e28b7b ("drm: Set old handle to NULL before prime swap in
change_handle") tried to fix a race condition between the gem_close and
gem_change_handle ioctls, but got a few things wrong:

- There's a confusion with the local variable handle, which is actually
  the new handle, and so the two-stage trick was actually applied to the
  wrong idr slot. 7164d78 ("drm/gem: fix race between
  change_handle and handle_delete") tried to fix that by adding yet
  another code block, but forgot to add the error handling. Which meant
  we now have two paths, both kinda wrong.

- dc36660 ("drm: Replace old pointer to new idr") tried to apply
  another fix, but inconsistently, again because of the handle confusion
  - this would be the right fix (kinda, somewhat, it's a mess) if we'd
  do the two-stage approach for the new handle. Except that wasn't the
  intent of the original fix.

We also didn't have an igt merged for the original ioctl, which is a big
no-go. This was attempted to address off-list in the original bugfix,
and amd QA people claimed the bug was fixed now. Very clearly that's not
the case. Here's my attempt to sort this out:

- Rename the local variable to new_handle, the old aliasing with
  args->handle is just too dangerously confusing.

- Merge the gem obj lookup with the two-stage idr_replace so that we
  avoid getting ourselves confused there.

- This means we don't have a surplus temporary reference anymore, only
  an inherited from the idr. A concurrent gem_close on the new_handle
  could steal that. Fix that with the same two-stage approach
  create_tail uses. This is a bit overkill as documented in the comment,
  but I also don't trust my ability to understand this all correctly, so
  go with the established pattern we have from other ioctls instead for
  maximum paranoia.

- Adjust error paths. I've tried to make the error and success paths
  common, because they are identical except for which handle is removed
  and on which we call idr_replace to (re)install the object again. But
  that made things messier to read, so I've left it at the more verbose
  version, which unfortunately hides the symmetry in the entire code
  flow a bit.

- While at it, also replace the 7 space indent with 1 tab.

And finally, because I flat out don't trust my abilities here at all
anymore:

- Disable the ioctl until we have the igt situation and everything else
  sorted out on-list and with full consensus.

v2:

Sashiko noticed that I didn't handle the error path for idr_replace
correctly, it must be checked with IS_ERR_OR_NULL like in
gem_handle_delete. So yeah, definitely should just the existing paths
1:1 because this is endless amounts of tricky.

Also add the Fixes: line for the original ioctl, I forgot that too.

	Reported-by: DARKNAVY (@DarkNavyOrg) <vr@darknavy.com>
	Signed-off-by: Simona Vetter <simona.vetter@ffwll.ch>
Fixes: dc36660 ("drm: Replace old pointer to new idr")
	Cc: syzbot+d7c9eed171647e421013@syzkaller.appspotmail.com
	Cc: stable@vger.kernel.org
	Cc: Edward Adam Davis <eadavis@qq.com>
	Cc: Dave Airlie <airlied@redhat.com>
	Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
	Cc: Maxime Ripard <mripard@kernel.org>
	Cc: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 5e28b7b ("drm: Set old handle to NULL before prime swap in change_handle")
	Cc: David Francis <David.Francis@amd.com>
	Cc: Puttimet Thammasaeng <pwn8official@gmail.com>
	Cc: Christian Koenig <Christian.Koenig@amd.com>
Fixes: 7164d78 ("drm/gem: fix race between change_handle and handle_delete")
	Cc: Zhenghang Xiao <kipreyyy@gmail.com>
Fixes: 5e28b7b ("drm: Set old handle to NULL before prime swap in change_handle")
	Reviewed-by: David Francis <David.Francis@amd.com>
	Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260604194437.1725314-1-simona.vetter@ffwll.ch
(cherry picked from commit 1a4f03d)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
@github-actions

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/29576863610

@github-actions

Copy link
Copy Markdown

🔍 Upstream Linux Kernel Commit Check

  • ⚠️ PR commit 71e089ad5fe (net: mana: Add support for net_shaper_ops) references upstream commit
    75cabb46935b which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    3b7c7fc97ae net: mana: Move current_speed debugfs file to mana_init_port() (Erni Sri Satya Vennela)
  • ⚠️ PR commit d8285579836 (rxrpc: Fix potential UAF after skb_unshare() failure) does not reference a CVE but
    upstream commit 1f2740150f90 is associated with CVE-2026-45998

  • ⚠️ PR commit d0292c9f36e (xfrm: esp: avoid in-place decrypt on shared skb frags) references upstream commit
    f4c50a4034e6 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:

    48f6a5356a3 net: skbuff: propagate shared-frag marker through frag-transfer helpers (Hyunwoo Kim) (CVE-2026-43503)
    f84eca58173 net: skbuff: preserve shared-frag marker during coalescing (William Bowling) (CVE-2026-46300)

This is an automated message from the kernel commit checker workflow.

@github-actions

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit 71e089ad5fe (net: mana: Add support for net_shaper_ops) → upstream 75cabb46935b
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -4,9 +4,6 @@
 #ifndef _MANA_H
 #define _MANA_H
 
-#include <linux/rh_kabi.h>
-#include RH_KABI_HIDE_INCLUDE(<net/net_shaper.h>)
-
 #include "gdma.h"
 #include "hw_channel.h"
 
@@ -555,14 +552,6 @@
 
 	/* Debugfs */
 	struct dentry *mana_port_debugfs;
-
-	/* Fields added via RH_KABI_EXTEND to preserve kABI for MANA symbols
-	 * added to the kABI whitelist in RHEL 9.8.
-	 * Upstream commits: 75cabb46935b ("net: mana: Add support for net_shaper_ops")
-	 * and a6d5edf11e0c ("net: mana: Add speed support in mana_get_link_ksettings")
-	 */
-	RH_KABI_EXTEND(struct net_shaper_handle handle)
-	RH_KABI_EXTEND(u32 speed)
 };
 
 netdev_tx_t mana_start_xmit(struct sk_buff *skb, struct net_device *ndev);
@@ -619,8 +605,8 @@
 	MANA_FENCE_RQ		= 0x20006,
 	MANA_CONFIG_VPORT_RX	= 0x20007,
 	MANA_QUERY_VPORT_CONFIG	= 0x20008,
-	RH_KABI_EXTEND_ENUM(MANA_QUERY_LINK_CONFIG = 0x2000A)
-	RH_KABI_EXTEND_ENUM(MANA_SET_BW_CLAMP = 0x2000B)
+	MANA_QUERY_LINK_CONFIG	= 0x2000A,
+	MANA_SET_BW_CLAMP	= 0x2000B,
 	MANA_QUERY_PHY_STAT     = 0x2000c,
 
 	/* Privileged commands for the PF mode */

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -5,6 +5,7 @@
 #define _MANA_H
 
 #include <net/xdp.h>
+#include <net/net_shaper.h>
 
 #include "gdma.h"
 #include "hw_channel.h"
@@ -526,6 +527,9 @@
 	struct mutex vport_mutex;
 	int vport_use_count;
 
+	/* Net shaper handle*/
+	struct net_shaper_handle handle;
+
 	u16 port_idx;
 
 	bool port_is_up;
@@ -527,6 +531,8 @@
 	int vport_use_count;
 
 	u16 port_idx;
+	/* Currently configured speed (mbps) */
+	u32 speed;
 
 	bool port_is_up;
 	bool port_st_save; /* Saved port state */
@@ -562,6 +568,9 @@
 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog);
 int mana_bpf(struct net_device *ndev, struct netdev_bpf *bpf);
 void mana_query_gf_stats(struct mana_port_context *apc);
+int mana_query_link_cfg(struct mana_port_context *apc);
+int mana_set_bw_clamp(struct mana_port_context *apc, u32 speed,
+		      int enable_clamping);
 void mana_query_phy_stats(struct mana_port_context *apc);
 int mana_pre_alloc_rxbufs(struct mana_port_context *apc, int mtu, int num_queues);
 void mana_pre_dealloc_rxbufs(struct mana_port_context *apc);

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -3139,5 +3008,5 @@
-
-	netif_carrier_on(ndev);
+		goto free_indir;
+	}
 
 	return 0;
 
--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -2,4 +1,9 @@
 #define _MANA_H
 
+#include <net/xdp.h>
+
+#include <linux/rh_kabi.h>
+#include RH_KABI_HIDE_INCLUDE(<net/net_shaper.h>)
+
 #include "gdma.h"
 #include "hw_channel.h"
@@ -576,6 +564,6 @@
 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog);
 int mana_bpf(struct net_device *ndev, struct netdev_bpf *bpf);
-int mana_query_gf_stats(struct mana_context *ac);
+void mana_query_gf_stats(struct mana_port_context *apc);
 void mana_query_phy_stats(struct mana_port_context *apc);
 int mana_pre_alloc_rxbufs(struct mana_port_context *apc, int mtu, int num_queues);
 void mana_pre_dealloc_rxbufs(struct mana_port_context *apc);
  • ⚠️ PR commit 1c38e49e86d (net: mana: Add speed support in mana_get_link_ksettings) → upstream a6d5edf11e0c
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -563,7 +563,6 @@
 	 */
 	RH_KABI_EXTEND(struct net_shaper_handle handle)
 	RH_KABI_EXTEND(u32 speed)
-	RH_KABI_EXTEND(u32 max_speed)
 };
 
 netdev_tx_t mana_start_xmit(struct sk_buff *skb, struct net_device *ndev);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -533,6 +533,8 @@
 	u16 port_idx;
 	/* Currently configured speed (mbps) */
 	u32 speed;
+	/* Maximum speed supported by the SKU (mbps) */
+	u32 max_speed;
 
 	bool port_is_up;
 	bool port_st_save; /* Saved port state */

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -530,6 +530,6 @@
-	 */
-	RH_KABI_EXTEND(struct net_shaper_handle handle)
-	RH_KABI_EXTEND(u32 speed)
-};
+	u16 port_idx;
+	/* Currently configured speed (mbps) */
+	u32 speed;
 
-netdev_tx_t mana_start_xmit(struct sk_buff *skb, struct net_device *ndev);
+	bool port_is_up;
+	bool port_st_save; /* Saved port state */
  • ⚠️ PR commit d8285579836 (rxrpc: Fix potential UAF after skb_unshare() failure) → upstream 1f2740150f90
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -137,7 +139,6 @@
 	EM(rxrpc_skb_new_error_report,		"NEW error-rpt") \
 	EM(rxrpc_skb_new_jumbo_subpacket,	"NEW jumbo-sub") \
 	EM(rxrpc_skb_new_unshared,		"NEW unshared ") \
-	EM(rxrpc_skb_put_call_rx,		"PUT call-rx  ") \
 	EM(rxrpc_skb_put_conn_secured,		"PUT conn-secd") \
 	EM(rxrpc_skb_put_conn_work,		"PUT conn-work") \
 	EM(rxrpc_skb_put_error_report,		"PUT error-rep") \
--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -342,27 +342,8 @@
 	if (skb && skb->mark == RXRPC_SKB_MARK_ERROR)
 		goto out;
 
-	if (skb) {
-		struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
-
-		if (sp->hdr.securityIndex != 0 &&
-		    skb_cloned(skb)) {
-			/* Unshare the packet so that it can be
-			 * modified by in-place decryption.
-			 */
-			struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC);
-
-			if (nskb) {
-				rxrpc_new_skb(nskb, rxrpc_skb_new_unshared);
-				rxrpc_input_call_packet(call, nskb);
-				rxrpc_free_skb(nskb, rxrpc_skb_put_call_rx);
-			} else {
-				rxrpc_see_skb(skb, rxrpc_skb_see_unshare_nomem);
-			}
-		} else {
-			rxrpc_input_call_packet(call, skb);
-		}
-	}
+	if (skb)
+		rxrpc_input_call_packet(call, skb);
 
 	/* If we see our async-event poke, check for timeout trippage. */
 	now = ktime_get_real();

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -162,8 +162,6 @@
 	E_(rxrpc_call_poke_timer_now,		"Timer-now")
 
 #define rxrpc_skb_traces \
-	EM(rxrpc_skb_eaten_by_unshare,		"ETN unshare  ") \
-	EM(rxrpc_skb_eaten_by_unshare_nomem,	"ETN unshar-nm") \
 	EM(rxrpc_skb_get_call_rx,		"GET call-rx  ") \
 	EM(rxrpc_skb_get_conn_secured,		"GET conn-secd") \
 	EM(rxrpc_skb_get_conn_work,		"GET conn-work") \
@@ -190,6 +188,7 @@
 	EM(rxrpc_skb_put_purge,			"PUT purge    ") \
 	EM(rxrpc_skb_put_purge_oob,		"PUT purge-oob") \
 	EM(rxrpc_skb_put_response,		"PUT response ") \
+	EM(rxrpc_skb_put_response_copy,		"PUT resp-cpy ") \
 	EM(rxrpc_skb_put_rotate,		"PUT rotate   ") \
 	EM(rxrpc_skb_put_unknown,		"PUT unknown  ") \
 	EM(rxrpc_skb_see_conn_work,		"SEE conn-work") \
--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -332,7 +332,24 @@
 
 			saw_ack |= sp->hdr.type == RXRPC_PACKET_TYPE_ACK;
 
-			rxrpc_input_call_packet(call, skb);
+			if (sp->hdr.securityIndex != 0 &&
+			    skb_cloned(skb)) {
+				/* Unshare the packet so that it can be
+				 * modified by in-place decryption.
+				 */
+				struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC);
+
+				if (nskb) {
+					rxrpc_new_skb(nskb, rxrpc_skb_new_unshared);
+					rxrpc_input_call_packet(call, nskb);
+					rxrpc_free_skb(nskb, rxrpc_skb_put_call_rx);
+				} else {
+					/* OOM - Drop the packet. */
+					rxrpc_see_skb(skb, rxrpc_skb_see_unshare_nomem);
+				}
+			} else {
+				rxrpc_input_call_packet(call, skb);
+			}
 			rxrpc_free_skb(skb, rxrpc_skb_put_call_rx);
 			did_receive = true;
 		}

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -126,4 +126,5 @@
 	EM(rxrpc_skb_eaten_by_unshare,		"ETN unshare  ") \
 	EM(rxrpc_skb_eaten_by_unshare_nomem,	"ETN unshar-nm") \
+	EM(rxrpc_skb_get_call_rx,		"GET call-rx  ") \
 	EM(rxrpc_skb_get_conn_secured,		"GET conn-secd") \
 	EM(rxrpc_skb_get_conn_work,		"GET conn-work") \
--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -331,6 +329,7 @@
 
-	if (skb)
-		rxrpc_input_call_packet(call, skb);
+			saw_ack |= sp->hdr.type == RXRPC_PACKET_TYPE_ACK;
 
-	/* If we see our async-event poke, check for timeout trippage. */
-	now = ktime_get_real();
+			rxrpc_input_call_packet(call, skb);
+			rxrpc_free_skb(skb, rxrpc_skb_put_call_rx);
+			did_receive = true;
+		}
  • ⚠️ PR commit 137db15ed54 (rxrpc: Fix rxrpc_input_call_event() to only unshare DATA packets) → upstream 55b2984c96c3
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -345,8 +345,7 @@
 	if (skb) {
 		struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
 
-		if (sp->hdr.type == RXRPC_PACKET_TYPE_DATA &&
-		    sp->hdr.securityIndex != 0 &&
+		if (sp->hdr.securityIndex != 0 &&
 		    skb_cloned(skb)) {
 			/* Unshare the packet so that it can be
 			 * modified by in-place decryption.

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -332,7 +332,8 @@
 
 			saw_ack |= sp->hdr.type == RXRPC_PACKET_TYPE_ACK;
 
-			if (sp->hdr.securityIndex != 0 &&
+			if (sp->hdr.type == RXRPC_PACKET_TYPE_DATA &&
+			    sp->hdr.securityIndex != 0 &&
 			    skb_cloned(skb)) {
 				/* Unshare the packet so that it can be
 				 * modified by in-place decryption.

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -331,5 +329,7 @@
 
-		if (sp->hdr.securityIndex != 0 &&
-		    skb_cloned(skb)) {
-			/* Unshare the packet so that it can be
-			 * modified by in-place decryption.
+			saw_ack |= sp->hdr.type == RXRPC_PACKET_TYPE_ACK;
+
+			if (sp->hdr.securityIndex != 0 &&
+			    skb_cloned(skb)) {
+				/* Unshare the packet so that it can be
+				 * modified by in-place decryption.
  • ⚠️ PR commit d0292c9f36e (xfrm: esp: avoid in-place decrypt on shared skb frags) → upstream f4c50a4034e6
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1468,9 +1468,6 @@
 			goto error;
 		}
 
-		if (!(flags & MSG_NO_SHARED_FRAGS))
-			skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
-
 		if (skb->ip_summed == CHECKSUM_NONE) {
 			__wsum csum;
 			csum = csum_page(page, offset, len);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1233,6 +1233,8 @@
 			if (err < 0)
 				goto error;
 			copy = err;
+			if (!(flags & MSG_NO_SHARED_FRAGS))
+				skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
 			wmem_alloc_delta += copy;
 		} else if (!zc) {
 			int i = skb_shinfo(skb)->nr_frags;

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1230,6 +1230,6 @@
-			goto error;
-		}
-
-		if (skb->ip_summed == CHECKSUM_NONE) {
-			__wsum csum;
-			csum = csum_page(page, offset, len);
+			if (err < 0)
+				goto error;
+			copy = err;
+			wmem_alloc_delta += copy;
+		} else if (!zc) {
+			int i = skb_shinfo(skb)->nr_frags;

================================================================================
*    ONLY IN PATCH2 - files not modified by patch1                             *
================================================================================

--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -915,7 +915,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
 			nfrags = 1;
 
 			goto skip_cow;
-		} else if (!skb_has_frag_list(skb)) {
+		} else if (!skb_has_frag_list(skb) &&
+			   !skb_has_shared_frag(skb)) {
 			nfrags = skb_shinfo(skb)->nr_frags;
 			nfrags++;
 
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1794,6 +1794,8 @@ alloc_new_skb:
 			if (err < 0)
 				goto error;
 			copy = err;
+			if (!(flags & MSG_NO_SHARED_FRAGS))
+				skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
 			wmem_alloc_delta += copy;
 		} else if (!zc) {
 			int i = skb_shinfo(skb)->nr_frags;
  • ⚠️ PR commit 95851c43253 (KVM: arm64: Reassign nested_mmus array behind mmu_lock) → upstream 70543358fa08
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -61,6 +61,13 @@
 	 * again, and there is no reason to affect the whole VM for this.
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
+	tmp = kvrealloc(kvm->arch.nested_mmus,
+			size_mul(sizeof(*kvm->arch.nested_mmus), kvm->arch.nested_mmus_size),
+			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
+			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
+	if (!tmp)
+		return -ENOMEM;
+
 	if (num_mmus > kvm->arch.nested_mmus_size) {
 		tmp = kvcalloc(num_mmus, sizeof(*tmp), GFP_KERNEL_ACCOUNT);
 		if (!tmp)

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -89,11 +89,6 @@
 	 * again, and there is no reason to affect the whole VM for this.
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
-	tmp = kvrealloc(kvm->arch.nested_mmus,
-			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
-			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
-	if (!tmp)
-		return -ENOMEM;
 
 	swap(kvm->arch.nested_mmus, tmp);
 

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -59,7 +59,6 @@
 	 */
 	num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
 	tmp = kvrealloc(kvm->arch.nested_mmus,
-			size_mul(sizeof(*kvm->arch.nested_mmus), kvm->arch.nested_mmus_size),
 			size_mul(sizeof(*kvm->arch.nested_mmus), num_mmus),
 			GFP_KERNEL_ACCOUNT | __GFP_ZERO);
 	if (!tmp)

This is an automated interdiff check for backported commits.

@github-actions

Copy link
Copy Markdown

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/29576863610

@PlaidCat
PlaidCat requested a review from a team July 17, 2026 17:49

@kerneltoast kerneltoast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@PlaidCat
PlaidCat merged commit 27e9d45 into rlc-9/5.14.0-687.26.1.el9_8 Jul 17, 2026
6 checks passed
@PlaidCat
PlaidCat deleted the jmaple_rlc-9/5.14.0-687.26.1.el9_8 branch July 17, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

10 participants