Commit 25f12ae4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

maccess: rename probe_kernel_address to get_kernel_nofault



Better describe what this helper does, and match the naming of
copy_from_kernel_nofault.

Also switch the argument order around, so that it acts and looks
like get_user().

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c0ee37e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ int is_valid_bugaddr(unsigned long pc)
	u32 insn = __opcode_to_mem_arm(BUG_INSTR_VALUE);
#endif

	if (probe_kernel_address((unsigned *)pc, bkpt))
	if (get_kernel_nofault(bkpt, (unsigned *)pc))
		return 0;

	return bkpt == insn;
+2 −2
Original line number Diff line number Diff line
@@ -774,7 +774,7 @@ static int alignment_get_arm(struct pt_regs *regs, u32 *ip, u32 *inst)
	if (user_mode(regs))
		fault = get_user(instr, ip);
	else
		fault = probe_kernel_address(ip, instr);
		fault = get_kernel_nofault(instr, ip);

	*inst = __mem_to_opcode_arm(instr);

@@ -789,7 +789,7 @@ static int alignment_get_thumb(struct pt_regs *regs, u16 *ip, u16 *inst)
	if (user_mode(regs))
		fault = get_user(instr, ip);
	else
		fault = probe_kernel_address(ip, instr);
		fault = get_kernel_nofault(instr, ip);

	*inst = __mem_to_opcode_thumb16(instr);

+1 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ static int call_undef_hook(struct pt_regs *regs)

	if (!user_mode(regs)) {
		__le32 instr_le;
		if (probe_kernel_address((__force __le32 *)pc, instr_le))
		if (get_kernel_nofault(instr_le, (__force __le32 *)pc))
			goto exit;
		instr = le32_to_cpu(instr_le);
	} else if (compat_thumb_mode(regs)) {
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static inline void *dereference_function_descriptor(void *ptr)
	struct fdesc *desc = ptr;
	void *p;

	if (!probe_kernel_address(&desc->ip, p))
	if (!get_kernel_nofault(p, &desc->ip))
		ptr = p;
	return ptr;
}
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ void *dereference_function_descriptor(void *ptr)
	Elf64_Fdesc *desc = ptr;
	void *p;

	if (!probe_kernel_address(&desc->addr, p))
	if (!get_kernel_nofault(p, &desc->addr))
		ptr = p;
	return ptr;
}
Loading