Compare commits

...

2 Commits

Author SHA1 Message Date
Pavel Valena 70938e174f dracut-057-53.git20240104 2024-01-05 01:34:21 +00:00
Pavel Valena d8a141f262 dracut-057-52.git20231207
Resolves: RHEL-17902
2023-12-07 18:09:42 +01:00
4 changed files with 136 additions and 1 deletions

1
.dracut.metadata Normal file
View File

@ -0,0 +1 @@
20a52ee200099c22550e344dc041590dd570c896 dracut-057.tar.xz

49
0051.patch Normal file
View File

@ -0,0 +1,49 @@
From 4a93a6e1dab779b05f3f68c6d803a6f24dc44a02 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 14 Aug 2023 12:28:11 +0200
Subject: [PATCH] fix(dracut.sh): remove microcode check based on
CONFIG_MICROCODE_[AMD|INTEL]
`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since
https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore
this check is wrong and early microcode is always disabled.
(Cherry-picked commit: 61b9cd16e049434597e398be61a47e0112382c5b)
Resolves: RHEL-17902
---
dracut.sh | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 0bac6a33..778eefd7 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1489,23 +1489,20 @@ fi
if [[ $early_microcode == yes ]]; then
if [[ $hostonly ]]; then
- if [[ $(get_cpu_vendor) == "AMD" ]]; then
- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
- elif [[ $(get_cpu_vendor) == "Intel" ]]; then
- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
+ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
+ check_kernel_config CONFIG_MICROCODE || unset early_microcode
else
unset early_microcode
fi
else
- ! check_kernel_config CONFIG_MICROCODE_AMD \
- && ! check_kernel_config CONFIG_MICROCODE_INTEL \
+ ! check_kernel_config CONFIG_MICROCODE \
&& unset early_microcode
fi
# Do not complain on non-x86 architectures as it makes no sense
case $(uname -m) in
x86_64 | i?86)
[[ $early_microcode != yes ]] \
- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"
;;
*) ;;
esac

77
0052.patch Normal file
View File

@ -0,0 +1,77 @@
From 4c46806a793d66a188c4e9b40e74f6c371ac5b8a Mon Sep 17 00:00:00 2001
From: runsisi <runsisi@hust.edu.cn>
Date: Sat, 6 Aug 2022 10:15:48 +0800
Subject: [PATCH] fix(dracut-install): use stripped kernel module path as hash
key
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting,
let's do the same for checking.
otherwise installing kernel module has circular dependency from a custom kernel
module directory will cause infinite recursion and segfault.
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep
kernel/drivers/char/ipmi/ipmi_msghandler.ko:
kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep
softdep ipmi_msghandler post: ipmi_devintf
$ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf
Segmentation fault (core dumped)
(gdb) b install_dependent_modules
Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513.
(gdb) bt
#0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513
#1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553
#2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548
#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554
#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548
#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554
#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548
#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554
#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548
#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554
#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548
#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554
#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548
#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554
#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548
#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554
#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548
#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554
#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548
#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554
#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548
#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554
#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548
#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554
#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548
#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554
#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617
#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952
#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090
Signed-off-by: runsisi <runsisi@hust.edu.cn>
(Cherry-picked commit: 7bb1f64b972586d86d82fcb23de4b979eab0ddfe)
Resolves: RHEL-15821
---
src/install/dracut-install.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
index 6025bd67..997d62d3 100644
--- a/src/install/dracut-install.c
+++ b/src/install/dracut-install.c
@@ -1522,7 +1522,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
if (check_hashmap(items_failed, path))
return -1;
- if (check_hashmap(items, path)) {
+ if (check_hashmap(items, &path[kerneldirlen])) {
continue;
}

View File

@ -5,7 +5,7 @@
# strip the automatically generated dep here and instead co-own the
# directory.
%global __requires_exclude pkg-config
%define dist_free_release 51.git20231115
%define dist_free_release 53.git20240104
Name: dracut
Version: 057
@ -79,6 +79,8 @@ Patch47: 0047.patch
Patch48: 0048.patch
Patch49: 0049.patch
Patch50: 0050.patch
Patch51: 0051.patch
Patch52: 0052.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -530,6 +532,12 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%changelog
* Thu Jan 04 2024 Pavel Valena <pvalena@redhat.com> - 057-53.git20240104
- fix(dracut-install): use stripped kernel module path as hash
* Thu Dec 07 2023 Pavel Valena <pvalena@redhat.com> - 057-52.git20231207
- fix(dracut.sh): remove microcode check based on
* Wed Nov 15 2023 Pavel Valena <pvalena@redhat.com> - 057-51.git20231115
- fix(nvmf): move /etc/nvme/host{nqn,id} requirement to