Re: [RFC][PATCH -mm 4/4] Hibernation: Pass CR3 value in hibernation header on x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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"? Or perphaps we want to just
store MAGIC there, w/o any obfuscation, since obfuscation does not
really buy us anything?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux