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
  • gcc-plugins
  • randomize_layout_plugin.c
Find file BlameHistoryPermalink
  • Bill Wendling's avatar
    security: don't treat structure as an array of struct hlist_head · 75c1182e
    Bill Wendling authored Apr 07, 2022
    
    
    The initialization of "security_hook_heads" is done by casting it to
    another structure pointer type, and treating it as an array of "struct
    hlist_head" objects. This requires an exception be made in "randstruct",
    because otherwise it will emit an error, reducing the effectiveness of
    the hardening technique.
    
    Instead of using a cast, initialize the individual struct hlist_head
    elements in security_hook_heads explicitly. This removes the need for
    the cast and randstruct exception.
    
    Signed-off-by: default avatarBill Wendling <morbo@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20220407175930.471870-1-morbo@google.com
    75c1182e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7