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]
Date:	Fri, 24 Jun 2011 14:47:37 -0700
From:	Tony Luck <tony.luck@...el.com>
To:	Samuel Gabrielsson <samuel.gabrielsson@...il.com>
Cc:	mchehab@...hat.com, linux-edac@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] i7core_edac: Add scrubbing support

On Wed, Mar 30, 2011 at 6:21 AM, Samuel Gabrielsson
<samuel.gabrielsson@...il.com> wrote:
> +       const u32 cache_line_size = 64;
> +       const u32 freq_dclk = 800*1000000;

Is dclk always 800 MHz?  If so, a #define might me nice - you use it again in
get_sdram_scrub_rate(). If not, then getting the actual frequency from some
place would be good.

> +               dw_scrub = 0x00ffffff & (cache_line_size * freq_dclk / new_bw);

Does this give the right answer? It looks like you overflow the "u32" size
of these calculations when you do 64*800000000 = 51200000000.

> +       return 0xffffffff & (cache_line_size * freq_dclk / (u64) scrubval);

Ditto on the overflow question here.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ