[Cbe-oss-dev] [PATCH] spufs: fix to reject an access when SPE touched unused stack

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Feb 20 15:30:17 EST 2007


On Tue, 2007-02-20 at 11:40 +0900, Masato Noguchi wrote:
> This patch fix to reject demand of spe to dma form/to unused stack
> region.  Currently, if spe accessed to unused stack (or any addresses
> beyond the highest mmaped region) by mistake, the process will meet
> BUG_ON() in exit_mmap().
> 
> Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
> ---
> diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
> index 7f35eab..9dcc1da 100644
> --- a/arch/powerpc/platforms/cell/spu_base.c
> +++ b/arch/powerpc/platforms/cell/spu_base.c
> @@ -448,6 +448,8 @@ static int spu_handle_mm_fault(struct spu *spu)
>  #if 0
>  	if (expand_stack(vma, ea))
>  		goto bad_area;
> +#else
> +	goto bad_area;
>  #endif /* XXX */
>  good_area:
>  	is_write = dsisr & MFC_DSISR_ACCESS_PUT;

Arnd, any reason why we don't expand_stack ?

Cheers,
Ben.





More information about the cbe-oss-dev mailing list