mbox series

[v1,0/7] Module relocation fixes and asm/insn.h header

Message ID 20220131182145.236005-1-kernel@esmil.dk (mailing list archive)
Headers show
Series Module relocation fixes and asm/insn.h header | expand

Message

Emil Renner Berthing Jan. 31, 2022, 6:21 p.m. UTC
The first patch removes a bunch of code from the asm/module.h which is
included in almost all drivers through linux/module.h. Next are two
patches to fix unaligned access when doing module relocations and do
proper range checks for auipc+jalr offsets.

I'm a little less confident about the following patches, so consider
this more of an RFC for those. The idea is to consolidate the RISC-V
instruction generation and manipulation similar to arm64's asm/insn.h
header.

/Emil

Emil Renner Berthing (7):
  riscv: Avoid unaligned access when relocating modules
  riscv: Fix auipc+jalr relocation range checks
  riscv: Add asm/insn.h header
  riscv: Use asm/insn.h for module relocations
  riscv: Use asm/insn.h to generate plt entries
  riscv: Use asm/insn.h for jump labels
  riscv: kernel/modules.c simplification

 arch/riscv/include/asm/insn.h       | 121 +++++++++++
 arch/riscv/kernel/jump_label.c      |  12 +-
 arch/riscv/kernel/module-sections.c |  27 +--
 arch/riscv/kernel/module.c          | 326 +++++++++++++---------------
 4 files changed, 276 insertions(+), 210 deletions(-)
 create mode 100644 arch/riscv/include/asm/insn.h