[all-commits] [llvm/llvm-project] a542d5: [X86][KCFI] Add support for memory operand unfolding

Sami Tolvanen via All-commits all-commits at lists.llvm.org
Thu Nov 17 11:04:05 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a542d5422a35af2d3b5363c126f4e482fd2f98ee
      https://github.com/llvm/llvm-project/commit/a542d5422a35af2d3b5363c126f4e482fd2f98ee
  Author: Sami Tolvanen <samitolvanen at google.com>
  Date:   2022-11-17 (Thu, 17 Nov 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrCompiler.td
    M llvm/lib/Target/X86/X86KCFI.cpp
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    M llvm/test/CodeGen/X86/kcfi.ll

  Log Message:
  -----------
  [X86][KCFI] Add support for memory operand unfolding

When the Linux kernel is compiled without -mretpoline, KCFI fails
ungracefully because it doesn't handle indirect calls with a memory
target operand. Since the KCFI check will need to load the target
address into a register for validating the type hash anyway, simply
unfold memory operands in indirect calls that need a KCFI check.

Fixes #59017




More information about the All-commits mailing list