Skip to content

Commit dd34119

Browse files
eaibmzhcahca
authored andcommitted
s390/kexec: Make KEXEC_SIG available when CONFIG_MODULES=n
The commit c8424e7 ("MODSIGN: Export module signature definitions") replaced the dependency of KEXEC_SIG on SYSTEM_DATA_VERIFICATION with the dependency on MODULE_SIG_FORMAT. This change disables KEXEC_SIG in s390 kernels built with MODULES=n if nothing else selects MODULE_SIG_FORMAT. Furthermore, the signature verification in s390 kexec does not require MODULE_SIG_FORMAT because it requires only the struct module_signature and, therefore, does not depend on code in kernel/module_signature.c. But making ARCH_SUPPORTS_KEXEC_SIG depend on SYSTEM_DATA_VERIFICATION is also incorrect because it makes KEXEC_SIG available on s390 only if some other arbitrary option (for instance a file system or device driver) selects it directly or indirectly. To properly make KEXEC_SIG available for s390 kernels built with MODULES=y as well as MODULES=n _and_ also not depend on arbitrary options selecting SYSTEM_DATA_VERIFICATION, set ARCH_SUPPORTS_KEXEC_SIG=y for s390 and select SYSTEM_DATA_VERIFICATION when KEXEC_SIG=y. Fixes: c8424e7 ("MODSIGN: Export module signature definitions") Suggested-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent ff661ee commit dd34119

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/s390/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ config S390
282282
select SPARSE_IRQ
283283
select SWIOTLB
284284
select SYSCTL_EXCEPTION_TRACE
285+
select SYSTEM_DATA_VERIFICATION if KEXEC_SIG
285286
select THREAD_INFO_IN_TASK
286287
select TRACE_IRQFLAGS_SUPPORT
287288
select TTY
@@ -316,7 +317,7 @@ config ARCH_SUPPORTS_KEXEC_FILE
316317
def_bool y
317318

318319
config ARCH_SUPPORTS_KEXEC_SIG
319-
def_bool MODULE_SIG_FORMAT
320+
def_bool y
320321

321322
config ARCH_SUPPORTS_KEXEC_PURGATORY
322323
def_bool y

0 commit comments

Comments
 (0)