Unverified Commit b3ecc8a5 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents d11daa4c 47b6f8c5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -512,6 +512,8 @@ static int do_fp_load(struct instruction_op *op, unsigned long ea,
	} u;

	nb = GETSIZE(op->type);
	if (nb > sizeof(u))
		return -EINVAL;
	if (!address_ok(regs, ea, nb))
		return -EFAULT;
	rn = op->reg;
@@ -562,6 +564,8 @@ static int do_fp_store(struct instruction_op *op, unsigned long ea,
	} u;

	nb = GETSIZE(op->type);
	if (nb > sizeof(u))
		return -EINVAL;
	if (!address_ok(regs, ea, nb))
		return -EFAULT;
	rn = op->reg;
@@ -606,6 +610,9 @@ static nokprobe_inline int do_vec_load(int rn, unsigned long ea,
		u8 b[sizeof(__vector128)];
	} u = {};

	if (size > sizeof(u))
		return -EINVAL;

	if (!address_ok(regs, ea & ~0xfUL, 16))
		return -EFAULT;
	/* align to multiple of size */
@@ -633,6 +640,9 @@ static nokprobe_inline int do_vec_store(int rn, unsigned long ea,
		u8 b[sizeof(__vector128)];
	} u;

	if (size > sizeof(u))
		return -EINVAL;

	if (!address_ok(regs, ea & ~0xfUL, 16))
		return -EFAULT;
	/* align to multiple of size */