Skip to content

Conversation

@PlaidCat
Copy link
Collaborator

@PlaidCat PlaidCat commented Nov 6, 2025

  • Download all unprocessed src.rpm
  • for each src,pm
    • Find all commits in changelog up to last known tag ... in this case 6.12.0-55
    • Re-play commits in reverse order (oldest in change log to newest) with git cherry-pick
    • After replay replace ENTIRE code in branch with rpmbuild -bp from corresponding src.rpm.
    • Tag Rebuild branch
  • Use New Local Build with prodman and test (note test results will be different than usual)

Checking Rebuild Commits for potentially missing commits:

kernel-6.12.0-55.42.1.el10_0

[jmaple@devbox kernel-src-tree]$ cat ciq/ciq_backports/kernel-6.12.0-55.42.1.el10_0/rebuild.details.txt
Rebuild_History BUILDABLE
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
Number of commits in upstream range v6.12~1..kernel-mainline: 66177
Number of commits in rpm: 10
Number of commits matched with upstream: 6 (60.00%)
Number of commits in upstream but not in rpm: 66171
Number of commits NOT found in upstream: 4 (40.00%)

Rebuilding Kernel on Branch rocky10_0_rebuild_kernel-6.12.0-55.42.1.el10_0 for kernel-6.12.0-55.42.1.el10_0
Clean Cherry Picks: 6 (100.00%)
Empty Cherry Picks: 0 (0.00%)
_______________________________

__EMPTY COMMITS__________________________

__CHANGES NOT IN UPSTREAM________________
Porting to Rocky Linux 10, debranding and Rocky Linux branding'
Add partial riscv64 support for build root'
Provide basic VisionFive 2 support'
redhat: rpminspect: update emptyrpm list for kernel variants

Automation Run

[SNIP]

# selftests: zram: zram.sh
# skip all tests: must be run as root
ok 1 selftests: zram: zram.sh # SKIP
make: Leaving directory '/mnt/code/kernel-src-tree-build/tools/testing/selftests'

real    24m47.601s
user    14m37.710s
sys     12m17.653s
Kselftests completed successfully in rocky10.
================================
SUCCESS: Rebuild and testing of rocky10 completed.
Total elapsed time: 01:06:03 (3963 seconds)
================================

Build

[jmaple@devbox code]$ 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}: 6s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-rocky10_0_rebuild-51495e441e52"
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
--
  BTF [M] net/hsr/hsr.ko
  LD [M]  net/qrtr/qrtr.ko
  BTF [M] net/qrtr/qrtr.ko
  LD [M]  net/qrtr/qrtr-mhi.ko
  BTF [M] net/qrtr/qrtr-mhi.ko
[TIMER]{BUILD}: 1894s
Making Modules
  SYMLINK /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/build
  INSTALL /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/modules.order
  INSTALL /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/modules.builtin
  INSTALL /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/modules.builtin.modinfo
--
  STRIP   /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/kernel/net/qrtr/qrtr.ko
  STRIP   /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/kernel/net/qrtr/qrtr-mhi.ko
  SIGN    /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/kernel/net/qrtr/qrtr-mhi.ko
  SIGN    /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+/kernel/net/qrtr/qrtr.ko
  DEPMOD  /lib/modules/6.12.0-rocky10_0_rebuild-51495e441e52+
[TIMER]{MODULES}: 12s
Making Install
  INSTALL /boot
[TIMER]{INSTALL}: 16s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-6.12.0-rocky10_0_rebuild-51495e441e52+ and Index to 0
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 6s
[TIMER]{BUILD}: 1894s
[TIMER]{MODULES}: 12s
[TIMER]{INSTALL}: 16s
[TIMER]{TOTAL} 1933s
Rebooting in 10 seconds

KselfTests

[jmaple@devbox code]$ ~/workspace/auto_kernel_history_rebuild/Rocky10/rocky10/code/get_kselftest_diff.sh
kselftest.6.12.0-jmaple_rlc-10_6.12.0-55.40.1.el10_0-4fbed18e3da1+.log
505
kselftest.6.12.0-rocky10_0_rebuild-331a7b22d702+.log
506
kselftest.6.12.0-jmaple_rlc-10_6.12.0-55.41.1.el10_0-4bca6d668638+.log
506
kselftest.6.12.0-rocky10_0_rebuild-51495e441e52+.log
507
Before: kselftest.6.12.0-jmaple_rlc-10_6.12.0-55.41.1.el10_0-4bca6d668638+.log
After: kselftest.6.12.0-rocky10_0_rebuild-51495e441e52+.log
Diff:
+ok 1 selftests: filesystems: devpts_pts # SKIP

jira LE-4659
cve CVE-2025-39702
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author Eric Biggers <[email protected]>
commit a458b29

To prevent timing attacks, MACs need to be compared in constant time.
Use the appropriate helper function for this.

Fixes: bf355b8 ("ipv6: sr: add core files for SR HMAC support")
	Cc: [email protected]
	Signed-off-by: Eric Biggers <[email protected]>
	Reviewed-by: Andrea Mayer <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit a458b29)
	Signed-off-by: Jonathan Maple <[email protected]>
jira LE-4659
cve CVE-2025-39881
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author Chen Ridong <[email protected]>
commit 3c9ba27

A use-after-free (UAF) vulnerability was identified in the PSI (Pressure
Stall Information) monitoring mechanism:

BUG: KASAN: slab-use-after-free in psi_trigger_poll+0x3c/0x140
Read of size 8 at addr ffff3de3d50bd308 by task systemd/1

psi_trigger_poll+0x3c/0x140
cgroup_pressure_poll+0x70/0xa0
cgroup_file_poll+0x8c/0x100
kernfs_fop_poll+0x11c/0x1c0
ep_item_poll.isra.0+0x188/0x2c0

Allocated by task 1:
cgroup_file_open+0x88/0x388
kernfs_fop_open+0x73c/0xaf0
do_dentry_open+0x5fc/0x1200
vfs_open+0xa0/0x3f0
do_open+0x7e8/0xd08
path_openat+0x2fc/0x6b0
do_filp_open+0x174/0x368

Freed by task 8462:
cgroup_file_release+0x130/0x1f8
kernfs_drain_open_files+0x17c/0x440
kernfs_drain+0x2dc/0x360
kernfs_show+0x1b8/0x288
cgroup_file_show+0x150/0x268
cgroup_pressure_write+0x1dc/0x340
cgroup_file_write+0x274/0x548

Reproduction Steps:
1. Open test/cpu.pressure and establish epoll monitoring
2. Disable monitoring: echo 0 > test/cgroup.pressure
3. Re-enable monitoring: echo 1 > test/cgroup.pressure

The race condition occurs because:
1. When cgroup.pressure is disabled (echo 0 > cgroup.pressure), it:
   - Releases PSI triggers via cgroup_file_release()
   - Frees of->priv through kernfs_drain_open_files()
2. While epoll still holds reference to the file and continues polling
3. Re-enabling (echo 1 > cgroup.pressure) accesses freed of->priv

epolling			disable/enable cgroup.pressure
fd=open(cpu.pressure)
while(1)
...
epoll_wait
kernfs_fop_poll
kernfs_get_active = true	echo 0 > cgroup.pressure
...				cgroup_file_show
				kernfs_show
				// inactive kn
				kernfs_drain_open_files
				cft->release(of);
				kfree(ctx);
				...
kernfs_get_active = false
				echo 1 > cgroup.pressure
				kernfs_show
				kernfs_activate_one(kn);
kernfs_fop_poll
kernfs_get_active = true
cgroup_file_poll
psi_trigger_poll
// UAF
...
end: close(fd)

To address this issue, introduce kernfs_get_active_of() for kernfs open
files to obtain active references. This function will fail if the open file
has been released. Replace kernfs_get_active() with kernfs_get_active_of()
to prevent further operations on released file descriptors.

Fixes: 34f26a1 ("sched/psi: Per-cgroup PSI accounting disable/re-enable interface")
	Cc: stable <[email protected]>
	Reported-by: Zhang Zhaotian <[email protected]>
	Signed-off-by: Chen Ridong <[email protected]>
	Acked-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit 3c9ba27)
	Signed-off-by: Jonathan Maple <[email protected]>
jira LE-4659
cve CVE-2025-39881
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author Chen Ridong <[email protected]>
commit 94a4acf

Setting of->priv to NULL when the file is released enables earlier bug
detection. This allows potential bugs to manifest as NULL pointer
dereferences rather than use-after-free errors[1], which are generally more
difficult to diagnose.

[1] https://lore.kernel.org/cgroups/[email protected]/T/#m8a3b3f88f0ff3da5925d342e90043394f8b2091b
	Signed-off-by: Chen Ridong <[email protected]>
	Signed-off-by: Tejun Heo <[email protected]>
(cherry picked from commit 94a4acf)
	Signed-off-by: Jonathan Maple <[email protected]>
jira LE-4659
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author James Morse <[email protected]>
commit 7da540e

The sys_reg_descs array holds function pointers and reset value for
managing the user-space and guest view of system registers. These
are mostly created by a set of macro's as only some combinations
of behaviour are needed.

If a register needs special treatment, its sys_reg_descs entry is
open-coded. This is true of some id registers where the value provided
by user-space is validated by some helpers.

Before adding another one of these, add a helper that covers the
existing special cases. 'ID_FILTERED' expects helpers to set the
user-space value, and retrieve the modified reset value.

Like ID_WRITABLE() this uses id_visibility(), which should have no
functional change for the registers converted to use ID_FILTERED().

read_sanitised_id_aa64dfr0_el1() and read_sanitised_id_aa64pfr0_el1()
have been refactored to be called from kvm_read_sanitised_id_reg(), to
try be consistent with ID_WRITABLE().

	Signed-off-by: James Morse <[email protected]>
	Signed-off-by: Joey Gouly <[email protected]>
	Reviewed-by: Gavin Shan <[email protected]>
	Tested-by: Shameer Kolothum <[email protected]>
	Reviewed-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Oliver Upton <[email protected]>
(cherry picked from commit 7da540e)
	Signed-off-by: Jonathan Maple <[email protected]>
jira LE-4659
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author James Morse <[email protected]>
commit 6685f5d

commit 011e5f5 ("arm64/cpufeature: Add remaining feature bits in
ID_AA64PFR0 register") exposed the MPAM field of AA64PFR0_EL1 to guests,
but didn't add trap handling. A previous patch supplied the missing trap
handling.

Existing VMs that have the MPAM field of ID_AA64PFR0_EL1 set need to
be migratable, but there is little point enabling the MPAM CPU
interface on new VMs until there is something a guest can do with it.

Clear the MPAM field from the guest's ID_AA64PFR0_EL1 and on hardware
that supports MPAM, politely ignore the VMMs attempts to set this bit.

Guests exposed to this bug have the sanitised value of the MPAM field,
so only the correct value needs to be ignored. This means the field
can continue to be used to block migration to incompatible hardware
(between MPAM=1 and MPAM=5), and the VMM can't rely on the field
being ignored.

	Signed-off-by: James Morse <[email protected]>
Co-developed-by: Joey Gouly <[email protected]>
	Signed-off-by: Joey Gouly <[email protected]>
	Reviewed-by: Gavin Shan <[email protected]>
	Tested-by: Shameer Kolothum <[email protected]>
	Reviewed-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Oliver Upton <[email protected]>
(cherry picked from commit 6685f5d)
	Signed-off-by: Jonathan Maple <[email protected]>
…for package ID

jira LE-4659
Rebuild_History Non-Buildable kernel-6.12.0-55.42.1.el10_0
commit-author David Arcari <[email protected]>
commit aa28991

Currently, tpmi_get_logical_id() calls topology_physical_package_id()
to set the pkg_id of the info structure. Since some VM hosts assign non
contiguous package IDs, topology_physical_package_id() can return a
larger value than topology_max_packages(). This will result in an
invalid reference into tpmi_power_domain_mask[] as that is allocatead
based on topology_max_packages() as the maximum package ID.

Fixes: 17ca278 ("platform/x86/intel: TPMI domain id and CPU mapping")
	Signed-off-by: David Arcari <[email protected]>
	Acked-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Reviewed-by: Ilpo Järvinen <[email protected]>
	Signed-off-by: Ilpo Järvinen <[email protected]>
(cherry picked from commit aa28991)
	Signed-off-by: Jonathan Maple <[email protected]>
Rebuild_History BUILDABLE
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
Number of commits in upstream range v6.12~1..kernel-mainline: 66177
Number of commits in rpm: 10
Number of commits matched with upstream: 6 (60.00%)
Number of commits in upstream but not in rpm: 66171
Number of commits NOT found in upstream: 4 (40.00%)

Rebuilding Kernel on Branch rocky10_0_rebuild_kernel-6.12.0-55.42.1.el10_0 for kernel-6.12.0-55.42.1.el10_0
Clean Cherry Picks: 6 (100.00%)
Empty Cherry Picks: 0 (0.00%)
_______________________________

Full Details Located here:
ciq/ciq_backports/kernel-6.12.0-55.42.1.el10_0/rebuild.details.txt

Includes:
* git commit header above
* Empty Commits with upstream SHA
* RPM ChangeLog Entries that could not be matched

Individual Empty Commit failures contained in the same containing directory.
The git message for empty commits will have the path for the failed commit.
File names are the first 8 characters of the upstream SHA
@PlaidCat PlaidCat requested a review from a team November 6, 2025 18:04
@PlaidCat PlaidCat self-assigned this Nov 6, 2025
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

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

🥌

@PlaidCat PlaidCat requested a review from a team November 6, 2025 23:03
Copy link

@thefossguy-ciq thefossguy-ciq left a comment

Choose a reason for hiding this comment

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

🚤

Copy link

@jdieter jdieter left a comment

Choose a reason for hiding this comment

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

🚢

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.

5 participants