All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Chris von Recklinghausen <crecklin@redhat.com>
Cc: ardb@kernel.org, simo@redhat.com, rafael@kernel.org,
	decui@microsoft.com, linux-pm@vger.kernel.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/1] use crc32 instead of md5 for hibernation e820 integrity check
Date: Thu, 15 Apr 2021 13:09:23 -0700	[thread overview]
Message-ID: <YHidc5Xdjo5LK0D5@gmail.com> (raw)
In-Reply-To: <20210415194646.13387-1-crecklin@redhat.com>

On Thu, Apr 15, 2021 at 03:46:46PM -0400, Chris von Recklinghausen wrote:
> Hibernation 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.

The second paragraph is redundant with the first.

>  /**
> - * get_e820_md5 - calculate md5 according to given e820 table
> + * compute_e820_crc32 - calculate md5 according to given e820 table
>   *
>   * @table: the e820 table to be calculated
> - * @buf: the md5 result to be stored to
>   */

This comment still mentions MD5.

Also, this isn't a well-formed kerneldoc comment, since it doesn't document the
return value.

Also, this function is calculating the checksum *of* the table, not calculating
a checksum "according to" it (whatever that means).

Something like this would be good, I think:

/**
 * compute_e820_crc32 - compute the CRC-32 of the given e820 table
 *
 * @table: the e820 table to be checksummed
 *
 * Return: the resulting checksum
 */

Also, please try 'git grep -i md5 arch/x86/kernel/'.  There is still another
reference to MD5 that should be updated, in arch/x86/kernel/e820.c.

- Eric

      reply	other threads:[~2021-04-15 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 19:46 [PATCH v8 1/1] use crc32 instead of md5 for hibernation e820 integrity check Chris von Recklinghausen
2021-04-15 20:09 ` Eric Biggers [this message]

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=YHidc5Xdjo5LK0D5@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=crecklin@redhat.com \
    --cc=decui@microsoft.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.