prepare process: add magic header in program_load_desc
Check we mapped the correct region with a magic header in the struct Original commit: d246b93a3bced92d0ac2a4a337118091b010658a Fujitsu: POSTK_DEBUG_TEMP_FIX_76 Change-Id: If848be64af5d76844ba65b48493021637c8114f4
This commit is contained in:
@@ -441,6 +441,13 @@ static int process_msg_prepare_process(unsigned long rphys)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (p->magic != PLD_MAGIC) {
|
||||
kprintf("%s: broken mcexec program_load_desc\n", __func__);
|
||||
ihk_mc_unmap_virtual(p, npages);
|
||||
ihk_mc_unmap_memory(NULL, phys, sz);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
n = p->num_sections;
|
||||
if (n > 16 || 0 >= n) {
|
||||
kprintf("%s: ERROR: ELF sections other than 1 to 16 ??\n",
|
||||
|
||||
Reference in New Issue
Block a user