[all-commits] [llvm/llvm-project] 27fb74: [runtimes][PAC] Harden unwinding when possible (#1...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Mon Aug 25 10:27:40 PDT 2025


  Branch: refs/heads/users/ojhunt/pointer-authenticated-unwinding
  Home:   https://github.com/llvm/llvm-project
  Commit: 27fb74cf3545cedab4e1c7fa6f42b935b5f345c0
      https://github.com/llvm/llvm-project/commit/27fb74cf3545cedab4e1c7fa6f42b935b5f345c0
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M compiler-rt/lib/builtins/gcc_personality_v0.c
    M libcxxabi/include/__cxxabi_config.h
    M libcxxabi/src/cxa_exception.h
    M libcxxabi/src/cxa_personality.cpp
    M libunwind/include/libunwind.h
    M libunwind/src/AddressSpace.hpp
    M libunwind/src/CompactUnwinder.hpp
    M libunwind/src/DwarfInstructions.hpp
    M libunwind/src/DwarfParser.hpp
    M libunwind/src/Registers.hpp
    M libunwind/src/UnwindCursor.hpp
    M libunwind/src/UnwindLevel1.c
    M libunwind/src/UnwindRegistersRestore.S
    M libunwind/src/UnwindRegistersSave.S
    M libunwind/src/libunwind.cpp

  Log Message:
  -----------
  [runtimes][PAC] Harden unwinding when possible (#138571)

This hardens the unwinding logic and datastructures on systems
that support pointer authentication.
The approach taken to hardening is to harden the schemas of as many
high value fields in the myriad structs as possible, and then also
explicitly qualify local variables referencing privileged or security
critical values.
This does introduce ABI linkage between libcxx, libcxxabi, and
libunwind but those are in principle separate from the OS itself
so we've kept the schema definitions in the library specific headers
rather than ptrauth.h


  Commit: 4e8cff211fbd664bbc9bda965e66ccbdb69f6253
      https://github.com/llvm/llvm-project/commit/4e8cff211fbd664bbc9bda965e66ccbdb69f6253
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libcxxabi/include/__cxxabi_config.h
    M libcxxabi/src/cxa_personality.cpp
    M libunwind/include/libunwind.h
    M libunwind/src/AddressSpace.hpp
    M libunwind/src/DwarfParser.hpp
    M libunwind/src/Registers.hpp
    M libunwind/src/UnwindCursor.hpp
    M libunwind/src/UnwindLevel1.c
    M libunwind/src/UnwindRegistersRestore.S
    M libunwind/src/libunwind.cpp

  Log Message:
  -----------
  Updating to include some fixes I lost in the last update

At some point I lost the changes to loadAndAuthenticateLinkRegister
I also updated schema names in libunwind to be more consistent
Finally while looking at the total diff I saw some places that
the formatting could be improved.


  Commit: a070eac044b2170b22571d76bc032f5ae749c0fd
      https://github.com/llvm/llvm-project/commit/a070eac044b2170b22571d76bc032f5ae749c0fd
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libunwind/src/libunwind.cpp

  Log Message:
  -----------
  Build fix due to not testing the build after apply review feedback \o/


  Commit: 8d620b026e96afb06e5693b1b643e64a3d29ebdb
      https://github.com/llvm/llvm-project/commit/8d620b026e96afb06e5693b1b643e64a3d29ebdb
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libunwind/src/DwarfParser.hpp
    M libunwind/src/libunwind.cpp

  Log Message:
  -----------
  work around a bug where clang reports a template function as unused


  Commit: 7645ced404cde8420cf5343acacd5c463d4bb44d
      https://github.com/llvm/llvm-project/commit/7645ced404cde8420cf5343acacd5c463d4bb44d
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libcxxabi/src/cxa_personality.cpp

  Log Message:
  -----------
  And another one


  Commit: e8edc481e70802147effc9f483f955ed38f08bf5
      https://github.com/llvm/llvm-project/commit/e8edc481e70802147effc9f483f955ed38f08bf5
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libunwind/src/Registers.hpp

  Log Message:
  -----------
  Add all the required reg_t and link_reg_t decls, and unify location


  Commit: c247f316f7f8f52520536756eed208e8e34fa1f0
      https://github.com/llvm/llvm-project/commit/c247f316f7f8f52520536756eed208e8e34fa1f0
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libcxxabi/src/cxa_personality.cpp

  Log Message:
  -----------
  This erroneous error is annoying


  Commit: 7ee3e8bf793c8a57710bc56d918bfab15225e897
      https://github.com/llvm/llvm-project/commit/7ee3e8bf793c8a57710bc56d918bfab15225e897
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M libcxxabi/src/cxa_personality.cpp

  Log Message:
  -----------
  Remove header include that is unnecessary but apparently works in some places


Compare: https://github.com/llvm/llvm-project/compare/d1407d02c2d0...7ee3e8bf793c

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list