Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • Makefile.vmlinux
Find file BlameHistoryPermalink
  • Sami Tolvanen's avatar
    kbuild: Fix CFI failures with GCOV · ddf56288
    Sami Tolvanen authored Jun 23, 2023
    With GCOV_PROFILE_ALL, Clang injects __llvm_gcov_* functions to
    each object file, and the functions are indirectly called during
    boot. However, when code is injected to object files that are not
    part of vmlinux.o, it's also not processed by objtool, which breaks
    CFI hash randomization as the hashes in these files won't be
    included in the .cfi_sites section and thus won't be randomized.
    
    Similarly to commit 42633ed8 ("kbuild: Fix CFI hash
    randomization with KASAN"), disable GCOV for .vmlinux.export.o and
    init/version-timestamp.o to avoid emitting unnecessary functions to
    object files that don't otherwise have executable code.
    
    Fixes: 0c3e806e
    
     ("x86/cfi: Add boot time hash randomization")
    Reported-by: default avatarJoe Fradley <joefradley@google.com>
    Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
    Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    ddf56288
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7