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] [day] [month] [year] [list]
Date:	Wed, 28 Oct 2009 10:10:47 -0700 (PDT)
From:	Doug Thompson <norsk5@...oo.com>
To:	dougthompson@...ssion.com, mchehab@...hat.com,
	linux-kernel@...r.kernel.org, Alan Cox <alan@...ux.intel.com>
Subject: Re: [PATCH] edac: i7core_edac produces undefined behaviour on 32bit



--- On Wed, 10/28/09, Alan Cox <alan@...ux.intel.com> wrote:

> From: Alan Cox <alan@...ux.intel.com>
> Subject: [PATCH] edac: i7core_edac produces undefined behaviour on 32bit
> To: dougthompson@...ssion.com, mchehab@...hat.com, linux-kernel@...r.kernel.org
> Date: Wednesday, October 28, 2009, 4:52 AM
> Fix the shifts up
> 
> Signed-off-by: Alan Cox <alan@...ux.intel.com>

Acked-by: Doug Thompson <dougthompson@...ssion.com>


> ---
> 
>  drivers/edac/i7core_edac.c |   24
> ++++++++++++------------
>  1 files changed, 12 insertions(+), 12 deletions(-)
> 
> 
> diff --git a/drivers/edac/i7core_edac.c
> b/drivers/edac/i7core_edac.c
> index b6fce2e..bd7c727 100644
> --- a/drivers/edac/i7core_edac.c
> +++ b/drivers/edac/i7core_edac.c
> @@ -916,41 +916,41 @@ static ssize_t
> i7core_inject_enable_store(struct mem_ctl_info *mci,
>  
>      /* Sets pvt->inject.dimm mask */
>      if (pvt->inject.dimm < 0)
> -        mask |= 1L <<
> 41;
> +        mask |= 1LL <<
> 41;
>      else {
>          if
> (pvt->channel[pvt->inject.channel].dimms > 2)
> -           
> mask |= (pvt->inject.dimm & 0x3L) << 35;
> +           
> mask |= (pvt->inject.dimm & 0x3LL) << 35;
>          else
> -           
> mask |= (pvt->inject.dimm & 0x1L) << 36;
> +           
> mask |= (pvt->inject.dimm & 0x1LL) << 36;
>      }
>  
>      /* Sets pvt->inject.rank mask */
>      if (pvt->inject.rank < 0)
> -        mask |= 1L <<
> 40;
> +        mask |= 1LL <<
> 40;
>      else {
>          if
> (pvt->channel[pvt->inject.channel].dimms > 2)
> -           
> mask |= (pvt->inject.rank & 0x1L) << 34;
> +           
> mask |= (pvt->inject.rank & 0x1LL) << 34;
>          else
> -           
> mask |= (pvt->inject.rank & 0x3L) << 34;
> +           
> mask |= (pvt->inject.rank & 0x3LL) << 34;
>      }
>  
>      /* Sets pvt->inject.bank mask */
>      if (pvt->inject.bank < 0)
> -        mask |= 1L <<
> 39;
> +        mask |= 1LL <<
> 39;
>      else
> -        mask |=
> (pvt->inject.bank & 0x15L) << 30;
> +        mask |=
> (pvt->inject.bank & 0x15LL) << 30;
>  
>      /* Sets pvt->inject.page mask */
>      if (pvt->inject.page < 0)
> -        mask |= 1L <<
> 38;
> +        mask |= 1LL <<
> 38;
>      else
> -        mask |=
> (pvt->inject.page & 0xffffL) << 14;
> +        mask |=
> (pvt->inject.page & 0xffff) << 14;
>  
>      /* Sets pvt->inject.column mask */
>      if (pvt->inject.col < 0)
> -        mask |= 1L <<
> 37;
> +        mask |= 1LL <<
> 37;
>      else
> -        mask |=
> (pvt->inject.col & 0x3fffL);
> +        mask |=
> (pvt->inject.col & 0x3fff);
>  
>      /*
>       * bit    0:
> REPEAT_EN
> 
> 
--
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