Skip to content

[RLC-10] Rebase Custom Changes to rlc-10/6.12.0-211.74.1.el10_2 - #1779

Open
PlaidCat wants to merge 91 commits into
rlc-10/6.12.0-211.74.1.el10_2from
jmaple_rlc-10/6.12.0-211.74.1.el10_2
Open

PlaidCat wants to merge 91 commits into
rlc-10/6.12.0-211.74.1.el10_2from
jmaple_rlc-10/6.12.0-211.74.1.el10_2

Conversation

@PlaidCat

@PlaidCat PlaidCat commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

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

Update process (This kernel CentOS base for 6.12.0-211.74.1.el10_2)

  • Rolling Release Rebase Process
  • Create rlc-10/6.12.0-211.74.1.el10_2 branch from rocky10_2
  • Cherry-pick all code from previous branch rlc-10/6.12.0-211.68.1.el10_2 into new branch (skipping unneeded code)
    • Fix conflicts as they arise
  • Build and Test

Rebase Log

Already on 'rlc-10/6.12.0-211.68.1.el10_2'
Already on 'jmaple_rlc-10/6.12.0-211.74.1.el10_2'
[rolling release update] Rolling Product:  rlc-10
[rolling release update] Checking out branch:  rlc-10/6.12.0-211.68.1.el10_2
[rolling release update] Gathering all the RESF kernel Tags
[rolling release update] Found 39 RESF kernel tags
[rolling release update] Checking out branch:  rocky10_2
[rolling release update] Gathering all the RESF kernel Tags
[rolling release update] Found 43 RESF kernel tags
[rolling release update] Common tag sha:  b'6e86f4a91bb4f'
"6e86f4a91bb4fd40c2c9df696938677024ca8d04 Rebuild rocky10_2 with kernel-6.12.0-211.68.1.el10_2"
[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 6e86f4a91bb4f..HEAD
[rolling release update] Number of commits to check:  71
[rolling release update] Checking modifications of shas
[rolling release update] Checked 7 of 71 commits
[rolling release update] Checked 14 of 71 commits
[rolling release update] Checked 21 of 71 commits
[rolling release update] Checked 28 of 71 commits
[rolling release update] Checked 35 of 71 commits
[rolling release update] Checked 42 of 71 commits
[rolling release update] Checked 49 of 71 commits
[rolling release update] Checked 56 of 71 commits
[rolling release update] Checked 63 of 71 commits
[rolling release update] Checked 70 of 71 commits
[rolling release update] 0 of 71 commits have FIPS protected changes
[rolling release update] Checking out old rolling branch:  rlc-10/6.12.0-211.68.1.el10_2
[rolling release update] Finding the CIQ Kernel and Associated Upstream commits between the last resf tag and HEAD
[rolling release update] Getting SHAS 6e86f4a91bb4f..HEAD
[rolling release update] Last RESF tag sha:  b'6e86f4a91bb4f'
[rolling release update] Total commits in old branch: 91
[rolling release update] Checking out new base branch:  rocky10_2
[rolling release update] Finding the kernel version for the new rolling release
[rolling release update] New Branch to create: rlc-10/6.12.0-211.74.1.el10_2
[rolling release update] Creating new branch: rlc-10/6.12.0-211.74.1.el10_2
[rolling release update] Creating new branch for PR:  jmaple_rlc-10/6.12.0-211.74.1.el10_2
[rolling release update] Creating Map of all new commits from last rolling release fork
[rolling release update] Total commits in new branch: 70
[rolling release update] Checking if any of the commits from the old rolling release are already present in the new base branch
- Old commit 0478e200055f backported upstream e3f33b0a1d89
  Already in new base as 5bfc07ea2f97: ipv4: free inet_opt and ireq_opt after an RCU grace period
[rolling release update] Found 1 duplicate commits to remove
[rolling release update] Removing duplicate commits:
  - 0478e200055f7ae4e7cf2f142e2c7afc09ed128b ipv4: free inet_opt and ireq_opt after an RCU grace period
[rolling release update] Applying 90 remaining commits to the new branch
  [1/90] abe25294cca1d github actions: Add kernelCI for rlc-10
  [2/90] f45641f7f9214 github actions: Use trigger for kernelCI
  [3/90] cb402af0f10fe github actions: Pin Checkout action to v6.0.2
  [4/90] 644ae2eddd636 github actions: set make to `nproc` rather than hardcoded
  [5/90] 68e42f7919c9c tools: hv: Enable debug logs for hv_kvp_daemon
  [6/90] 9b9ff86ffd732 dcache: export shrink_dentry_list() and add new helper d_dispose_if_unused()
  [7/90] 4ee7007cd6684 fuse: don't truncate cached, mutated symlink
  [8/90] 62e52c2b6a939 fuse: add more control over cache invalidation behaviour
  [9/90] 3259a3a4f9f5c fuse: fix possibly missing fuse_copy_finish() call in fuse_notify()
  [10/90] 3ca3e13ede001 fs: fuse: add dev id to /dev/fuse fdinfo
  [11/90] cf06b7ed434c5 fuse: respect FOPEN_KEEP_CACHE on opendir
  [12/90] 12fbd373aba93 gve: fix zero-length skb frag with header-split
  [13/90] 4741468ebcb11 gve: bound DQO-QPL TX buffer count to the s16 free-list range
  [14/90] 40629b01d77aa af_unix: Set error only when needed in unix_dgram_sendmsg().
  [15/90] 1f3746b61d021 ip6_tunnel: clear skb2->cb[] in ip6ip6_err()
  [16/90] 4c3bedbea0d3b fuse: rename to fuse_dev_end_requests and make non-static
  [17/90] 067bf9f2ddb76 fuse: Move fuse_get_dev to header file
  [18/90] 260b2ad0f0907 fuse: Move request bits
  [19/90] f2e4e5e924351 fuse: make args->in_args[0] to be always the header
  [20/90] 30316fef7de4c fuse: {io-uring} Handle SQEs - register commands
  [21/90] 076983a7cc2dd fuse: Make fuse_copy non static
  [22/90] c647c2f9c1e2a fuse: Add fuse-io-uring handling into fuse_copy
  [23/90] 0ec91c38284ee fuse: {io-uring} Make hash-list req unique finding functions non-static
  [24/90] 8c08e1c51365d fuse: Add io-uring sqe commit and fetch support
  [25/90] 886b375844747 fuse: {io-uring} Handle teardown of ring entries
  [26/90] 8238570e82ffe fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static
  [27/90] 22061509c55b5 fuse: Allow to queue fg requests through io-uring
  [28/90] b7f0db1c5d2c6 fuse: Allow to queue bg requests through io-uring
  [29/90] 6a83502d1c4b7 fuse: {io-uring} Prevent mount point hang on fuse-server termination
  [30/90] 402bff92dde89 fuse: block request allocation until io-uring init is complete
  [31/90] ca02eb726418a fuse: enable fuse-over-io-uring
  [32/90] daf65d525ea9f fuse: prevent disabling io-uring on active connections
  [33/90] 8b19d9e87e574 fuse: fix uring race condition for null dereference of fc
  [34/90] c8e698e749253 fuse: fix possible deadlock if rings are never initialized
  [35/90] 0b3280353532f fuse: removed unused function fuse_uring_create() from header
  [36/90] 81ada3a767f12 fuse: {io-uring} Fix a possible req cancellation race
  [37/90] 78deb551229f1 fuse: remove unneeded atomic set in uring creation
  [38/90] 8b58f2f24ae4f fuse: missing copy_finish in fuse-over-io-uring argument copies
  [39/90] 2c0f365553564 fuse: fix io-uring list corruption for terminated non-committed requests
  [40/90] bcbfc029f70de fuse-uring: fix EFAULT clobber in fuse_uring_commit
  [41/90] cdc49f4e26e01 fuse-uring: fix data races on ring->ready
  [42/90] 87b31110a910d fuse-uring: fix race between registration and connection abortion
  [43/90] 68689de147448 fuse-uring: check connection abort during ring creation
  [44/90] 95883bd32a964 fuse-uring: fix moving cancelled entry to ent_in_userspace list
  [45/90] 86981e437aeec fuse-uring: end fuse_req on io-uring cancel task work
  [46/90] 02cd1bac2894a fuse-uring: Avoid use-after-free in fuse_uring_async_stop_queues
  [47/90] 08d9cedf30fc8 fuse-uring: Avoid queue->stopped races and set/read that value under lock
  [48/90] 2d0206867b67b fuse-uring: make a fuse_req on SQE commit only findable after memcpy
  [49/90] 7e72be373a789 fuse-uring: remove request-less entries from ent_w_req_queue to fix NULL deref
  [50/90] b206cb164c5d5 fuse: fix io-uring background queue dispatch on request completion
  [51/90] db93e45764e63 fuse-uring: clear ent->fuse_req in commit_fetch error path
  [52/90] e138f89681253 fuse: fix missing barrier when checking io-uring readiness
  [53/90] c5182a6479d54 fuse: publish io-uring queues with release semantics
  [54/90] f9e97f94af950 fuse: copy request headers via a stack buffer for io-uring
  [55/90] 3a026602838c2 fuse: Fix the condition to enable over-io-uring
  [56/90] e1f2c20bb9fc7 configs: enable CONFIG_FUSE_IO_URING=y on x86_64 and aarch64
  [57/90] 2b25509878c38 selftests: filesystems: Add functional test for the abort file in fusectl
  [58/90] c49e4b8b37eb1 selftests/fuse: adapt fuse_mnt to libfuse3 API
  [59/90] 0928f8920f11f selftests/fuse: add ACL_DONT_CACHE regression test
  [60/90] 04a8d7c6e0669 selftests/fuse: add FUSE io-uring integration test
  [61/90] cf068fd016938 sctp: stream: fully roll back denied add-stream state
  [62/90] 46357bf811219 mpls: add seqcount to protect the platform_label{,s} pair
  [63/90] f4706e8a45e44 crypto: ecdh - implement FIPS PCT
  [64/90] 53a058c2540fe crypto: essiv - Zeroize keys on exit in essiv_aead_setkey()
  [65/90] 4696c228cba2f crypto: drbg - Align buffers to at least a cache line
  [66/90] eaf77925770a8 mm/gup: introduce pin_user_pages_fast_only()
  [67/90] d1ee92299a4c8 crypto: rng - Convert crypto_default_rng_refcnt into an unsigned int
  [68/90] 516997c0e3115 crypto: rng - Fix priority inversions due to mutex locks
  [69/90] c0c8ff563e094 crypto: sha1 - Add FIPS known answer test for lib/crypto path
  [70/90] 7be6d606c8809 crypto: sha256 - Add FIPS known answer test for lib/crypto path
  [71/90] a2e78717516a8 When in fips mode, self-test errors must panic.
  [72/90] 6e89cf9402256 When in fips mode, self-test errors must panic.
  [73/90] 344c18ccb2e18 In crypto_kdf108_ctr_generate() there is no minimum length check for the digest to be generated - it must be at least 112 bits.
  [74/90] 38dabf7d8a819 crypto: Kconfig - Make CRYPTO_FIPS depend on the DRBG being built-in
  [75/90] 3093c8095c068 crypto: rng - Ensure set_ent is always present
  [76/90] ccf87c3abf9b9 crypto: rng - Override drivers/char/random in FIPS mode
  [77/90] 6954d97e6c0d3 crypto: rng - Implement fast per-CPU DRBG instances
  [78/90] d39756ec63684 random: Restrict extrng registration to init time
  [79/90] a175e0642a6f8 crypto: rng - Only allow the DRBG to register as "stdrng" in FIPS mode
  [80/90] 3c1b64c946b8d crypto: rng - Fix tabs vs spaces in the per-CPU DRBG code
  [81/90] 64e5a458a069e crypto: rng - Make the per-CPU DRBG instances permanent
  [82/90] b37663776cee7 crypto: rng - Skip leading zero-length iovec segments
  [83/90] 413d4d01a7c5d crypto: rng - Fix spurious EFAULT when the destination PTE is zapped
  [84/90] c581fb7bf0d65 Revert "mm/gup: reintroduce pin_user_pages_fast_only()"
  [85/90] eab8dff17c8ac local_lock: Move this_cpu_ptr() notation from internal to main header
  [86/90] 7dcdb4459548a crypto: rng - Fix double percpu offset in local_unlock() calls
  [87/90] 947eb41550338 configs: Set CRYPTO_FIPS_CUSTOM_VERSION
  [88/90] cbae128b792a2 configs: Alter JITTERENTROPY_MEMSIZE
  [89/90] 6c2fa31fc8b0e dh_safe_prime_set_secret misses the check SP800-56Arev3, 5.6.2.1.2 that an externally provided private key is within the valid range 1 <= key <= q-1.
  [90/90] f470ac90cb3d8 github actions: Use reusable validate kernel commits workflow
[rolling release update] Successfully applied all 90 commits

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}: 7s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-rocky10_3_rebuild-698d473f1f77"
Making olddefconfig
--
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Starting Build
  GEN     arch/x86/include/generated/asm/orc_hash.h
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/errno.h
  WRAP    arch/x86/include/generated/uapi/asm/fcntl.h
  WRAP    arch/x86/include/generated/uapi/asm/ioctl.h
--
  LD [M]  net/qrtr/qrtr-mhi.ko
  LD [M]  virt/lib/irqbypass.ko
  BTF [M] net/qrtr/qrtr.ko
  BTF [M] net/qrtr/qrtr-mhi.ko
  BTF [M] virt/lib/irqbypass.ko
[TIMER]{BUILD}: 2272s
Making Modules
  SYMLINK /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/build
  INSTALL /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/modules.order
  INSTALL /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/modules.builtin
  INSTALL /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/modules.builtin.modinfo
--
  SIGN    /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/kernel/net/hsr/prp_dup_discard_test.ko
  SIGN    /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/kernel/net/qrtr/qrtr-mhi.ko
  SIGN    /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/kernel/virt/lib/irqbypass.ko
  SIGN    /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+/kernel/net/qrtr/qrtr.ko
  DEPMOD  /lib/modules/6.12.0-rocky10_3_rebuild-698d473f1f77+
[TIMER]{MODULES}: 9s
Making Install
  INSTALL /boot
[TIMER]{INSTALL}: 17s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-6.12.0-rocky10_3_rebuild-698d473f1f77+ and Index to 2
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 7s
[TIMER]{BUILD}: 2272s
[TIMER]{MODULES}: 9s
[TIMER]{INSTALL}: 17s
[TIMER]{TOTAL} 2310s
Rebooting in 10 seconds

KSelfTest

$ ./kernel-tools/kernel_auto_rebuild/get_kselftest_diff.sh
selftest-6.12.0-jmaple_rlc-10_6.12.0-211.65.1.el10_2-2a62602844a81+-1.log: 489 passed
selftest-6.12.0-jmaple_rlc-10_6.12.0-211.66.1.el10_2-2ef1ef9374eac+-1.log: 488 passed
selftest-6.12.0-jmaple_rlc-10_6.12.0-211.68.1.el10_2-d0aba05903d18+-1.log: 490 passed
selftest-6.12.0-jmaple_rlc-10_6.12.0-211.74.1.el10_2-4f2786507b8a3+-1.log: 490 passed

Before: selftest-6.12.0-jmaple_rlc-10_6.12.0-211.68.1.el10_2-d0aba05903d18+-1.log
After: selftest-6.12.0-jmaple_rlc-10_6.12.0-211.74.1.el10_2-4f2786507b8a3+-1.log
Diff:
+ok 14 selftests: net: bind_wildcard
-ok 6 selftests: damon: damos_quota.py

roxanan1996 and others added 30 commits November 9, 2026 09:01
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>
…nused()

jira SECO-468
commit-author Luis Henriques <luis@igalia.com>
commit 395b955

Add and export a new helper d_dispose_if_unused() which is simply a wrapper
around to_shrink_list(), to add an entry to a dispose list if it's not used
anymore.

Also export shrink_dentry_list() to kill all dentries in a dispose list.

	Suggested-by: Miklos Szeredi <miklos@szeredi.hu>
	Signed-off-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 395b955)
	Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
jira SECO-478
RFBugFix: FUSE
commit-author Miklos Szeredi <mszeredi@redhat.com>
commit b4c173d

Fuse allows the value of a symlink to change and this property is exploited
by some filesystems (e.g. CVMFS).

It has been observed, that sometimes after changing the symlink contents,
the value is truncated to the old size.

This is caused by fuse_getattr() racing with fuse_reverse_inval_inode().
fuse_reverse_inval_inode() updates the fuse_inode's attr_version, which
results in fuse_change_attributes() exiting before updating the cached
attributes

This is okay, as the cached attributes remain invalid and the next call to
fuse_change_attributes() will likely update the inode with the correct
values.

The reason this causes problems is that cached symlinks will be
returned through page_get_link(), which truncates the symlink to
inode->i_size.  This is correct for filesystems that don't mutate
symlinks, but in this case it causes bad behavior.

The solution is to just remove this truncation.  This can cause a
regression in a filesystem that relies on supplying a symlink larger than
the file size, but this is unlikely.  If that happens we'd need to make
this behavior conditional.

	Reported-by: Laura Promberger <laura.promberger@cern.ch>
	Tested-by: Sam Lewis <samclewis@google.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://lore.kernel.org/r/20250220100258.793363-1-mszeredi@redhat.com
	Reviewed-by: Bernd Schubert <bschubert@ddn.com>
	Signed-off-by: Christian Brauner <brauner@kernel.org>
(cherry picked from commit b4c173d)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFBugFix: FUSE
commit-author Luis Henriques <luis@igalia.com>
commit 2396356
upstream-diff | conflict in fs/fuse/dir.c due to missing this piece:
       d701902 - fuse: return correct dentry for ->mkdir
       Which is a part of a larger changeset here that we're not going to
       take: https://lore.kernel.org/all/20250227013949.536172-1-neilb@suse.de/
       | Additionally this bumps the Kernel FUSE API minor version from 41
       to 44.  The interface into via fuse3 currently in Rocky 10.1 is
       limited to API 38 anyways at 3.16.2.
       | There is a build conflict due to a major rewrite of the d_revalidate
       calls which now includes the parent directory being passed.
       5be1fa8 Pass parent directory inode and expected name to ->d_revalidate()
       In this case we can use the dentry->i_sb because we only need the
       superblock for get_fuse_conn_super().

Currently userspace is able to notify the kernel to invalidate the cache
for an inode.  This means that, if all the inodes in a filesystem need to
be invalidated, then userspace needs to iterate through all of them and do
this kernel notification separately.

This patch adds the concept of 'epoch': each fuse connection will have the
current epoch initialized and every new dentry will have it's d_time set to
the current epoch value.  A new operation will then allow userspace to
increment the epoch value.  Every time a dentry is d_revalidate()'ed, it's
epoch is compared with the current connection epoch and invalidated if it's
value is different.

	Signed-off-by: Luis Henriques <luis@igalia.com>
	Tested-by: Laura Promberger <laura.promberger@cern.ch>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 2396356)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>

build fix: fuse: add more control over cache invalidation behaviour
jira SECO-478
BUGFIX: FUSE
commit-author Miklos Szeredi <mszeredi@redhat.com>
commit 0b563aa

In case of FUSE_NOTIFY_RESEND and FUSE_NOTIFY_INC_EPOCH fuse_copy_finish()
isn't called.

Fix by always calling fuse_copy_finish() after fuse_notify().  It's a no-op
if called a second time.

Fixes: 760eac7 ("fuse: Introduce a new notification type for resend pending requests")
Fixes: 2396356 ("fuse: add more control over cache invalidation behaviour")
	Cc: <stable@vger.kernel.org> # v6.9
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 0b563aa)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-511
commit-author Chen Linxuan <chenlinxuan@uniontech.com>
commit f092229
upstream-diff | There were conflicts seen while applying
this patch due to the following missing commit :-
786412a ("fuse: enable fuse-over-io-uring")

This commit add fuse connection device id to
fdinfo of opened /dev/fuse files.

Related discussions can be found at links below.

Link: https://lore.kernel.org/all/CAJfpegvEYUgEbpATpQx8NqVR33Mv-VK96C+gbTag1CEUeBqvnA@mail.gmail.com/
	Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit f092229)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira SECO-518
commit-author Amir Goldstein <amir73il@gmail.com>
commit 03f275a

The re-factoring of fuse_dir_open() missed the need to invalidate
directory inode page cache with open flag FOPEN_KEEP_CACHE.

Fixes: 7de64d5 ("fuse: break up fuse_open_common()")
	Reported-by: Prince Kumar <princer@google.com>
Closes: https://lore.kernel.org/linux-fsdevel/CAEW=TRr7CYb4LtsvQPLj-zx5Y+EYBmGfM24SuzwyDoGVNoKm7w@mail.gmail.com/
	Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20250101130037.96680-1-amir73il@gmail.com
	Reviewed-by: Bernd Schubert <bernd.schubert@fastmail.fm>
	Signed-off-by: Christian Brauner <brauner@kernel.org>
(cherry picked from commit 03f275a)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira KERNEL-1217
commit-author Jordan Rhee <jordanrhee@google.com>
commit 6bf1457
upstream-diff RLC 10 predates the page-pool conversion and has no
  gve_free_buffer(); the freed buffer goes through
  gve_enqueue_buf_state(rx, &rx->dqo.recycled_buf_states, buf_state),
  the same form this tree's rx error path uses, which is what
  upstream's helper reduces to on non-page-pool queues.

When header split is enabled and a header-only packet is
received such as a pure TCP ACK, GVE will indicate an
RX SKB with a zero-length fragment. If this SKB is then
hairpinned and sent back out, the GVE TX path will emit
a zero-length descriptor. Hardware considers this
an illegal descriptor and stops the queue, causing a
TX timeout and interface reset.

Fix it by not adding the zero-length skb frag.

	Cc: stable@vger.kernel.org
Fixes: 5e37d82 ("gve: Add header split data path")
	Suggested-by: Praveen Kaligineedi <pkaligineedi@google.com>
Co-developed-by: Ziwei Xiao <ziweixiao@google.com>
	Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
	Signed-off-by: Jordan Rhee <jordanrhee@google.com>
	Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260807224315.234152-2-hramamurthy@google.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>

(cherry picked from commit 6bf1457)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira KERNEL-1217

gve_tx_qpl_buf_init() sizes the TX buffer free list as
GVE_TX_BUFS_PER_PAGE_DQO * num_entries, but the free-list links
(tx_qpl_buf_next) are s16.  GVE_TX_BUFS_PER_PAGE_DQO is PAGE_SIZE >> 11,
so on 64K-page builds (the aarch64-64k config ships CONFIG_GVE=m) a
4096-entry TX ring yields 2048 pages and 65536 buffers: entry 32767 is
seeded with a link of 32768, which reads back as -32768, and once 32768
buffers have been allocated gve_alloc_tx_qpl_buf() dereferences
tx_qpl_buf_next[-32768] and returns ids that index outside the QPL.

Clamp the count to S16_MAX, leaving an oversized QPL's tail unused
rather than mislinked.

This is not unique to this backport: upstream has the same unclamped
math at its tip. Kept as a separate commit so it can be dropped in
favor of the upstream fix once one lands;

Fixes: 07993df ("gve: Update QPL page registration logic")
Signed-off-by: Shreeya Patel <spatel@ciq.com>
cve-pre CVE-2026-53361
commit-author Kuniyuki Iwashima <kuniyu@amazon.com>
commit 001a250
upstream-diff |
    Context difference due to backported commit by redhat that
    technically comes after this change.
    3849005
    [af_unix: Don't call wait_for_unix_gc() on every sendmsg().]

We will introduce skb drop reason for AF_UNIX, then we need to
set an errno and a drop reason for each path.

Let's set an error only when it's needed in unix_dgram_sendmsg().

Then, we need not (re)set 0 to err.

	Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>

(cherry picked from commit 001a250)
	Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
cve CVE-2026-74597
commit-author Zhiling Zou <zhilinz@nebusec.ai>
commit f803c08

ip6ip6_err() clones an outer IPv6 ICMP error skb, pulls it to the
quoted inner IPv6 packet, and then passes the clone to icmpv6_send().
The clone still carries the outer packet's inet6_skb_parm in skb->cb.

If the outer packet had a Home Address Option, IP6CB(skb2)->dsthao
remains non-zero after skb_pull(). icmpv6_send() later calls
mip6_addr_swap(), which uses that stale dsthao offset against the quoted
inner packet. A malformed inner destination-options header can then make
the HAO lookup and address swap run past the end of the quoted packet
and corrupt skb_shared_info.

Clear skb2->cb[] before pulling the quoted inner IPv6 packet so the
reply path does not reuse metadata left by the outer IPv6 stack.

Fixes: e490d1d ("[IPV6] IP6TUNNEL: Split out generic routine in ip6ip6_err().")
	Cc: stable@vger.kernel.org
	Reported-by: Vega <vega@nebusec.ai>
	Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai>
	Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/fe1a5e765fbca88d69391887f0ed26a19e3e4d39.1785736562.git.zhilinz@nebusec.ai
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit f803c08)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 92270d0

This function is needed by fuse_uring.c to clean ring queues,
so make it non static. Especially in non-static mode the function
name 'end_requests' should be prefixed with fuse_

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Josef Bacik <josef@toxicpanda.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 92270d0)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 867d93d

Another preparation patch, as this function will be needed by
fuse/dev.c and fuse/dev_uring.c.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Josef Bacik <josef@toxicpanda.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 867d93d)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 88be7aa

These are needed by fuse-over-io-uring.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Josef Bacik <josef@toxicpanda.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 88be7aa)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 7ccd86b
upstream-diff | Context conflict on missing fs/fuse/fuse_i.h commit
	4174867 -virtiofs: use pages instead of pointer for kernel direct IO

This change sets up FUSE operations to always have headers in
args.in_args[0], even for opcodes without an actual header.
This step prepares for a clean separation of payload from headers,
initially it is used by fuse-over-io-uring.

For opcodes without a header, we use a zero-sized struct as a
placeholder. This approach:
- Keeps things consistent across all FUSE operations
- Will help with payload alignment later
- Avoids future issues when header sizes change

Op codes that already have an op code specific header do not
need modification.
Op codes that have neither payload nor op code headers
are not modified either (FUSE_READLINK and FUSE_DESTROY).
FUSE_BATCH_FORGET already has the header in the right place,
but is not using fuse_copy_args - as -over-uring is currently
not handling forgets it does not matter for now, but header
separation will later need special attention for that op code.

Correct the struct fuse_args->in_args array max size.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 7ccd86b)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 24fe962
upstream-diff | Context diff due to missing commit on fs/fuse/Makefile
	2b3933b - fuse: enable dynamic configuration of fuse max pages
			limit (FUSE_MAX_MAX_PAGES)
	Context difference due to future feature enabled earlier in git
	log order as well.

This adds basic support for ring SQEs (with opcode=IORING_OP_URING_CMD).
For now only FUSE_IO_URING_CMD_REGISTER is handled to register queue
entries.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 24fe962)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit d0f9c62

Move 'struct fuse_copy_state' and fuse_copy_* functions
to fuse_dev_i.h to make it available for fuse-io-uring.
'copy_out_args()' is renamed to 'fuse_copy_out_args'.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit d0f9c62)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit f773a7c

Add special fuse-io-uring into the fuse argument
copy handler.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit f773a7c)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 3821336

fuse-over-io-uring uses existing functions to find requests based
on their unique id - make these functions non-static.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 3821336)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit c090c8a

This adds support for fuse request completion through ring SQEs
(FUSE_URING_CMD_COMMIT_AND_FETCH handling). After committing
the ring entry it becomes available for new fuse requests.
Handling of requests through the ring (SQE/CQE handling)
is complete now.

Fuse request data are copied through the mmaped ring buffer,
there is no support for any zero copy yet.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit c090c8a)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 4a9bfb9

On teardown struct file_operations::uring_cmd requests
need to be completed by calling io_uring_cmd_done().
Not completing all ring entries would result in busy io-uring
tasks giving warning messages in intervals and unreleased
struct file.

Additionally the fuse connection and with that the ring can
only get released when all io-uring commands are completed.

Completion is done with ring entries that are
a) in waiting state for new fuse requests - io_uring_cmd_done
is needed

b) already in userspace - io_uring_cmd_done through teardown
is not needed, the request can just get released. If fuse server
is still active and commits such a ring entry, fuse_uring_cmd()
already checks if the connection is active and then complete the
io-uring itself with -ENOTCONN. I.e. special handling is not
needed.

This scheme is basically represented by the ring entry state
FRRS_WAIT and FRRS_USERSPACE.

Entries in state:
- FRRS_INIT: No action needed, do not contribute to
  ring->queue_refs yet
- All other states: Are currently processed by other tasks,
  async teardown is needed and it has to wait for the two
  states above. It could be also solved without an async
  teardown task, but would require additional if conditions
  in hot code paths. Also in my personal opinion the code
  looks cleaner with async teardown.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 4a9bfb9)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit ba74ba5

These functions are also needed by fuse-over-io-uring.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit ba74ba5)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit c2c9af9

This prepares queueing and sending foreground requests through
io-uring.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit c2c9af9)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit 857b026

This prepares queueing and sending background requests through
io-uring.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 857b026)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bschubert@ddn.com>
commit b6236c8

When the fuse-server terminates while the fuse-client or kernel
still has queued URING_CMDs, these commands retain references
to the struct file used by the fuse connection. This prevents
fuse_dev_release() from being invoked, resulting in a hung mount
point.

This patch addresses the issue by making queued URING_CMDs
cancelable, allowing fuse_dev_release() to proceed as expected
and preventing the mount point from hanging.

	Signed-off-by: Bernd Schubert <bschubert@ddn.com>
	Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> # io_uring
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit b6236c8)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira SECO-478
RFE: FUSE_IO_URING
commit-author Bernd Schubert <bernd@bsbernd.com>
commit 3393ff9
upstream-diff | Context conflict on missing fs/fuse/fuse_i.h commit
	4174867 -virtiofs: use pages instead of pointer for kernel direct IO

Avoid races and block request allocation until io-uring
queues are ready.

This is a especially important for background requests,
as bg request completion might cause lock order inversion
of the typical queue->lock and then fc->bg_lock

    fuse_request_end
       spin_lock(&fc->bg_lock);
       flush_bg_queue
         fuse_send_one
           fuse_uring_queue_fuse_req
           spin_lock(&queue->lock);

	Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
	Reviewed-by: Luis Henriques <luis@igalia.com>
	Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit 3393ff9)
	Signed-off-by: Jonathan Maple <jmaple@ciq.com>
herbertx and others added 16 commits November 9, 2026 09:01
cve CVE-2025-40109
commit c0d3672 upstream.

Ensure that set_ent is always set since only drbg provides it.

Fixes: 77ebdab ("crypto: af_alg - add extra parameters for DRBG interface")
Reported-by: Yiqi Sun <sunyiqixm@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit-author Herbert Xu <herbert.xu@redhat.com>
commit 8b0beca705b3877e24cccdd672422c66bbd75635
commit-source https://gitlab.com/cki-project/kernel-ark

Upstream Status: RHEL only

Restore the changes to use the crypto RNG in drivers/char/random
which were reverted after 5.18.

This reverts commit 297bcb88233101e8d5062729ff3a5f989bad1c3b.

This also brings the code up-to-date with respect to centos-stream
commit 9de3a73 so that changes that
were made after the kernel-ark revert have been brought in.

Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
Signed-off-by: Jeremy Allison <jallison@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>
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>
commit-author Sebastian Andrzej Siewior <bigeasy@linutronix.de>
commit 7ff495e

local_lock.h is the main header for the local_lock_t type and provides
wrappers around internal functions prefixed with __ in
local_lock_internal.h.

Move the this_cpu_ptr() dereference of the variable from the internal to
the main header. Since it is all macro implemented, this_cpu_ptr() will
still happen within the preempt/ IRQ disabled section.

This frees the internal implementation (__) to be used on local_lock_t
types which are local variables and must not be accessed via
this_cpu_ptr().

	Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
	Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
	Acked-by: Waiman Long <longman@redhat.com>
	Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20250630075138.3448715-2-bigeasy@linutronix.de

(cherry picked from commit 7ff495e)
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
local_unlock() is supposed to take a percpu pointer, which it then offsets
for the current CPU. The problem is that the per-CPU DRBG code passes
local_unlock() a pointer that has *already been offset for the current
CPU*, so the percpu offset gets added twice. `pcri` is the percpu pointer
and `cri` is the offset `pcri` pointer for the current CPU; passing `cri`
to local_unlock() results in the current CPU's offset getting added again
and thus the resulting pointer is garbage.

This went unnoticed at runtime because local_unlock() only dereferences
that pointer on PREEMPT_RT or CONFIG_DEBUG_LOCK_ALLOC=y kernels. The
pointer is never actually used otherwise.

This also went unnoticed at compile time because, for x86_64, __percpu only
expands to something on GCC 14+; __percpu is otherwise an empty macro. So
there's no pointer type mismatch detected at compile time on older GCC
versions. On GCC 14+, the following compile error occurs:

  ../crypto/rng.c: In function 'lock_default_rng':
  ../include/linux/percpu-defs.h:221:45: error: initialization from pointer to non-enclosed address space

Fix it by using __local_unlock() instead, which eliminates the duplicate
per-CPU offset addition. While using local_unlock() with `pcri` also works,
using `cri` with __local_unlock() is leaner because it doesn't need to redo
the offset addition, saving an instruction on kernels that actually use the
pointer.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Add CONFIG_CRYPTO_FIPS_CUSTOM_VERSION=y,

CONFIG_CRYPTO_FIPS_VERSION="ciq.6.12.20260826"

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Unset CRYPTO_JITTERENTROPY_MEMSIZE_2, set CRYPTO_JITTERENTROPY_MEMSIZE_128.

CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=512
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=256

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…at an externally provided private key is within the valid range 1 <= key <= q-1.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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>
@PlaidCat PlaidCat self-assigned this Nov 9, 2026
@PlaidCat
PlaidCat requested a review from a team November 9, 2026 17:23
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🔍 Upstream Linux Kernel Commit Check

  • ⚠️ PR commit 7a5fba0b423 (fuse: add more control over cache invalidation behaviour) references upstream commit
    2396356a945b which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    6648f54f345 fuse: move "epoch" from dentry.d_time to fuse_dentry.epoch (Miklos Szeredi)
    0fa8346099b fuse: invalidate readdir cache on epoch bump (Jun Wu)
    5a6baf20461 fuse: fix uninit-value in fuse_dentry_revalidate() (Luis Henriques) (CVE-2026-53311)
  • ⚠️ PR commit 37b8900bd34 (fuse: {io-uring} Handle SQEs - register commands) references upstream commit
    24fe962c86f5 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    1dfe2a220e9 fuse: fix uring race condition for null dereference of fc (Joanne Koong)
  • ⚠️ PR commit 741f792fd77 (fuse: Add io-uring sqe commit and fetch support) references upstream commit
    c090c8abae4b which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    c1338aae7b4 fuse: don't BUG when the copy buffer is exhausted (Xiang Mei)
  • ❗ PR commit 08d92cacd39 (crypto: rng - Override drivers/char/random in FIPS mode) references upstream commit
    8b0beca705b3 which does not exist in the upstream Linux kernel.

  • ❗ PR commit 08d92cacd39 (crypto: rng - Override drivers/char/random in FIPS mode) references upstream commit
    9de3a7339793 which does not exist in the upstream Linux kernel.

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

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

❌ Diffofdiffs: 26 of 57 backports differ from upstream, 1 couldn't be compared

View the diffofdiffs report.

Open to anyone signed in to GitHub. Report expires 2027-02-07 17:16 UTC.

# Subject Backport Upstream
1 fuse: add more control over cache invalidation behaviour 7a5fba0b423e 2396356a945b
2 fs: fuse: add dev id to /dev/fuse fdinfo d01dd198afab f09222980d77
3 gve: fix zero-length skb frag with header-split cca750c320e6 6bf14575c655
4 af_unix: Set error only when needed in unix_dgram_sendmsg(). b70c342c25bc 001a25088c35
5 fuse: rename to fuse_dev_end_requests and make non-static 3823393ac9ce 92270d076115
6 fuse: make args->in_args[0] to be always the header e017bcfbeec0 7ccd86ba3a48
7 fuse: {io-uring} Handle SQEs - register commands 37b8900bd348 24fe962c86f5
8 fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static 3c3f28825c2c ba74ba571189
9 fuse: block request allocation until io-uring init is complete 36b951e6ea7b 3393ff964e0f
10 fuse: enable fuse-over-io-uring 515f478e318c 786412a73e7e
11 fuse: missing copy_finish in fuse-over-io-uring argument copies 1e3eaf7fa7d3 6e0d7f7f4a43
12 fuse-uring: fix race between registration and connection abortion 99ad50b188e3 952b5d36f6a2
13 fuse-uring: check connection abort during ring creation 8ea427b0aacf c146284c4355
14 fuse-uring: fix moving cancelled entry to ent_in_userspace list 8611e654b203 198f45eeb9f7
15 fuse-uring: end fuse_req on io-uring cancel task work 7d5195efa523 bea4fe98204b
16 fuse-uring: Avoid use-after-free in fuse_uring_async_stop_queues 0cc80a646a75 d351da750669
17 fuse-uring: Avoid queue->stopped races and set/read that value under lock 294cc69e1ec7 b70a3aca1693
18 fuse-uring: make a fuse_req on SQE commit only findable after memcpy 41d787dfd2fb 1efd3d474fc0
19 fuse: fix io-uring background queue dispatch on request completion 00a1633c1cac 31da059891bd
20 fuse: fix missing barrier when checking io-uring readiness a80765090a70 edb310bc27f0
21 fuse: publish io-uring queues with release semantics f60ff036adaa 42df916e5a5f
22 fuse: copy request headers via a stack buffer for io-uring 6e31d75e6af1 fd10f40af314
23 fuse: Fix the condition to enable over-io-uring 0df4c5fcc975 1f59015e9581
24 selftests: filesystems: Add functional test for the abort file in fusectl 44e5df5b06cc 1a7b13781b0d
25 selftests/fuse: add ACL_DONT_CACHE regression test ac3554af80f9 9acb102522b9
26 mpls: add seqcount to protect the platform_label{,s} pair 2879d7855eff 629ec78ef860

Warning

1 backport couldn't be compared. Details are in the workflow run log.

1. crypto: rng - Override drivers/char/random in FIPS mode

Backport: 08d92cacd39f · Upstream: 8b0beca705b3

Show error
Cannot find upstream commit 8b0beca705b3877e24cccdd672422c66bbd75635 in ctrliq/kernel-src-tree: gh failed (exit 1):
gh: No commit found for SHA: 8b0beca705b3877e24cccdd672422c66bbd75635 (HTTP 422)

33 additional commits have no upstream reference and were not compared.

Checked PR revision 4f2786507b8a against base 20b9c8ed908a.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

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

jira VULN-219558
cve CVE-2026-98276
commit-author Eric Dumazet <edumazet@google.com>
commit 9ed55f3

sk->sk_flags must only be changed while holding the socket lock,
because sock_set_flag() and sock_reset_flag() use non atomic
operations (__set_bit() and __clear_bit()).

sock_gettstamp() is one of the last places where a bit of sk->sk_flags
is changed from a syscall without owning the socket lock, through
sock_enable_timestamp(sk, SOCK_TIMESTAMP).

sk_set_memalloc() and sk_clear_memalloc() also change sk->sk_flags
without the socket lock, but their callers (nbd, iscsi_tcp, nvme-tcp,
sunrpc, wireguard) need a careful audit, this will be addressed in a
separate patch.

Jungwoo Lee and Wongi Lee reported an UDP socket use-after-free
caused by this bug: a SIOCGSTAMPNS_NEW ioctl racing with bind()
can cancel the SOCK_RCU_FREE bit that udp_lib_get_port() just set,
because both threads perform a read-modify-write on the same word.

  CPU 0 (bind)                        CPU 1 (SIOCGSTAMPNS_NEW)
  --------------------------------    ----------------------------
  read sk_flags = F                   read sk_flags = F
  compute F | BIT(SOCK_RCU_FREE)      compute F | BIT(SOCK_TIMESTAMP)
  store F | BIT(SOCK_RCU_FREE)
  sk_add_node_rcu(sk, ...)
                                      store F | BIT(SOCK_TIMESTAMP)

After the lost update, SOCK_RCU_FREE is clear while the socket is
visible to lockless UDP receive lookups. sk_destruct() then frees
the socket immediately instead of waiting for a RCU grace period,
while the receive path still holds a reference-less pointer to it:

 BUG: KASAN: slab-use-after-free in ipv4_pktinfo_prepare+0x30/0x410
 Read of size 8 at addr ffff888008806610 by task exploit/207
 CPU: 0 UID: 1000 PID: 207 Comm: exploit Not tainted 6.12.95+ #1
  ipv4_pktinfo_prepare+0x30/0x410
  udp_queue_rcv_one_skb+0x51c/0x1180
  udp_unicast_rcv_skb+0x109/0x350
  ip_protocol_deliver_rcu+0x14b/0x310
  ip_local_deliver_finish+0x29d/0x390
  ip_local_deliver+0x24d/0x2a0

Only grab the socket lock when SOCK_TIMESTAMP has to be set,
to keep the common case lockless.

Fixes: 1da177e ("Linux-2.6.12-rc2")
	Reported-by: Jungwoo Lee <jwlee2217@gmail.com>
	Reported-by: Wongi Lee <qw3rtyp0@gmail.com>
	Signed-off-by: Eric Dumazet <edumazet@google.com>
	Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260915043055.3441600-1-edumazet@google.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 9ed55f3)
	Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
@bmastbergen

Copy link
Copy Markdown
Collaborator

Added CVE-2026-98276 fix:
87ec642

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🔍 Upstream Linux Kernel Commit Check

  • ⚠️ PR commit 7a5fba0b423 (fuse: add more control over cache invalidation behaviour) references upstream commit
    2396356a945b which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    6648f54f345 fuse: move "epoch" from dentry.d_time to fuse_dentry.epoch (Miklos Szeredi)
    0fa8346099b fuse: invalidate readdir cache on epoch bump (Jun Wu)
    5a6baf20461 fuse: fix uninit-value in fuse_dentry_revalidate() (Luis Henriques) (CVE-2026-53311)
  • ⚠️ PR commit 37b8900bd34 (fuse: {io-uring} Handle SQEs - register commands) references upstream commit
    24fe962c86f5 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    1dfe2a220e9 fuse: fix uring race condition for null dereference of fc (Joanne Koong)
  • ⚠️ PR commit 741f792fd77 (fuse: Add io-uring sqe commit and fetch support) references upstream commit
    c090c8abae4b which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    c1338aae7b4 fuse: don't BUG when the copy buffer is exhausted (Xiang Mei)
  • ❗ PR commit 08d92cacd39 (crypto: rng - Override drivers/char/random in FIPS mode) references upstream commit
    8b0beca705b3 which does not exist in the upstream Linux kernel.

  • ❗ PR commit 08d92cacd39 (crypto: rng - Override drivers/char/random in FIPS mode) references upstream commit
    9de3a7339793 which does not exist in the upstream Linux kernel.

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

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

❌ Diffofdiffs: 26 of 58 backports differ from upstream, 1 couldn't be compared

View the diffofdiffs report.

Open to anyone signed in to GitHub. Report expires 2027-02-07 22:17 UTC.

# Subject Backport Upstream
1 fuse: add more control over cache invalidation behaviour 7a5fba0b423e 2396356a945b
2 fs: fuse: add dev id to /dev/fuse fdinfo d01dd198afab f09222980d77
3 gve: fix zero-length skb frag with header-split cca750c320e6 6bf14575c655
4 af_unix: Set error only when needed in unix_dgram_sendmsg(). b70c342c25bc 001a25088c35
5 fuse: rename to fuse_dev_end_requests and make non-static 3823393ac9ce 92270d076115
6 fuse: make args->in_args[0] to be always the header e017bcfbeec0 7ccd86ba3a48
7 fuse: {io-uring} Handle SQEs - register commands 37b8900bd348 24fe962c86f5
8 fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static 3c3f28825c2c ba74ba571189
9 fuse: block request allocation until io-uring init is complete 36b951e6ea7b 3393ff964e0f
10 fuse: enable fuse-over-io-uring 515f478e318c 786412a73e7e
11 fuse: missing copy_finish in fuse-over-io-uring argument copies 1e3eaf7fa7d3 6e0d7f7f4a43
12 fuse-uring: fix race between registration and connection abortion 99ad50b188e3 952b5d36f6a2
13 fuse-uring: check connection abort during ring creation 8ea427b0aacf c146284c4355
14 fuse-uring: fix moving cancelled entry to ent_in_userspace list 8611e654b203 198f45eeb9f7
15 fuse-uring: end fuse_req on io-uring cancel task work 7d5195efa523 bea4fe98204b
16 fuse-uring: Avoid use-after-free in fuse_uring_async_stop_queues 0cc80a646a75 d351da750669
17 fuse-uring: Avoid queue->stopped races and set/read that value under lock 294cc69e1ec7 b70a3aca1693
18 fuse-uring: make a fuse_req on SQE commit only findable after memcpy 41d787dfd2fb 1efd3d474fc0
19 fuse: fix io-uring background queue dispatch on request completion 00a1633c1cac 31da059891bd
20 fuse: fix missing barrier when checking io-uring readiness a80765090a70 edb310bc27f0
21 fuse: publish io-uring queues with release semantics f60ff036adaa 42df916e5a5f
22 fuse: copy request headers via a stack buffer for io-uring 6e31d75e6af1 fd10f40af314
23 fuse: Fix the condition to enable over-io-uring 0df4c5fcc975 1f59015e9581
24 selftests: filesystems: Add functional test for the abort file in fusectl 44e5df5b06cc 1a7b13781b0d
25 selftests/fuse: add ACL_DONT_CACHE regression test ac3554af80f9 9acb102522b9
26 mpls: add seqcount to protect the platform_label{,s} pair 2879d7855eff 629ec78ef860

Warning

1 backport couldn't be compared. Details are in the workflow run log.

1. crypto: rng - Override drivers/char/random in FIPS mode

Backport: 08d92cacd39f · Upstream: 8b0beca705b3

Show error
Cannot find upstream commit 8b0beca705b3877e24cccdd672422c66bbd75635 in ctrliq/kernel-src-tree: gh failed (exit 1):
gh: No commit found for SHA: 8b0beca705b3877e24cccdd672422c66bbd75635 (HTTP 422)

33 additional commits have no upstream reference and were not compared.

Checked PR revision 87ec64262c19 against base 20b9c8ed908a.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

JIRA PR Check Results

1 commit(s) with issues found:

Commit 87ec64262c19

Summary: net: lock the socket in sock_gettstamp()

❌ Errors:

  • VULN-219558: LTS product 'lts-9.6' expects branch 'ciqlts9_6', but merge target is 'rlc-10/6.12.0-211.74.1.el10_2'

⚠️ Warnings:

  • VULN-219558: No time logged - please log time manually

Summary: Checked 91 commit(s) total.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ This PR contains VULN tickets that do not match the target LTS product. Please review the JIRA ticket assignments and ensure they match the merge target branch.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

❌ Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/42712030908

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.

8 participants