s390/ipl: fix IPIB virtual vs physical address confusion
authorAlexander Gordeev <agordeev@linux.ibm.com>
Sun, 7 May 2023 16:09:02 +0000 (18:09 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 15 May 2023 12:20:14 +0000 (14:20 +0200)
The pointer to IPL Parameter Information Block is stored
in the absolute lowcore for later use by dump tools. That
pointer is a virtual address, though it should be physical
instead.

Note, this does not fix a real issue, since virtual and
physical addresses are currently the same.

Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/ipl.c

index 43de939..f44f70d 100644 (file)
@@ -1935,14 +1935,13 @@ static struct shutdown_action __refdata dump_action = {
 
 static void dump_reipl_run(struct shutdown_trigger *trigger)
 {
-       unsigned long ipib = (unsigned long) reipl_block_actual;
        struct lowcore *abs_lc;
        unsigned int csum;
 
        csum = (__force unsigned int)
               csum_partial(reipl_block_actual, reipl_block_actual->hdr.len, 0);
        abs_lc = get_abs_lowcore();
-       abs_lc->ipib = ipib;
+       abs_lc->ipib = __pa(reipl_block_actual);
        abs_lc->ipib_checksum = csum;
        put_abs_lowcore(abs_lc);
        dump_run(trigger);