zipl/boot: fix potential heap overflow in stage2
zipl/boot: fix potential heap overflow in stage2

Current heap size in stage2 is three pages long [0x6000-0x9000] but
get_zeroed_page() assumes it is one page more which might lead to
a heap overflow which will corrupt data located at 0x9000 (stage3
parameters). Calculate the heap size of a stage at run-time
by using the symbols provided by linker.

Furthermore, validate the given address in free_page() to stop illegal
memory accesses.

Signed-off-by: Alexander Egorenkov <070ce257c3a2cbcf81c5622c51f60f2b88d8dc2e@linux.ibm.com>
Reviewed-by: Philipp Rudo <ebc9ed60c9e1dc6a17c00cf7f6009c740d3c3928@linux.ibm.com>
Signed-off-by: Jan Höppner <96138615ab4af0813785fa10d283f3d37eca3b78@linux.ibm.com>

ibm-s390-tools/s390-tools,ibm-s390-tools/s390-tools,ibm-s390-tools/s390-tools,ibm-s390-tools/s390-tools