Em Thu, Jan 26, 2017 at 04:52:12PM +0000, Will Deacon escreveu:
On Thu, Jan 26, 2017 at 10:49:16AM +0900, Masami Hiramatsu wrote:So, He, can you do that? How do we proceed?
On Wed, 25 Jan 2017 13:32:01 +0000Ok, then do it as two patches then, rather than introduce functionality
Will Deacon <will.deacon@xxxxxxx> wrote:
On Wed, Jan 25, 2017 at 07:23:11AM +0000, He Kuang wrote:No, since the offset is not same as dwarfnum.
Since HAVE_KPROBES can be enabled in arm64, this patch introducesWouldn't it be an awful lot simpler just to leave the code as-is, and
regs_query_register_offset() to convert register name to offset for
arm64, so the BPF prologue feature is ready to use.
This patch also changes the 'dwarfnum' to 'offset' in register table,
so the related functions are consistent with x86.
implement regs_query_register_offset in the same way that we implement
get_arch_regstr but return the dwarfnum?
With this style, the index of array becomes the dwarfnum (the index of
each register defined by DWARF) and the "offset" member means the
byte-offset of the register in (user_)pt_regs. Those should be different.
along with the renaming.
Right, apart from the two howling bugs in the version that was nearly mergedI don't really see the point of all the refactoring.Also, from the maintenance point of view, this rewrite work makes
the code simply similar to x86 implementation, that will be easier to
maintain :)
initially :p. I tend to err on the "if it ain't broke, don't fix it" side
of the argument but if you really want the refactoring lets keep it as a
separate change.
- Arnaldo