lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 1/1] use crc32 instead of md5 for hibernation e820 integrity check
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

\
 
 \ /
  Last update: 2021-04-15 22:10    [W:0.040 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site