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]
Message-ID: <swf7hu7i1tc.wl%takata@linux-m32r.org>
Date:	Wed, 04 Nov 2009 09:14:07 +0900
From:	Hirokazu Takata <takata@...ux-m32r.org>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	Hirokazu Takata <takata@...ux-m32r.org>,
	linux-m32r@...linux-m32r.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] m32r: Should index be positive?

At Sun, 01 Nov 2009 15:33:06 +0100,
Roel Kluin wrote:
> 
> Index `ipi_num' is signed, test whether it is negative to
> make sure we don't get a negative array element.
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
>  arch/m32r/kernel/smp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Found by code analysis, is it required?
> 
> diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
> index 8a88f1f..31cef20 100644
> --- a/arch/m32r/kernel/smp.c
> +++ b/arch/m32r/kernel/smp.c
> @@ -806,7 +806,7 @@ unsigned long send_IPI_mask_phys(cpumask_t physid_mask, int ipi_num,
>  
>  	if (mask & ~physids_coerce(phys_cpu_present_map))
>  		BUG();
> -	if (ipi_num >= NR_IPIS)
> +	if (ipi_num >= NR_IPIS || ipi_num < 0)
>  		BUG();
>  
>  	mask <<= IPI_SHIFT;
> 

Acked-by: Hirokazu Takata <takata@...ux-m32r.org>

It looks OK for me.
I've merged this patch into my tree.

Thank you.

-- Takata
--
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