On Tuesday, 21 August 2007 10:01, Pavel Machek wrote: > Hi! > > > From: Rafael J. Wysocki <rjw@xxxxxxx> > > > > Since we already pass the address of restore_registers() in the image header, > > we can also pass the value of the CR3 register from before the hibernation in > > the same way. This will allow us to avoid using init_level4_pgt page tables > > during the restore. > > > > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> > > > @@ -283,7 +290,8 @@ int arch_hibernation_header_save(void *a > > if (max_size < sizeof(struct restore_data_record)) > > return -EOVERFLOW; > > rdr->jump_address = restore_jump_address; > > - rdr->control = (restore_jump_address ^ RESTORE_MAGIC); > > + rdr->cr3 = restore_cr3; > > + rdr->control = (restore_jump_address ^ (restore_cr3 ^ RESTORE_MAGIC)); > > return 0; > > Does control want to be renamed as "crc"? I think we should use CRC here, but I need to figure out how to get the dependencies right. > Or perphaps we want to just store MAGIC there, w/o any obfuscation, since > obfuscation does not really buy us anything? Well, the idea is to avoid using corrupted cr3 value or the jump address ... Greetings, Rafael _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm