Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1471387 > unrolled thread
| Started by | Chen Yu <yu.c.chen@intel.com> |
|---|---|
| First post | 2016-08-28 18:30 +0200 |
| Last post | 2016-08-31 14:00 +0200 |
| Articles | 1 on this page of 21 — 6 participants |
Back to article view | Back to linux.kernel
[PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Chen Yu <yu.c.chen@intel.com> - 2016-08-28 18:30 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-28 18:40 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Borislav Petkov <bp@alien8.de> - 2016-08-29 07:10 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-29 09:20 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Borislav Petkov <bp@alien8.de> - 2016-08-29 16:50 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value joeyli <jlee@suse.com> - 2016-08-30 10:40 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-30 13:50 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-09-08 23:20 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Chen Yu <yu.c.chen@intel.com> - 2016-09-09 09:30 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-09-09 09:40 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-30 13:50 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-29 15:50 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-29 17:20 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-30 14:00 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-30 22:00 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-31 00:00 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-31 13:10 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-31 02:30 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-31 13:10 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value Pavel Machek <pavel@ucw.cz> - 2016-08-31 13:50 +0200
Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-31 14:00 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-08-31 14:00 +0200 |
| Subject | Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value |
| Message-ID | <scclr-1X7-9@gated-at.bofh.it> |
| In reply to | #1473366 |
On Wed, Aug 31, 2016 at 1:43 PM, Pavel Machek <pavel@ucw.cz> wrote:
> On Wed 2016-08-31 13:07:31, Pavel Machek wrote:
>> On Wed 2016-08-31 02:27:53, Rafael J. Wysocki wrote:
>> > On Monday, August 29, 2016 12:35:40 AM Chen Yu wrote:
[cut]
>> > >
>> > > +#define MD5_DIGEST_SIZE 16
>> > > +
>> > > struct restore_data_record {
>> > > unsigned long jump_address;
>> > > unsigned long jump_address_phys;
>> > > unsigned long cr3;
>> > > unsigned long magic;
>> > > + u8 e820_digest[MD5_DIGEST_SIZE];
>> > > };
>> > >
>> > > #define RESTORE_MAGIC 0x123456789ABCDEF0UL
>> >
>> > You're changing the image header format, so RESTORE_MAGIC needs to be updated
>> > too.
>>
>> With !CONFIG_HIBERNATION_CHECK_E820, magic nothing changes in on-disk
>> format. (Unused space is now used).
>>
>> If there's hibernation kernel is CONFIG_HIBERNATION_CHECK_E820, and
>> restore kernel is !CONFIG_HIBERNATION_CHECK_E820, we won't check the
>> E820, and that should be acceptable.
>>
>> If there's hibernation kernel is !CONFIG_HIBERNATION_CHECK_E820, and
>> restore kernel is CONFIG_HIBERNATION_CHECK_E820, we'll fail the E820
>> check, and refuse to resume. That is also acceptable (and similar
>> result we'd get with RESTORE_MAGIC).. but the message will be
>> confusing.
>>
>> Ok, so I guess we should change the magic.
>
> Actually, no, simply changing the magic is not enough. I guess we
> should change the magic, and either add "e820_digest_available" field,
> or specify that e820_digest == {0,} means that no digest is
> available. We should either ignore the digest in
> CONFIG_HIBERNATION_CHECK_E820 case if it is not available, or fail
> with different message.
Something like that.
Kernels with the same RESTORE_MAGIC have to use the same header format
and interpret all of the fields in it in the same way.
Thanks,
Rafael
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web