lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Feb 2022 16:24:48 +0100
From:   Emil Renner Berthing <kernel@...il.dk>
To:     linux-riscv@...ts.infradead.org
Cc:     Emil Renner Berthing <kernel@...il.dk>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Jason Baron <jbaron@...mai.com>,
        Ard Biesheuvel <ardb@...nel.org>,
        Jisheng Zhang <jszhang@...nel.org>,
        Alexandre Ghiti <alex@...ti.fr>, linux-kernel@...r.kernel.org
Subject: [PATCH v3 0/8] Add RISC-V asm/insn.h header

This series adds a RISC-V asm/insn.h header to consolidate instruction
generation and manipulation similar to arm64's asm/insn.h.

The first three patches are preparatory patches fixing unaligned access
in module relocations and moving unneded definitions out of asm/module.h
and asm/ftrace.h.
Patch 4 adds the header and the remaining patches converts module
relocation, plt entry, jump label and dynamic ftrace code to use it.

The only obvious code left to convert is the BPF JIT(s).

This series depends on the module relocation range check fix here:
https://lore.kernel.org/linux-riscv/20220223191257.143694-1-kernel@esmil.dk/

Changes since v2:
- Split the range check fix out and send it separately.
- Convert "if (IS_DEFINED(CONFIG_32BIT))" to #ifdef to avoid compiler
  warning on rv32. Thanks kernel test robot!
- Add sp register, load/store instructions and RISCV_INSN_REG_L,
  RISCV_INSN_REG_S and RISC_INSN_SZREG macros to work on both rv32 and
  rv64 to the asm/insn.h header.
- Add patch moving unneded definitions out of out asm/ftrace.h and a
  patch converting kernel/ftrace.c to use the header.

Changes since v1:
- Send the right patches.

Emil Renner Berthing (8):
  riscv: Avoid unaligned access when relocating modules
  riscv: Remove unneeded definitions from asm/module.h
  riscv: Remove unneeded definitions from asm/ftrace.h
  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: Use asm/insn.h for dynamic ftrace

 arch/riscv/include/asm/ftrace.h     |  35 +----
 arch/riscv/include/asm/insn.h       | 151 ++++++++++++++++++
 arch/riscv/include/asm/module.h     |  87 ----------
 arch/riscv/kernel/ftrace.c          |  56 ++++---
 arch/riscv/kernel/jump_label.c      |  12 +-
 arch/riscv/kernel/module-sections.c |  71 +++++++++
 arch/riscv/kernel/module.c          | 236 +++++++++++++---------------
 7 files changed, 364 insertions(+), 284 deletions(-)
 create mode 100644 arch/riscv/include/asm/insn.h

-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ