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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEccXectdrZY5NpAObF=9kyZsARd9wR3s3n7c1iw0p-cLUpZjw@mail.gmail.com>
Date:	Sun, 18 Oct 2015 14:30:07 +0100
From:	Martyn Welch <martyn@...chs.me.uk>
To:	Dmitry Kalinkin <dmitry.kalinkin@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Manohar Vanga <manohar.vanga@...il.com>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vme: 8-bit status/id takes 256 values, not 255

On 10 October 2015 at 23:00, Dmitry Kalinkin <dmitry.kalinkin@...il.com> wrote:
> Fixes an off by one array size.
>

The Status/ID is an 8-bit value (OK, the standard states it can be a
8, 16 or 32-bit value, however both of the chipsets we support at this
point in time support an 8-bit value), why do we need a 256th entry in
the array?

Martyn

> Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@...il.com>
> ---
>  drivers/vme/vme_bridge.h | 4 +++-
>  include/linux/vme.h      | 3 +++
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vme/vme_bridge.h b/drivers/vme/vme_bridge.h
> index 397578a..b59cbee 100644
> --- a/drivers/vme/vme_bridge.h
> +++ b/drivers/vme/vme_bridge.h
> @@ -1,6 +1,8 @@
>  #ifndef _VME_BRIDGE_H_
>  #define _VME_BRIDGE_H_
>
> +#include <linux/vme.h>
> +
>  #define VME_CRCSR_BUF_SIZE (508*1024)
>  /*
>   * Resource structures
> @@ -91,7 +93,7 @@ struct vme_callback {
>
>  struct vme_irq {
>         int count;
> -       struct vme_callback callback[255];
> +       struct vme_callback callback[VME_NUM_STATUSID];
>  };
>
>  /* Allow 16 characters for name (including null character) */
> diff --git a/include/linux/vme.h b/include/linux/vme.h
> index c013135..71e4a6d 100644
> --- a/include/linux/vme.h
> +++ b/include/linux/vme.h
> @@ -81,6 +81,9 @@ struct vme_resource {
>
>  extern struct bus_type vme_bus_type;
>
> +/* Number of VME interrupt vectors */
> +#define VME_NUM_STATUSID       256
> +
>  /* VME_MAX_BRIDGES comes from the type of vme_bus_numbers */
>  #define VME_MAX_BRIDGES                (sizeof(unsigned int)*8)
>  #define VME_MAX_SLOTS          32
> --
> 1.8.3.1
>
--
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