From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:41020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752078AbeENWhU (ORCPT ); Mon, 14 May 2018 18:37:20 -0400 Date: Mon, 14 May 2018 23:37:16 +0100 From: James Hogan To: "Maciej W. Rozycki" Cc: Ralf Baechle , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs Message-ID: <20180514223715.GE29541@jamesdev> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BQPnanjtCNWHyqYD" Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: --BQPnanjtCNWHyqYD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 14, 2018 at 04:49:43PM +0100, Maciej W. Rozycki wrote: > Check the TIF_32BIT_FPREGS task setting of the tracee rather than the=20 > tracer in determining the layout of floating-point general registers in= =20 > the floating-point context, correcting access to odd-numbered registers= =20 > for o32 tracees where the setting disagrees between the two processes. >=20 > Cc: stable@vger.kernel.org # 3.14+ > Fixes: 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries") > Signed-off-by: Maciej W. Rozycki > --- > Hi, >=20 > These are not the usual requests used by GDB to access the floating-poin= t=20 > context, which is likely why it went unnoticed so long. They are only=20 > used as a fallback in the case where PTRACE_GETFPREGS and PTRACE_SETFPREG= S=20 > requests are not supported, i.e. with ancient kernels. >=20 > However to verify an unrelated GDB bug fix I have tweaked GDB to always= =20 > use PTRACE_PEEKUSR and PTRACE_POKEUSR, and then discovered this issue in= =20 > native GDB regression testing, as it showed regressions from corrupt FGR= =20 > contents across numerous tests compared to the usual results. This fix= =20 > removed those regressions then. >=20 > Not being typically used does not mean we ought to keep the interface=20 > broken. Therefore please apply. Looks good. Applied to fixes branch for 4.17. Thanks James --BQPnanjtCNWHyqYD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQS7lRNBWUYtqfDOVL41zuSGKxAj8gUCWvoPmgAKCRA1zuSGKxAj 8vHgAQCWxOnS4xlCHH+ctDoJS88qeXWE6ojQ4iM0LlzCyfNKrAEAo6VvdB1DEWg1 tBq1rCXSUbUnkg+qpV7h9T1CG5N1Cgc= =df5g -----END PGP SIGNATURE----- --BQPnanjtCNWHyqYD--