Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c96f6512 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.9.20 into android-4.9



Changes in 4.9.20:
	xfrm: policy: init locks early
	xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window
	xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder
	KVM: x86: cleanup the page tracking SRCU instance
	virtio_balloon: init 1st buffer in stats vq
	pinctrl: qcom: Don't clear status bit on irq_unmask
	c6x/ptrace: Remove useless PTRACE_SETREGSET implementation
	h8300/ptrace: Fix incorrect register transfer count
	mips/ptrace: Preserve previous registers for short regset write
	sparc/ptrace: Preserve previous registers for short regset write
	metag/ptrace: Preserve previous registers for short regset write
	metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS
	metag/ptrace: Reject partial NT_METAG_RPIPE writes
	fscrypt: remove broken support for detecting keyring key revocation
	sched/rt: Add a missing rescheduling point
	usb: musb: fix possible spinlock deadlock
	Linux 4.9.20

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 4bdcc936 f6767727
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 19
SUBLEVEL = 20
EXTRAVERSION =
NAME = Roaring Lionus

+0 −41
Original line number Diff line number Diff line
@@ -69,46 +69,6 @@ static int gpr_get(struct task_struct *target,
				   0, sizeof(*regs));
}

static int gpr_set(struct task_struct *target,
		   const struct user_regset *regset,
		   unsigned int pos, unsigned int count,
		   const void *kbuf, const void __user *ubuf)
{
	int ret;
	struct pt_regs *regs = task_pt_regs(target);

	/* Don't copyin TSR or CSR */
	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
				 &regs,
				 0, PT_TSR * sizeof(long));
	if (ret)
		return ret;

	ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
					PT_TSR * sizeof(long),
					(PT_TSR + 1) * sizeof(long));
	if (ret)
		return ret;

	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
				 &regs,
				 (PT_TSR + 1) * sizeof(long),
				 PT_CSR * sizeof(long));
	if (ret)
		return ret;

	ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
					PT_CSR * sizeof(long),
					(PT_CSR + 1) * sizeof(long));
	if (ret)
		return ret;

	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
				 &regs,
				 (PT_CSR + 1) * sizeof(long), -1);
	return ret;
}

enum c6x_regset {
	REGSET_GPR,
};
@@ -120,7 +80,6 @@ static const struct user_regset c6x_regsets[] = {
		.size = sizeof(u32),
		.align = sizeof(u32),
		.get = gpr_get,
		.set = gpr_set
	},
};

+5 −3
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ static int regs_get(struct task_struct *target,
	long *reg = (long *)&regs;

	/* build user regs in buffer */
	for (r = 0; r < ARRAY_SIZE(register_offset); r++)
	BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0);
	for (r = 0; r < sizeof(regs) / sizeof(long); r++)
		*reg++ = h8300_get_reg(target, r);

	return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
@@ -113,7 +114,8 @@ static int regs_set(struct task_struct *target,
	long *reg;

	/* build user regs in buffer */
	for (reg = (long *)&regs, r = 0; r < ARRAY_SIZE(register_offset); r++)
	BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0);
	for (reg = (long *)&regs, r = 0; r < sizeof(regs) / sizeof(long); r++)
		*reg++ = h8300_get_reg(target, r);

	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
@@ -122,7 +124,7 @@ static int regs_set(struct task_struct *target,
		return ret;

	/* write back to pt_regs */
	for (reg = (long *)&regs, r = 0; r < ARRAY_SIZE(register_offset); r++)
	for (reg = (long *)&regs, r = 0; r < sizeof(regs) / sizeof(long); r++)
		h8300_put_reg(target, r, *reg++);
	return 0;
}
+15 −4
Original line number Diff line number Diff line
@@ -24,6 +24,16 @@
 * user_regset definitions.
 */

static unsigned long user_txstatus(const struct pt_regs *regs)
{
	unsigned long data = (unsigned long)regs->ctx.Flags;

	if (regs->ctx.SaveMask & TBICTX_CBUF_BIT)
		data |= USER_GP_REGS_STATUS_CATCH_BIT;

	return data;
}

int metag_gp_regs_copyout(const struct pt_regs *regs,
			  unsigned int pos, unsigned int count,
			  void *kbuf, void __user *ubuf)
@@ -62,9 +72,7 @@ int metag_gp_regs_copyout(const struct pt_regs *regs,
	if (ret)
		goto out;
	/* TXSTATUS */
	data = (unsigned long)regs->ctx.Flags;
	if (regs->ctx.SaveMask & TBICTX_CBUF_BIT)
		data |= USER_GP_REGS_STATUS_CATCH_BIT;
	data = user_txstatus(regs);
	ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
				  &data, 4*25, 4*26);
	if (ret)
@@ -119,6 +127,7 @@ int metag_gp_regs_copyin(struct pt_regs *regs,
	if (ret)
		goto out;
	/* TXSTATUS */
	data = user_txstatus(regs);
	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
				 &data, 4*25, 4*26);
	if (ret)
@@ -244,6 +253,8 @@ int metag_rp_state_copyin(struct pt_regs *regs,
	unsigned long long *ptr;
	int ret, i;

	if (count < 4*13)
		return -EINVAL;
	/* Read the entire pipeline before making any changes */
	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
				 &rp, 0, 4*13);
@@ -303,7 +314,7 @@ static int metag_tls_set(struct task_struct *target,
			const void *kbuf, const void __user *ubuf)
{
	int ret;
	void __user *tls;
	void __user *tls = target->thread.tls_ptr;

	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1);
	if (ret)
+2 −1
Original line number Diff line number Diff line
@@ -485,7 +485,8 @@ static int fpr_set(struct task_struct *target,
					  &target->thread.fpu,
					  0, sizeof(elf_fpregset_t));

	for (i = 0; i < NUM_FPU_REGS; i++) {
	BUILD_BUG_ON(sizeof(fpr_val) != sizeof(elf_fpreg_t));
	for (i = 0; i < NUM_FPU_REGS && count >= sizeof(elf_fpreg_t); i++) {
		err = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
					 &fpr_val, i * sizeof(elf_fpreg_t),
					 (i + 1) * sizeof(elf_fpreg_t));
Loading