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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 May 2016 16:53:29 -0400
From:	"Lennart Sorensen" <lsorense@...lub.uwaterloo.ca>
To:	linux-kernel@...r.kernel.org
Cc:	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc: Fix sstep compile on powerpcspe

On Thu, May 05, 2016 at 04:44:44PM -0400, Lennart Sorensen wrote:
> powerpc: Fix sstep compile on powerpcspe
> 
> Commit be96f63375a14ee8e690856ac77e579c75bd0bae introduced ldarx and stdcx
> into the instructions in sstep.c, which are not accepted by the assembler
> on powerpcspe, but does seem to be accepted by the normal powerpc assembler
> even in 32 bit mode.
> 
> Wrap these two instructions in a __powerpc64__ check like it is everywhere
> else in the file.
> 
> Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()")
> Signed-off-by: Len Sorensen <lsorense@...lub.uwaterloo.ca>
> ---
>  arch/powerpc/lib/sstep.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index dc885b3..6d34310 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -1818,9 +1818,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
>  		case 4:
>  			__get_user_asmx(val, op.ea, err, "lwarx");
>  			break;
> +#ifdef __powerpc64__
>  		case 8:
>  			__get_user_asmx(val, op.ea, err, "ldarx");
>  			break;
> +#endif
>  		default:
>  			return 0;
>  		}
> @@ -1841,9 +1843,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
>  		case 4:
>  			__put_user_asmx(op.val, op.ea, err, "stwcx.", cr);
>  			break;
> +#ifdef __powerpc64__
>  		case 8:
>  			__put_user_asmx(op.val, op.ea, err, "stdcx.", cr);
>  			break;
> +#endif
>  		default:
>  			return 0;
>  		}
> -- 
> 1.7.10.4

Perhaps this should be considered for -stable as well since it is fixing
a regression for powerpcspe.

-- 
Len Sorensen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ