From 3fa35cc84d5e822e4a34eb4360e6aaa7a92a48a7 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 2 Jul 2026 14:50:53 +0200 Subject: [PATCH] Additional patch for 9.9. Fix UEFI backward compatibility for IMSM RAID10. Resolves: RHEL-190768 --- ...-backward-compatibility-for-RAID10D4.patch | 55 +++++++++++++++++++ mdadm.spec | 6 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0075-imsm-Fix-UEFI-backward-compatibility-for-RAID10D4.patch diff --git a/0075-imsm-Fix-UEFI-backward-compatibility-for-RAID10D4.patch b/0075-imsm-Fix-UEFI-backward-compatibility-for-RAID10D4.patch new file mode 100644 index 0000000..b76eccb --- /dev/null +++ b/0075-imsm-Fix-UEFI-backward-compatibility-for-RAID10D4.patch @@ -0,0 +1,55 @@ +From 9dfff1196f5f38269143ecbd574fe13cabeeeaa7 Mon Sep 17 00:00:00 2001 +From: Blazej Kucman +Date: Wed, 28 Jan 2026 14:28:04 +0100 +Subject: [PATCH] imsm: Fix UEFI backward compatibility for RAID10D4 + +The referenced commit introduces an incorrect RAID level set for RAID10 with 4 drives, which must +remain backwards compatibility with UEFI VROC driver. For such RAID, VROC UEFI requires +the MPB_ATTRIB_RAID1 level attribute in metadata and RAID1 in map. However, mentioned change cause +writes RAID10 instead, which VROC UEFI cannot handle correctly. + +As a result, RAID10 4 disks is no longer recognized by VROC UEFI since version 9.3. On earlier +versions the incorrect metadata may even cause a platform hang during the UEFI boot phase. + +The update_imsm_raid_level() function handles both creation and migration flows. During RAID +creation, the function receives an initial map where the `level` variable is set to 0. This causes +the code path responsible for the R0 -> R10 migration to run. + +To prevent the above behavior, a new define IMSM_T_LEVEL_UNKNOWN is introduced and used to +initialize the `level` variable in map during volume creation, ensuring that the migration path +is not entered. + +Steps to reproduce: +mdadm -C /dev/md/imsm0 -e imsm -n 4 /dev/nvme[1,2,3,4]n1 -R +mdadm -C /dev/md/vol -l 10 4 /dev/nvme[1,2,3,4]n1 --assume-clean -R +reboot + +Fixes: 127e38b59cbd ("imsm: Fix RAID0 to RAID10 migration") +Signed-off-by: Blazej Kucman +--- + super-intel.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/super-intel.c b/super-intel.c +index 2ff9d486..7cae5cd3 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -181,6 +181,7 @@ struct imsm_map { + #define IMSM_T_RAID1 1 + #define IMSM_T_RAID5 5 + #define IMSM_T_RAID10 10 ++#define IMSM_T_LEVEL_UNKNOWN 255 + __u8 num_members; /* number of member disks */ + __u8 num_domains; /* number of parity domains */ + __u8 failed_disk_num; /* valid only when state is degraded */ +@@ -5792,6 +5793,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, + } + map->num_members = info->raid_disks; + ++ map->raid_level = IMSM_T_LEVEL_UNKNOWN; + update_imsm_raid_level(map, info->level); + set_num_domains(map); + +-- +2.54.0 + diff --git a/mdadm.spec b/mdadm.spec index 61fdcf3..0be9ee1 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Name: mdadm Version: 4.4 # extraversion is used to define rhel internal version -%define extraversion 3 +%define extraversion 4 Release: %{extraversion}%{?dist} Summary: The mdadm program controls Linux md devices (software RAID arrays) URL: https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git @@ -93,6 +93,7 @@ Patch070: 0071-mdadm-sysfs-close-fd-before-return.patch Patch071: 0072-Update-README.md.patch Patch072: 0073-mdadm-Create-array-with-sync-del-gendisk-mode.patch Patch073: 0074-mdadm-Assemble-alloc-superblock-in-Assemble.patch +Patch074: 0075-imsm-Fix-UEFI-backward-compatibility-for-RAID10D4.patch # Fedora customization patches Patch200: mdadm-udev.patch @@ -170,6 +171,9 @@ install -m644 %{SOURCE5} %{buildroot}/etc/libreport/events.d /usr/share/mdadm/mdcheck %changelog +* Thu Jul 02 2026 Peter Rajnoha - 4.4-4 +- Fix UEFI backward compatibility for IMSM RAID10. + * Tue Oct 28 2025 Xiao Ni 4.4-3 - Update to latest upstream - Resolves RHEL-100087, RHEL-107083