[all-commits] [llvm/llvm-project] 4dcd91: [PAC] Implement authentication for C++ member func...

Oliver Hunt via All-commits all-commits at lists.llvm.org
Mon Jul 22 18:29:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4dcd91aea3858fe60c65701a92060a04f789886f
      https://github.com/llvm/llvm-project/commit/4dcd91aea3858fe60c65701a92060a04f789886f
  Author: Oliver Hunt <oliver at apple.com>
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/Basic/PointerAuthOptions.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGPointerAuth.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGenCXX/ptrauth-member-function-pointer.cpp

  Log Message:
  -----------
  [PAC] Implement authentication for C++ member function pointers (#99576)

Introduces type based signing of member function pointers. To support
this discrimination schema we no longer emit member function pointer to
virtual methods and indices into a vtable but migrate to using thunks.
This does mean member function pointers are no longer necessarily
directly comparable, however as such comparisons are UB this is
acceptable.

We derive the discriminator from the C++ mangling of the type of the
pointer being authenticated.

Co-Authored-By: Akira Hatanaka ahatanaka at apple.com
Co-Authored-By: John McCall rjmccall at apple.com
Co-authored-by: Ahmed Bougacha <ahmed at bougacha.org>



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