Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARCv3 (32/64): failed to build with CONFIG_KPROBES option #124

Open
pavelvkozlov opened this issue May 4, 2023 · 1 comment
Open

ARCv3 (32/64): failed to build with CONFIG_KPROBES option #124

pavelvkozlov opened this issue May 4, 2023 · 1 comment

Comments

@pavelvkozlov
Copy link

An attempt to build kernel with enabled CONFIG_KPROBES or CONFIG_KGDB options ends with error:

/tmp/linux/arch/arc/kernel/disasm.c: In function 'get_reg':
/tmp/linux/arch/arc/kernel/disasm.c:443:29: error: 'struct callee_regs' has no member named 'r13'; did you mean 'r14'?
  443 |                 p = &cregs->r13;
      |                             ^~~
      |                             r14
/tmp/linux/arch/arc/kernel/disasm.c: In function 'set_reg':
/tpm/linux/arch/arc/kernel/disasm.c:471:37: error: 'struct callee_regs' has no member named 'r13'; did you mean 'r14'?
  471 |                         p = &cregs->r13;
      |                                     ^~~
      |                                     r14
make[2]: *** [/tmp/linux/scripts/Makefile.build:287: arch/arc/kernel/disasm.o] Error 1

This particular problem occurs because of difference in ABI and can be fixed easily.
But it points to another problem: support for KPROBE and KGDB was not tested. Review of instruction decoding in disasm_instr() function and testing of KPROBE and KGDB functionality for ARCv3 32-bit and 64-bit is required.

@abrodkin
Copy link
Member

abrodkin commented May 4, 2023

@pavelvkozlov indeed KGDB on ARCv3 requires more testing. What we have now is what was done primarily for ARCompact & ARCv2 back in the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants