Re: [RFC 2/6] objtool: arm64: Add required implementation for supporting the aarch64 architecture in objtool.

Peter Zijlstra
2019-04-09T16:20:38Z

On Tue, Apr 09, 2019 at 02:52:39PM +0100, Raphael Gault wrote:

> The decoding of the instruction is split into classes and subclasses as described into
> the Instruction Encoding in the ArmV8.5 Architecture Reference Manual.

> tools/objtool/arch/arm64/decode.c | 2843 +++++++++++++++++

Oh man, I hope you generated much of that from the ARM64 Instruction Set
Architecture XML files [*]. Otherwise that's been a lot of typing.

Anyway, since you now have that, would it make sense to use this same
decoder in your kernel tree? I found at least one partial decoder in
arch/arm64/kernel/probes/decode-insn.c, but I suspect you have more.

(Note kprobes is how x86 initially grew its instruction decoder IIRC)

* https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools