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  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:	Mon, 05 Nov 2007 16:35:57 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, linuxppc-dev@...abs.org,
	paulus@...ba.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/6]] POWERPC: fix memset size error


On Mon, 2007-11-05 at 10:21 +0800, Li Zefan wrote:
> The size passing to memset is wrong.
> 
> Signed-off-by Li Zefan <lizf@...fujitsu.com>

Good catch, looks like a remain of when path was an array on the stack.

Thanks !

Acked-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>

> 
> ---
>  arch/powerpc/kernel/prom_init.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index 1db10f7..1add6ef 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -1244,7 +1244,7 @@ static void __init prom_initialize_tce_table(void)
>  			local_alloc_bottom = base;
>  
>  		/* It seems OF doesn't null-terminate the path :-( */
> -		memset(path, 0, sizeof(path));
> +		memset(path, 0, PROM_SCRATCH_SIZE);
>  		/* Call OF to setup the TCE hardware */
>  		if (call_prom("package-to-path", 3, 1, node,
>  			      path, PROM_SCRATCH_SIZE-1) == PROM_ERROR) {

-
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