lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080327164114.6c9fc82c.vsu@altlinux.ru>
Date:	Thu, 27 Mar 2008 16:41:14 +0300
From:	Sergey Vlasov <vsu@...linux.ru>
To:	Bob Copeland <me@...copeland.com>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 6/7] omfs: add checksumming routines

On Wed, 26 Mar 2008 20:45:59 -0400 Bob Copeland wrote:

> OMFS checksums the metadata of all filesystem objects.  This change adds
> the necessary functions to do so.
>
> Signed-off-by: Bob Copeland <me@...copeland.com>
> ---
>  fs/omfs/checksum.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 48 insertions(+), 0 deletions(-)
>  create mode 100644 fs/omfs/checksum.c
>
> diff --git a/fs/omfs/checksum.c b/fs/omfs/checksum.c
> new file mode 100644
> index 0000000..d6f1023
> --- /dev/null
> +++ b/fs/omfs/checksum.c
> @@ -0,0 +1,48 @@
> +#include <linux/fs.h>
> +#include <linux/buffer_head.h>
> +#include "omfs.h"
> +
> +#define POLY 0x1021
> +
> +/*
> + * crc-ccitt with MSB first (i.e., backwards), so we can't use the
> + * kernel table as-is.
> + */
> +static u16 omfs_crc(u16 crc, unsigned char *buf, int count)
> +{
> +	int i, j;
> +	for (i = 0; i < count; i++) {
> +		crc ^= buf[i] << 8;
> +		for (j = 0; j < 8; j++)
> +			crc = (crc << 1) ^ ((crc & 0x8000) ? POLY : 0);
> +	}
> +	return crc;
> +}

Is this the same as crc_itu_t() from lib/crc-itu-t.c (also duplicated
in fs/udf/crc.c)?

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ