release/19.x: Fix KCFI types for generated functions with integer normalization (#104826) by llvmbot · Pull Request #113938 · llvm/llvm-project (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
ojeda mentioned this pull request
95 tasks
With -fsanitize-cfi-icall-experimental-normalize-integers, Clang appends ".normalized" to KCFI types in CodeGenModule::CreateKCFITypeId, which changes type hashes also for functions that don't have integer types in their signatures. However, llvm::setKCFIType does not take integer normalization into account, which means LLVM generated functions with KCFI types, e.g. sanitizer constructors, will fail KCFI checks when integer normalization is enabled in Clang.
Add a cfi-normalize-integers module flag to indicate integer normalization is used, and append ".normalized" to KCFI types also in llvm::setKCFIType to fix the type mismatch.
(cherry picked from commit e1c36bd)
Darksonn added a commit to Darksonn/linux that referenced this pull request
Darksonn added a commit to Darksonn/linux that referenced this pull request
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request
ojeda pushed a commit to Rust-for-Linux/linux that referenced this pull request
TroyMitchell911 pushed a commit to Troyself/k230-linux-kernel that referenced this pull request