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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • bpf
  • arraymap.c
Find file BlameHistoryPermalink
  • Kees Cook's avatar
    bpf: Replace callers of BPF_CAST_CALL with proper function typedef · 102acbac
    Kees Cook authored Sep 28, 2021
    
    
    In order to keep ahead of cases in the kernel where Control Flow
    Integrity (CFI) may trip over function call casts, enabling
    -Wcast-function-type is helpful. To that end, BPF_CAST_CALL causes
    various warnings and is one of the last places in the kernel
    triggering this warning.
    
    For actual function calls, replace BPF_CAST_CALL() with a typedef, which
    captures the same details about the given function pointers.
    
    This change results in no object code difference.
    
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Acked-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
    Link: https://github.com/KSPP/linux/issues/20
    Link: https://lore.kernel.org/lkml/CAEf4Bzb46=-J5Fxc3mMZ8JQPtK1uoE0q6+g6WPz53Cvx=CBEhw@mail.gmail.com
    Link: https://lore.kernel.org/bpf/20210928230946.4062144-3-keescook@chromium.org
    102acbac
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7