]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: factor insn read out of call_undef_hook()
authorMark Rutland <mark.rutland@arm.com>
Wed, 11 Oct 2023 10:06:49 +0000 (10:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2023 21:05:38 +0000 (23:05 +0200)
commit057f9123b1a855e07826358a1ea8096569e5773c
tree8bc9cf5c624b43a579716c54ee55e80a51947ef6
parent3f82927cabaf09c2677c535da7d0f84d1fa798a7
arm64: factor insn read out of call_undef_hook()

commit dbfbd87efa79575491af0ba1a87bf567eaea6cae upstream.

Subsequent patches will rework EL0 UNDEF handling, removing the need for
struct undef_hook and call_undef_hook. In preparation for those changes,
this patch factors the logic for reading user instructions out of
call_undef_hook() and into a new user_insn_read() helper, matching the
style of the existing aarch64_insn_read() helper used for reading kernel
instructions.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20221019144123.612388-5-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/traps.c