linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Chris von Recklinghausen <crecklin@redhat.com>,
	Ard Biesheuvel <ardb@kernel.org>, Simo Sorce <simo@redhat.com>,
	Dexuan Cui <decui@microsoft.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 1/1] use crc32 instead of md5 for hibernation e820 integrity check
Date: Thu, 8 Apr 2021 18:05:33 +0200	[thread overview]
Message-ID: <CAJZ5v0g65irXKmy7pdgD8-5KWrxdtwiWbJsBD2A=PKf1D3RVZg@mail.gmail.com> (raw)
In-Reply-To: <YG8gqZoZGutPmROz@sol.localdomain>

On Thu, Apr 8, 2021 at 5:26 PM Eric Biggers <ebiggers@kernel.org> wrote:
>
> On Thu, Apr 08, 2021 at 03:32:38PM +0200, Rafael J. Wysocki wrote:
> > On Thu, Apr 8, 2021 at 3:15 PM Chris von Recklinghausen
> > <crecklin@redhat.com> wrote:
> > >
> > > Suspend fails on a system in fips mode because md5 is used for the e820
> > > integrity check and is not available. Use crc32 instead.
> > >
> > > This patch changes the integrity check algorithm from md5 to
> > > crc32. This integrity check is used only to verify accidental
> > > corruption of the hybernation data
> >
> > It isn't used for that.
> >
> > In fact, it is used to detect differences between the memory map used
> > before hibernation and the one made available by the BIOS during the
> > subsequent resume.  And the check is there, because it is generally
> > unsafe to load the hibernation image into memory if the current memory
> > map doesn't match the one used when the image was created.
>
> So what types of "differences" are you trying to detect?  If you need to detect
> differences caused by someone who maliciously made changes ("malicious" implies
> they may try to avoid detection), then you need to use a cryptographic hash
> function (or a cryptographic MAC if the hash value isn't stored separately).  If
> you only need to detect non-malicious changes (normally these would be called
> "accidental" changes, but sure, it could be changes that are "intentionally"
> made provided that the other side can be trusted to not try to avoid
> detection...)

That's the case here.

> then a non-cryptographic checksum would be sufficient.

  parent reply	other threads:[~2021-04-08 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 13:15 [PATCH v5 1/1] use crc32 instead of md5 for hibernation e820 integrity check Chris von Recklinghausen
2021-04-08 13:32 ` Rafael J. Wysocki
2021-04-08 13:42   ` Simo Sorce
2021-04-08 15:26   ` Eric Biggers
2021-04-08 15:52     ` Simo Sorce
2021-04-08 16:05     ` Rafael J. Wysocki [this message]
2021-04-29 19:59       ` Pavel Machek
2021-05-05  3:45         ` Eric Biggers
2021-04-08 15:30 ` Eric Biggers
2021-04-08 15:53   ` Chris von Recklinghausen
2021-04-08 23:55     ` Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJZ5v0g65irXKmy7pdgD8-5KWrxdtwiWbJsBD2A=PKf1D3RVZg@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=ardb@kernel.org \
    --cc=crecklin@redhat.com \
    --cc=decui@microsoft.com \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=simo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).