linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Dave Martin <Dave.Martin@arm.com>,
	Chris Metcalf <cmetcalf@mellanox.com>
Subject: [PATCH 4.4 02/23] tile/ptrace: Preserve previous registers for short regset write
Date: Tue, 31 Jan 2017 06:37:04 +0100	[thread overview]
Message-ID: <20170131053625.039238119@linuxfoundation.org> (raw)
In-Reply-To: <20170131053624.926643555@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dave Martin <Dave.Martin@arm.com>

commit fd7c99142d77dc4a851879a66715abf12a3193fb upstream.

Ensure that if userspace supplies insufficient data to
PTRACE_SETREGSET to fill all the registers, the thread's old
registers are preserved.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/tile/kernel/ptrace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/tile/kernel/ptrace.c
+++ b/arch/tile/kernel/ptrace.c
@@ -111,7 +111,7 @@ static int tile_gpr_set(struct task_stru
 			  const void *kbuf, const void __user *ubuf)
 {
 	int ret;
-	struct pt_regs regs;
+	struct pt_regs regs = *task_pt_regs(target);
 
 	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0,
 				 sizeof(regs));

  parent reply	other threads:[~2017-01-31  5:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31  5:37 [PATCH 4.4 00/23] 4.4.46-stable review Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 01/23] fbdev: color map copying bounds checking Greg Kroah-Hartman
2017-01-31  5:37 ` Greg Kroah-Hartman [this message]
2017-01-31  5:37 ` [PATCH 4.4 04/23] mm/mempolicy.c: do not put mempolicy before using its nodemask Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 05/23] sysctl: fix proc_doulongvec_ms_jiffies_minmax() Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 06/23] ISDN: eicon: silence misleading array-bounds warning Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 07/23] RDMA/cma: Fix unknown symbol when CONFIG_IPV6 is not enabled Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 08/23] s390/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 10/23] can: ti_hecc: add missing prepare and unprepare of the clock Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 11/23] ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 12/23] ARC: [arcompact] handle unaligned access delay slot corner case Greg Kroah-Hartman
2017-02-10 12:51   ` Ben Hutchings
2017-02-10 13:19     ` Greg Kroah-Hartman
2017-02-10 13:26       ` Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 13/23] parisc: Dont use BITS_PER_LONG in userspace-exported swab.h header Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 14/23] nfs: Dont increment lock sequence ID after NFS4ERR_MOVED Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 15/23] NFSv4.0: always send mode in SETATTR after EXCLUSIVE4 Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 16/23] SUNRPC: cleanup ida information when removing sunrpc module Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 18/23] IB/ipoib: move back IB LL address into the hard header Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 19/23] IB/umem: Release pid in error and ODP flow Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 20/23] [media] s5k4ecgx: select CRC32 helper Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 21/23] pinctrl: broxton: Use correct PADCFGLOCK offset Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 22/23] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 23/23] mm, memcg: do not retry precharge charges Greg Kroah-Hartman
2017-01-31 17:23 ` [PATCH 4.4 00/23] 4.4.46-stable review Guenter Roeck
2017-01-31 22:06 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131053625.039238119@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=Dave.Martin@arm.com \
    --cc=cmetcalf@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).