s390/zcore: conditionally clear memory on reipl
authorMikhail Zaslonko <zaslonko@linux.ibm.com>
Tue, 9 May 2023 15:38:15 +0000 (17:38 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Thu, 1 Jun 2023 15:07:56 +0000 (17:07 +0200)
commit9f70bc890ae299a6fdf83bfc99832509fd2f7494
tree1442c4e540933d2bf2a64aade4725578980142f5
parent31e9ccc67ce24f82120e41fcafd841f98838ff5c
s390/zcore: conditionally clear memory on reipl

Currently zcore_reipl_write() always use DIAG308_LOAD_CLEAR to ipl the
system (used by ngdump and zfcpdump to ipl the original kernel after
dumping).
Instead of 'always clear' check OS_INFO_FLAG_REIPL_CLEAR flag and use
either LOAD_CLEAR or LOAD_NORMAL diag308 subcode accordingly.
For that read os_info and check for the valid os_info flags entry
in zcore_reipl_init(). Do not return error on failure (e.g. os_info
checksum error) in order to continue dump processing, considering
that os_info could be corrupted on the panicked system.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/char/zcore.c